php forum
php mysql forum
php mysql smarty
 
Topic Options
#311830 - 10/28/06 06:15 PM 2 different footers in UBB Threads 6.x.x
arentzen Offline
Newbie

Registered: 10/05/06
Posts: 19
Loc: Denmark

   2 different footers in UBB Threads 6.x.x to Del.icio.us Add to del.icio.us
  Digg 2 different footers in UBB Threads 6.x.x Digg it
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.
Code:
 // ####################################################################### 
  // 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.
Code:
// 	######################################################################
//	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:
Code:
$html -> send_footer(); 

Edit the code to:
Code:
$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.


Edited by arentzen (10/28/06 06:25 PM)
_________________________
Peter Arentzen
trosfrihed.dk

Top
#311840 - 10/30/06 06:52 PM Re: 2 different footers in UBB Threads 6.x.x [Re: arentzen]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25432
Loc: Texas
Cool, thank you for sharing Peter thumbsup
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  Ian_W 
Who's Online
0 Registered (), 35 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
AllenAyres 12
blaaskaak 8
tackaberry 7
FREAK1 6
Gizmo 4
Mike L_dup1 4
Chris Bale 4

 

 

 
fusionbb message board php hacks