vb.org Archive

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

PranK 01-30-2004 12:57 PM

calling custom templates?
 
Hi Guys,

I did search but i couldn't find exactly what i was after.

its kinda silly, but i am still trying to get my head around VBulletin!

I have made a template for my banner system, but i dont understand how I can call that in other templates? for example, in 'header', i put $template where i want it, but nothing comes up.... if i paste the code from the $template into the same spot - it all works!

sorry, i know i'm a lamer, but how do i make a template that i can call to from other templates?

Thanks in advance!

Christian

NTLDR 01-30-2004 01:15 PM

In whichever PHP file is delaing with the page put:

PHP Code:

eval("\$varname = \"".fetch_template('templatename')."\";"); 

Obviously replacing $varname with what you want in the template and templatename with the name of the template. DOn't forgot to add templatename to the $globaltemplates array at the top of the file.

PranK 01-30-2004 01:23 PM

thanks NTLDR, i just worked it out. :)

i did it a different way, it was probably wrong, but i created a new php file, put the contents in there, used an include to it from the page i wanted it on, then called for it in the template... after typing it, it seems that your way would be quicker/easier..

Christian


All times are GMT. The time now is 12:32 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.01073 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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