Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #2  
Old 03-13-2002, 06:22 PM
Dade's Avatar
Dade Dade is offline
 
Join Date: Jan 2002
Location: California
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack oh master of hacking

Do you by any chance have a demo or screenshot available?
Reply With Quote
  #3  
Old 03-13-2002, 06:30 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

em there is no demo :P

it would just change the header at the top....
Reply With Quote
  #4  
Old 03-13-2002, 09:06 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't imagine how this would look, but I do not wish to alter any files prior to the hack, could anybody who applied this please post a screenshot?

This hack sounds like one I am looking for, just wanna be sure
Reply With Quote
  #5  
Old 03-13-2002, 10:07 PM
Psychdrone Psychdrone is offline
 
Join Date: Nov 2001
Posts: 525
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well my guess is it would look like Vb, header

notice how it switches between banners

Thanks so much Pnn, this is simpile but grand!!
Reply With Quote
  #6  
Old 03-14-2002, 05:47 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PPN!!!!!!!!!!!!!!!!!!!!!

**hits Psychdrone**
Reply With Quote
  #7  
Old 03-14-2002, 06:53 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I accomplished this same thing by creating (more than one) new templates and naming them whatever. The parsed them and then edited the appropriate templates replacing $header with the new template names.

A bit more time consuming but effective

great job folks
Reply With Quote
  #8  
Old 03-14-2002, 10:36 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it is good to have the flexibility to customize forums individually. You could theme an entire forum. Great hack. that was the only functionality that I was missing from UBB.
Reply With Quote
  #9  
Old 03-14-2002, 10:49 PM
Psychdrone Psychdrone is offline
 
Join Date: Nov 2001
Posts: 525
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
PPN!!!!!!!!!!!!!!!!!!!!!

**hits Psychdrone**
right.........PPn
In my book you will always be Pnn
Reply With Quote
  #10  
Old 03-16-2002, 09:57 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this hack be extended to include showthread.php for that particular forum? The idea is to sell the new header to a sponsor, but with all the different news hacks or the different ways to access a thread directly without having to enter forum, some people will never see the new header.
Reply With Quote
Reply

Thread Tools

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 03:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04445 seconds
  • Memory Usage 2,294KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_php
  • (1)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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