vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Include own templates? (https://vborg.vbsupport.ru/showthread.php?t=64802)

jcr 05-06-2004 03:53 PM

Include own templates?
 
This question has probably been asked a couple of hundred times..

I have made a template in the Style manager... called bp_header

Now I want to include this in the header template and simply call it by typing

$bp_header

what do I have to do?

assassingod 05-06-2004 04:05 PM

There most basic way is to put:
PHP Code:

    eval('$bp_header = "' fetch_template('bp_header') . '";'); 

in the phpinclude_start template. However, you will have an uncached template on each page (1 extra query)

jcr 05-06-2004 04:13 PM

Quote:

Originally Posted by assassingod
There most basic way is to put:
PHP Code:

    eval('$bp_header = "' fetch_template('bp_header') . '";'); 

in the phpinclude_start template. However, you will have an uncached template on each page (1 extra query)

Thanks that worked for me!, but i dont understand the meaning of an uncached template ( 1 extra query ) , how can I make this a good thing? ie.. a cached template instead?

assassingod 05-06-2004 04:46 PM

Basically this means that there is 1 extra query on each page and that could increase loading time. The best way to stop this is to open global.php and find (Line 333):
PHP Code:

'STANDARD_REDIRECT' 

and replace that with
PHP Code:

'STANDARD_REDIRECT',
'bp_header' 


jcr 05-06-2004 05:00 PM

Ahh.. Thank you so much! :D


All times are GMT. The time now is 08:17 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.02298 seconds
  • Memory Usage 1,723KB
  • 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
  • (5)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