vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   [request] NewsFader Repair for VB2.2.0 (https://vborg.vbsupport.ru/showthread.php?t=32118)

xug 11-04-2001 04:23 PM

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/showthrea...&threadid=9944

Scott MacVicar 11-04-2001 05:15 PM

I just installed it and got it working fine first time :/

xug 11-04-2001 09:01 PM

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:
Quote:

<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:

Quote:

// 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:
Quote:

// 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:
Quote:

// 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.

Zbro 02-04-2002 03:01 PM

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 !! :)


All times are GMT. The time now is 03:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01759 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete