Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 5

Author Topic: [MOD] 2 more Extra Functions for sNews 1.6.0  (Read 21286 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] 2 more Extra Functions for sNews 1.6.0
« on: June 18, 2007, 09:01:31 pm »

The default sNews package comes with one "Extra" contents function that lets you... the Administrator... post small amounts of content into (by default) the left-side column of the template (index.php) under the text links to categories, articles and comments. This Mod... based on one done by DOM for 1.5... creates 2 more "Extra" functions that give you 2 more optional locations for small content placed on category pages or regular pages, and the work in exactly the same manner as the default "Extra" contents function.

It takes several hours to create this mod and get it running smoothly for one additional function so I did 2 at the same time just for the added functionality. I've zipped a clean, default snews.php file with  Extra 2 and Extra 3 functions added to it. This file appears to function well so far, though it hasn't been exhaustively tested. Just install it in place of your current snews.php file and give it a whirl.
To make the new Extra contents visible in your sNews page... insert the following function statements where you want them to appear in your index.php file. You can insert them anywhere... even in an additional division above the center() function... and you can style it anyway you wish by wrapping the content in a new division id style set in your stylesheet.
       <?php second_extra(); ?>
       <?php third_extra(); ?>
« Last Edit: September 07, 2007, 06:22:21 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Zipz

  • Newbie
  • *
  • Karma: 0
  • Posts: 33
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #1 on: June 18, 2007, 11:14:29 pm »

Thanks very much, Keyrocks... i'm a absolute PHP noob, so this kind of  ready to go solutions are pretty useful to me!
Logged

Pavel

  • Newbie
  • *
  • Karma: 0
  • Posts: 30
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #2 on: June 19, 2007, 01:02:00 am »

Thanks alot keyrocks for this mod, but those 2 additional extra contents can't be placed at some specified article, that I needed :( it's only for specified category.. :(
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #3 on: June 19, 2007, 01:39:44 am »

Quote from: Pavel
Thanks alot keyrocks for this mod, but those 2 additional extra contents can't be placed at some specified article, that I needed :( it's only for specified category.. :(
Well... the "Extra" functions will not place anything within a specific article... they were never designed to do that in the first place. However... Philmoz's Hidden Articles Mods will do that... remember the link I give you in my other post on this topic? So, implement those other mods and experiment with it. :)
« Last Edit: September 07, 2007, 06:27:46 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #4 on: July 30, 2007, 06:24:30 pm »

Keys,

Can you check your file, I think I found a bug.  For some reason when I edit the extra functions I do not get a back button when Operation is completed.

Thanks
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #5 on: July 30, 2007, 08:57:42 pm »

Quote from: centered
Keys,
Can you check your file, I think I found a bug.  For some reason when I edit the extra functions I do not get a back button when Operation is completed.
Thanks
I just checked my file (locahost) and the "Back" button links are visible and working for both Extra 2 and Extra 3 positioned content. I noticed though... that the Back link to Extra 2 leads to the View-Edit link string for that article all by itself... while the Back link for the Extra 3 content leads back to the link list for all articles posted. I have no idea why that occurs. I will take a closer look at the code soon.

BTW... I noticed (in my localhost test install) that when I'm using the snewsxt.php file... the whole footer section does not display... have you noticed this on your install?
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #6 on: July 30, 2007, 09:13:57 pm »

I will check it out when I get home.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #7 on: July 30, 2007, 09:53:34 pm »

@ centered...
Disregard my note about the Back links leading to different lists (above). This was happening because I had disabled the last mod string in function processing. The original pre-mod string existed in 1.5.31 but it did not exist in 1.6.0... and I had disabled it in my file to see what would happen. Once I enabled it again... the Back Links for both extra contents leads back to the content itself... as it should. This string is currently active the downloaded file as well, so it should work same as mine.

I still can't figure out why my footer doesn't display yet... I'm using the un-modded (default) index.php. I have no footer section using the default (virgin) snews.php or the same file with just the 2 extra functions added. It displays fine when I switch to my snews2.php (Enhanced) engine file. (obviously my own custom-bug)  :/
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

bordelloguy

  • Newbie
  • *
  • Karma: 0
  • Posts: 16
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #8 on: July 30, 2007, 10:21:25 pm »

Quote from: keyrocks
It displays fine when I switch to my snews2.php (Enhanced) engine file. (obviously my own custom-bug)  :/
Is it possible to get our hands on   enhanced+ this mod file?  thanks
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #9 on: July 30, 2007, 10:32:01 pm »

I haven't had time to add the 2 extra functions to the Enhanced (snews2.php) package yet... it is a lengthy operation. I've only added it to the default 1.6 snews.php file (available from the link in the first post) and to a more heavily modded version of the Enhanced snews2.php file that also includes a beta (test) version of Bakercad's un-released Multiple Users Mod and his latest Templates Mod. I cannot share this latter package with anyone until Bakercad releases his MU Mod... and he has already indicated this will not be happening until another major sNews project is released... so don't ask him for it. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
[MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #10 on: July 31, 2007, 12:15:40 am »

Works fine for me keys... odd
Logged

Joost

  • Guest
Re: [MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #11 on: August 24, 2007, 09:14:16 pm »

Keyrocks,

I installed  this snews version. Seems to work as expected. Except for: Extra 3 contents:  view  (see admin panel)
When viewing everything is displayed in de list (all extra (1,2,3) ,  all articles and all pages).

Extra 2 is behaving just fine. Great job Keyrocks and a lot of work. I tried myself, to find out that Dom's code is broken (forum transfer issue).
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #12 on: August 24, 2007, 10:33:10 pm »

Keyrocks,

I installed  this snews version. Seems to work as expected. Except for: Extra 3 contents:  view  (see admin panel)
When viewing everything is displayed in de list (all extra (1,2,3) ,  all articles and all pages).
Extra 2 is behaving just fine. Great job Keyrocks and a lot of work. I tried myself, to find out that Dom's code is broken (forum transfer issue).
FIX FOR EXTRA 3 "VIEW"

Ooopps... thanks for that note Joost... I found this is caused by a typo.
In your snews.php file, search for // ARTICLES - ADMIN LIST and... in the 6th line down in the function... under the comment #  Extra 3 contents... take a look at the start of the case string. There are 2 underscores between third and extra. Remove one and EXTRA 3 will only display its own articles when you click the VIEW link. The download ZIP file is now updated with this fix.

Quote
case 'third__extra_view':
« Last Edit: August 24, 2007, 10:49:39 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: [MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #13 on: August 24, 2007, 10:40:07 pm »

I had that line right under my nose, but didn't notice the typo. :-[
It works now.
Thanks Keyrocks
Logged

Boogada

  • Newbie
  • *
  • Karma: 3
  • Posts: 27
Re: [MOD] 2 more Extra Functions for sNews 1.6.0
« Reply #14 on: September 10, 2007, 01:34:25 am »

I've just tried this, but I don't get it to work at all.

database and user settings are correct but when I go to my website it just is a blank screen.

www.test.hohle-phrasen.de
Logged
Pages: [1] 2 3 ... 5