I've installed the story scroller plug in but it also display my past articles and i don't want it to do that. Is there any way to turn off or remove the past articles block yet leave the story scroller plug in functional? Any help would be greatly appreciated.
sidenote: I tried removing the php code from my footer.php to disable past articles and it broke the theme.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
find the file 'phpstoryscroller.inc' in your phpstoryscroller directory and open it up in your favourite text editor.
Look for the first if() block in the file.
Inside that first block should be a line:
$result=mysql_query("select sid, title from stories where topic=$topic order by sid DESC limit 0,20");
Now look at the following else block. In there should be a similar line:
$result=mysql_query("select sid, title from stories order by sid DESC limit 0,20");
Near the end of both of these lines is part of a MySQL query: 'limit 0,20'.
This tells mysql to start at result 0 and select the next 20 results.
To get it to not display your old articles you have one of 2 choices:
1) replace the 0,20 with 0,$top
I can't guarantee that this will work, but if it does the mod will only scroll the number of articles displayed in the main section of the main page. It should read the value from config.php.
It shouldn't take too long to test it yourself, unfortunately I'm recompiling php at the moment so I can't.
2) Replace the 0,20 with a lower number in place of the 20.
e.g. 0,5 for only the top 5 articles.
Whichever option you choose, you should replace it in both statements I highlighted above.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply, that wasn't really what I needed. I have no problem with how the phpstroyscroller displays... or how many topics it displays, it works really well. My main problem is that phpstoryscroller _AND_ the default "past articles" box show up simultaneously, and that just looks, sorta, well, retarded. Do ya think I could find something similar in the "Past Articles" sideblock in the theme footer.php (I'm gonna go look right now) thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the answer finally, it should have been SO obvious, but apparently, I wasn't thinking too clearly. In config.php the is a user-configurable block that looks something like this:
##############################
# Site Identification Config #
##############################
$sitename = "yoursite.COM"; # Your Site Name
$nuke_url = "http://yoursite.com/"; # Your sites URL
$titletag = "blah, blah, fucking blah"; # This is appended to your site name in the browsers titlebar.
$titlebar = "repeat the blah bit"; # This will appear in the header on each page.
$startdate = "day before yesterday"; # When did your site launch?
$adminmail = "admin@yoursite.com"; # Admin email.
$top = "10"; # Number of Announcements to display by default.
$oldnum = "20";
$ultramode = "1";
well, if you set $oldnum to 0(xero) instead of 20, well, then voila, no more past articles. Thanks for you patience. I guess I just had to post and humiliate myself before I got it. Hope this post helps somebody else out with the same problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed the story scroller plug in but it also display my past articles and i don't want it to do that. Is there any way to turn off or remove the past articles block yet leave the story scroller plug in functional? Any help would be greatly appreciated.
sidenote: I tried removing the php code from my footer.php to disable past articles and it broke the theme.
find the file 'phpstoryscroller.inc' in your phpstoryscroller directory and open it up in your favourite text editor.
Look for the first if() block in the file.
Inside that first block should be a line:
$result=mysql_query("select sid, title from stories where topic=$topic order by sid DESC limit 0,20");
Now look at the following else block. In there should be a similar line:
$result=mysql_query("select sid, title from stories order by sid DESC limit 0,20");
Near the end of both of these lines is part of a MySQL query: 'limit 0,20'.
This tells mysql to start at result 0 and select the next 20 results.
To get it to not display your old articles you have one of 2 choices:
1) replace the 0,20 with 0,$top
I can't guarantee that this will work, but if it does the mod will only scroll the number of articles displayed in the main section of the main page. It should read the value from config.php.
It shouldn't take too long to test it yourself, unfortunately I'm recompiling php at the moment so I can't.
2) Replace the 0,20 with a lower number in place of the 20.
e.g. 0,5 for only the top 5 articles.
Whichever option you choose, you should replace it in both statements I highlighted above.
Thanks for the reply, that wasn't really what I needed. I have no problem with how the phpstroyscroller displays... or how many topics it displays, it works really well. My main problem is that phpstoryscroller _AND_ the default "past articles" box show up simultaneously, and that just looks, sorta, well, retarded. Do ya think I could find something similar in the "Past Articles" sideblock in the theme footer.php (I'm gonna go look right now) thanks for your help.
I found the answer finally, it should have been SO obvious, but apparently, I wasn't thinking too clearly. In config.php the is a user-configurable block that looks something like this:
##############################
# Site Identification Config #
##############################
$sitename = "yoursite.COM"; # Your Site Name
$nuke_url = "http://yoursite.com/"; # Your sites URL
$titletag = "blah, blah, fucking blah"; # This is appended to your site name in the browsers titlebar.
$titlebar = "repeat the blah bit"; # This will appear in the header on each page.
$startdate = "day before yesterday"; # When did your site launch?
$adminmail = "admin@yoursite.com"; # Admin email.
$top = "10"; # Number of Announcements to display by default.
$oldnum = "20";
$ultramode = "1";
well, if you set $oldnum to 0(xero) instead of 20, well, then voila, no more past articles. Thanks for you patience. I guess I just had to post and humiliate myself before I got it. Hope this post helps somebody else out with the same problem.