View Full Version : [request] NewsFader Repair for VB2.2.0
Can somebody help me and others out with the news fader problem, it's not running anymore in the newest VB2.2.0!?
Original thread located here :
https://vborg.vbsupport.ru/showthread.php?s=&threadid=9944
Scott MacVicar
11-04-2001, 05:15 PM
I just installed it and got it working fine first time :/
Hi PPN
I did go to your 'www' and didn't see it running, or do you have it on another site?
bitbender
02-04-2002, 04:30 AM
well, I did too, on my test version of VB 2.2.2...
But it did require some adjustments to the original script.
For the changes to the /admin/index.php script:
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr bgcolor="#3F3849"><td><font color="#BCB6CD">
<b>Forum news</b>
</font></td></tr></table>
<a href="newsfade.php?s=<?php echo $session[sessionhash]; ?>&action=add"> add</a> |
<a href="newsfade.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> edit</a>
</td></tr>
I used:
// start of newsfader hack
makenavoption("Add","newsfade.php?&action=add","|");
makenavoption("Edit","newsfade.php?&action=modify","|");
makenavselect("Forum News");
// end of newsfader hack
And for the /index.php changes:
// Hack newsfade
$newsfadebits = "\"Welcome our new member??$newusername\",\"\",\n";
$newsfades=$DB_site->query("SELECT title,pagetext FROM announcement WHERE enddate>=$datenow AND forumid=0 ORDER BY startdate DESC");
while ($newsfade=$DB_site->fetch_array($newsfades)) {
$newsfadebits.="\"".addslashes($newsfade[pagetext])."\",\"$newsfade[title]\",\n";
}
$newsfadebits = substr($newsfadebits,0,-2);
// End Hack newsfade
I used:
// Hack newsfade
$newsfadebits = "\"<b><i>Welcome to Bitbender Forums, Where Members RULE</b></i>\",\"\",\n";
$newsfades=$DB_site->query("SELECT title,pagetext FROM announcement WHERE enddate>=$today AND forumid=0 ORDER BY startdate DESC");
while ($newsfade=$DB_site->fetch_array($newsfades)) {
$newsfadebits.="\"".addslashes($newsfade[pagetext])."\",\"$newsfade[title]\",\n";
}
$newsfadebits = substr($newsfadebits,0,-2);
// End Hack newsfade
Notice the difference in red. The previous variable used no longer seems to be valid.
All other changes apply as instructed. (Since I restored from a DB backup, my template changes were already in place).
Seems to work as before.
Yup, Bitbender, that's exactly what I did when I installed it on 2.2.1 and it works fine after I upgraded to 2.2.2 also.
bitbender
02-04-2002, 10:23 PM
Glad to get corroboration...I've been writing code for 24 years, but PHP still throws me for a loop more often than not! Heck, I watched it run thru twice, clicked every displayable link and made SURE before opening that big Yap of mine!
THanks !! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.