This hack will fade in news headlines that you dictate via the control panel in a table row above your forums. If you are curious how it looks, visit my forums at http://www.vhforums.com for an example.
This is a pretty extensive hack, so make sure and back up all your files first BEFORE making any changes.
First thing is to upload the contents of this zip file to the following folders: fade.gif -> To your non-cgi folder fader.js -> To your non-cgi folder newsfader.txt -> To your non-cgi folder cp_vars_news_fader_.pl -> To your Templates directory cp_news_fader.cgi -> To your cgi-bin folder (CHMOD this file 755) vars_news_fader.cgi -> To your variables folder (most likely your cgi-bin folder)- CHMOD this file 777
Ok next the files that need to be edited:
** EDIT CP.CGI **
Look for the following code: if (($ubb eq "set_cats") && ($status eq "Administrator")) { require "$vars_config{CGIPath}/cp_forums.cgi"; &set_cats; exit; } #end set_cats
Underneath this add: if (($ubb eq "vars_news_fader") && ($status eq "Administrator")) { require "$vars_config{CGIPath}/cp_news_fader.cgi"; &NewsFaderSettings; exit; } #end vars_news_fader
Underneath that add this: # Start News Fader Stuff if ($vars_news_fader{nfgreet} ne "") { $NewsGreet = qq~"$vars_news_fader{nfgreet}","",~; } else { $NewsGreet = ""; }
if ($vars_news_fader{nfon} eq "ON") { $newslinefader= qq~
$vars_news_fader{nftitle}
News Fader for DHTML Browser.
~; } else { $newslinefader = ""; }
# Run The News Fader &ReadNews;
# End News Fader Stuff
Look for: sub Normal_Table_Row { my $Row = qq~
Underneath add the following:
Look for: ~; } # end mods column
$Top .= '
';
return ($Top); } #end normal_table_top
sub Cat_Table_Top {
Replace with:
~; } # end mods column $Top .= "
$newslinefader";
$Top .= '';
return ($Top); } #end normal_table_top
sub Cat_Table_Top
{** DONE - SAVE AND CLOSE PUBLIC_FORUM_SUMMARY.PL TEMPLATE **
Ok now you're done. Re-upload these four files. Next go into the Control Panel, Primary Settings -> News Fader Settings, configure all of your settings and news headlines. Clear your cache and the next time you view your forum summary page, the News Fader should be there.
[Fixed typo error in cp_news_fader.cgi] [Fixed the edits in PUBLIC_FORUM_SUMMARY.PL]
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.