vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Unique Forum Header Including Parent Forums (https://vborg.vbsupport.ru/showthread.php?t=36093)

Scott MacVicar 03-12-2002 10:00 PM

Unique Forum Header Including Parent Forums
 
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.

Dade 03-13-2002 06:22 PM

Excellent hack oh master of hacking ;)

Do you by any chance have a demo or screenshot available? :D

Scott MacVicar 03-13-2002 06:30 PM

em there is no demo :P

it would just change the header at the top....

Floris 03-13-2002 09:06 PM

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 :)

Psychdrone 03-13-2002 10:07 PM

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!!

Scott MacVicar 03-14-2002 05:47 AM

PPN!!!!!!!!!!!!!!!!!!!!! :D

**hits Psychdrone**

drives fast 03-14-2002 06:53 PM

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

Lionel 03-14-2002 10:36 PM

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.

Psychdrone 03-14-2002 10:49 PM

Quote:

Originally posted by PPN
PPN!!!!!!!!!!!!!!!!!!!!! :D

**hits Psychdrone**

right.........PPn
In my book you will always be Pnn :)

Lionel 03-16-2002 09:57 AM

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.


All times are GMT. The time now is 01:39 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.01212 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete