|
Joined: Oct 2006
Posts: 18
Newbie
|
Newbie
Joined: Oct 2006
Posts: 18 |
Hej I have a lot of banners of my page, which are coded into my ubbt_footer.tmpl file. Sometimes they are flashing which is very annoying when reading posts. To avoid this, I added some new footer php code into my ubbt.inc.php file, so I can switch off the annoying banners when reading posts, without changing the footer file in every forum. Heres how to do. Open your ubbt.inc.php file and find the send_footer function. // ####################################################################### // Send the footer // ####################################################################### function send_footer() {
global $config, $theme, $thispath, $VERSION, $ubbt_lang, $tempstyle, $timea,$querycount,$zlib,$fheader,$Board;
if ($config['privacy']) { $template['privacy_statement'] = " | <a href=\"{$config['phpurl']}/viewprivacy.php\">{$ubbt_lang['PRIVACY']}</a>"; }
if ($config['debug']) { $timeb = getmicrotime(); $time = $timeb - $timea; $time = round($time,3); $debug = "<p align=\"center\" class=\"small\">Generated in $time seconds. $querycount queries. $zlib</p>"; }
if ($fheader) { $file = "footer_$Board.php"; } else { $file = "footer.php"; } $insert = @file("{$config['path']}/includes/$file"); if (!is_array($insert)) { $insert = @file("{$config['phpurl']}/includes/$file"); } if ($insert) { $footerfile = implode('',$insert); }
$test = @include("$thispath/templates/$tempstyle/ubbt_footer.tmpl"); if (!$test) { @include("{$config['path']}/includes/$file"); } } Then create a new footer file and name it : ubbt_newfooter.tmpl and upload it into your tmpl. directory. Then add the following code into your ubbt.inc.php file,right after the above send_footer function. // ###################################################################### // Send new footer - af Arentzen // ###################################################################### function send_new_footer() { global $config, $theme, $thispath, $VERSION, $ubbt_lang, $tempstyle, $timea,$querycount,$zlib,$fheader,$Board;
if ($fheader) { $file = "footer_$Board.php"; } else { $file = "footer.php"; } $insert = @file("{$config['path']}/includes/$file"); if (!is_array($insert)) { $insert = @file("{$config['phpurl']}/includes/$file"); } if ($insert) { $footerfile = implode('',$insert); }
$new_footer = @include("$thispath/templates/$tempstyle/ubbt_newfooter.tmpl"); if (!$new_footer) { @include("$thispath/templates/$tempstyle/ubbt_footer.tmpl"); } } Then open showflat.php and showthreaded.php, and go to the bottom and find the code: Edit the code to: $html -> send_new_footer(); And voila! you can now read posts with your new footer file! If you want the new footer on more pages, simply open your php.files and add the code.
Last edited by arentzen; 10/28/2006 6:25 PM.
trosfrihed.dk Custom Ubb 7.5.2
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Cool, thank you for sharing Peter
|
|
|
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.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|