vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Maintaining one header with a lot of themes/styles? (https://vborg.vbsupport.ru/showthread.php?t=41109)

veedee 07-15-2002 07:38 PM

Maintaining one header with a lot of themes/styles?
 
Hiya gang,

I run about 10 styles on my website. Apart from being annoying when I come to update, or add a new hack, I have found another problem.

I want to run a global header across my forums *and* my site.

I am not great at PHP but not bad, however I need advice when it comes to implementing a new header.

Can I create a file called header.php and insert it into the forum using $header?
Where would I insert it, in the hard code or in the templates?

Kind Regards,

veedee

Dean C 07-15-2002 08:08 PM

the best way i have found of doing different headers is to have a two replacements:

{header}

and

{footer}

and insert your header that you want into the {header} replacement and the {footer} that you want into the footer template...

then have all your styles share the same template set and let them just have a seperate replacement set each...

:D

veedee 07-16-2002 08:04 AM

Thanks but...

This wouldn't work for a sitewide header, or would it?

The thread stated that I would like this to be a global header for my forum *and* my website in general.

This can't be that hard to do. Can it?

Brad 07-16-2002 09:12 AM

try this. not tested tho. and your site will have to be .php


in any file on your site right after the

PHP Code:

<?php


add:

PHP Code:

error_reporting(7);

$templatesused='header';

require(
'./global.php'); 

then add

$header

where you want.


i *think* it might work but im no vbulletin expert.

if i were you id save myself alot of work and use vBindex or vBhome, making new pages with it isent hard and you can comand your pages via the templates.

veedee 07-16-2002 09:17 AM

Thanks for your help. I guess that vBindex and vBhome are hacks. I'll see if I can find them.

Martz 07-18-2002 02:05 PM

Quote:

Originally posted by Anime-loo
try this. not tested tho. and your site will have to be .php


in any file on your site right after the

PHP Code:

<?php


add:

PHP Code:

error_reporting(7);

$templatesused='header';

require(
'./global.php'); 

then add

$header

where you want.


i *think* it might work but im no vbulletin expert.

if i were you id save myself alot of work and use vBindex or vBhome, making new pages with it isent hard and you can comand your pages via the templates.

It would be much easier to add require(./otherheader.php); at the top of all the other templates phpparsed code I think.

Chris M 07-18-2002 04:12 PM

Just set all the styles to point to one Template, but make sure the Replacements stay the same...

Satan


All times are GMT. The time now is 01:55 AM.

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.01076 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete