View Full Version : Templates and variables
PeF
Mon 6th Nov '00, 9:56am
I created a new template and i need to use $totalthreads $timenow etc variables in this template. They just work in forumhome template.
What i need to change or set?
Thx in advance...
Mike Sullivan
Mon 6th Nov '00, 10:00am
You need to find where those are set in index.php and copy them over to whereever your template is located (I mean the file where it's called from)
PeF
Mon 6th Nov '00, 10:16am
Oops. Sorry. Didn't catch it. :) I didn't find timenow or totalthreads in index.php.
Ok. Straightly to the point. :)
Here's my tiny news fader hack:
http://www.vbulletin.com/forum/showthread.php?threadid=4425
And here's what i'd like to solve:
http://www.vbulletin.com/forum/showthread.php?threadid=4452
I appreciate your help. Thank you.
Dark_Wizard
Sun 21st Jan '01, 10:41am
Has anyone resolved this? I am trying to accomplish the same thing and nothing shows up. You can see it here (http://www.islandncs.com/ad/index.php)
Wayne Luke
Sun 21st Jan '01, 12:42pm
Ed already posted the solution.
You need to go into index.php and either make it so those variables are parsed globally or copy them where the location of the code that calls your template is.
If you look at http://vbulletin.com/manual/templates.html you will see what templates are global and which aren't as well as what variables are available on what pages.
Dark_Wizard
Sun 21st Jan '01, 2:26pm
Now I feel stupid....thx for pointing me out to RTFM... :)
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.