Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Unique Forum Header Including Parent Forums Details »»
Unique Forum Header Including Parent Forums
Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-12-2002 Last Update: Never Installs: 5
 
No support by the author.

FireFly told me to post it and its semi based on his code.

it tries to use its own forumid if it doesn't use it then it tries the parent one and so forth and if it doesn't find one then it uses the default one.

open global.php

look for
PHP Code:
eval("\$header .= \"".gettemplate('header')."\";"); 
replace with

PHP Code:
if (substr($PHP_SELF, -strlen('forumdisplay.php')) == 'forumdisplay.php') {
  
$forumid intval($forumid);
  
$foruminfo verifyid('forum',$forumid,1,1);
  
$parentlist explode(","$foruminfo["parentlist"]);
  
$header '';
  for (
$i=0$i<count($parentlist) and empty($header); $i++) {
    eval(
"\$header = \"".gettemplate("forumdisplay_header".$parentlist[$i])."\";");
  }
  if(
$header == '') {
    eval(
"\$header .= \"".gettemplate('header')."\";");
  }
} else {
  eval(
"\$header .= \"".gettemplate('header')."\";");

now create a new template called forumdisplay_headerFORUMID where Forumid is the forumid you wish to have the banner for, though this will also affect child forums unless they have their own.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 04-01-2002, 02:20 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question... if that code makes the banner appear when viewing threads, shouldn't this edited code make the banner appear when showing search results?

PHP Code:
if (substr($PHP_SELF, -strlen('forumdisplay.php')) == 'forumdisplay.php' || substr($PHP_SELF, -strlen('showthread.php')) == 'showthread.php' || substr($PHP_SELF, -strlen('search.php')) == 'search.php') {
  if(
$forumid == '') {;
    
$thread getthreadinfo($threadid);
    
$forumid $thread['forumid'];
  }
  
$foruminfo getforuminfo($forumid);
  
$parentlist explode(","$foruminfo["parentlist"]);
  
$header '';
  for (
$i=0$i<count($parentlist) and empty($header); $i++) {
    eval(
"\$header = \"".gettemplate("forumdisplay_header".$parentlist[$i])."\";");
  }
  if(
$header == '') {
    eval(
"\$header .= \"".gettemplate('header')."\";");
  }
} else {
  eval(
"\$header .= \"".gettemplate('header')."\";");

It's not working.. I'm not getting any parse errors, it just doesn't show the forum banner when displaying the search results. What am I doing wrong?
Reply With Quote
  #43  
Old 04-01-2002, 03:32 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PPN, FireFly, ANYONE....please help!!!!

Ok....implemented this...tested it...all was ok....still not quite what I had been looking for, but worked well, and even if it was a bit more work...it was worth it!

However....now there is a MAJOR problem.....

this is throwing wayyyy too many extra queries out....

PPN, you KNOW how many users we have...and it is kicking my servers butt BAD.

Please please please....can ya help me get this streamlined some?

Otherwise I am going to have to re edit each forum, and go back to the old different template per place....

All it would really take it is a call similiar to the one which determines what template set to use, but instead would call and add into the header of the templates the banner file for that forum. For that matter, I would even be happy with using an include right now if you can just help me get the same functionality, without all these extra queries!!!
Reply With Quote
  #44  
Old 04-01-2002, 07:57 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm doing your banner thing you wanted, like a full banner system for vBulletin so other people can use it.
Reply With Quote
  #45  
Old 04-04-2002, 09:06 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You talkin to me or ladyfyre? If you're talkin to me... THANKS!
Reply With Quote
  #46  
Old 04-14-2002, 01:10 PM
alexwriting alexwriting is offline
 
Join Date: Feb 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
i'm doing your banner thing you wanted, like a full banner system for vBulletin so other people can use it.
Hi PPN,

Did you have time to do this? It would be just dynamite!

Many thanks,

Alex
Reply With Quote
  #47  
Old 04-14-2002, 10:33 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THWACK!

Reply With Quote
  #48  
Old 04-25-2002, 10:43 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THWACK!
Reply With Quote
  #49  
Old 05-09-2002, 05:09 PM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a little lost and would REALLY appreciate some help.

I am trying to put a Flash animated banner in the banner position where we normally have a plain jpg or gif picture.

Simply adding it as a banner image doesn't work (obviously), so I was hoping to be able to use this hack to sort the problem..

I have updated the global.php as directed and created a new template with the correct FORUMID, but the forum that I want the "modified" header for, still shows the DEFAULT header

Any ideas on what could be going wrong ?
Reply With Quote
  #50  
Old 12-01-2002, 02:20 PM
Gaffer's Avatar
Gaffer Gaffer is offline
 
Join Date: Nov 2001
Location: Australia
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you embed the flash or just do it as an image
Reply With Quote
  #51  
Old 01-22-2003, 01:59 AM
Rich_Z Rich_Z is offline
 
Join Date: Nov 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
i'm doing your banner thing you wanted, like a full banner system for vBulletin so other people can use it.
Did this ever happen?

Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:32 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.05106 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete