The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Variable value based on time of day
I have a variable that I want to change based on the time of day. For example, it would have a specific value from 12:00mn to 7:00am and another value from 7:00am to 12:00mn, and so on and so forth. How do I do this?
|
#2
|
|||
|
|||
PHP Code:
|
#3
|
||||
|
||||
Can this go inside the template or the PHP files? How do I get the variable from the PHP to the template? Thanks!
|
#4
|
|||
|
|||
You can put it in global_start and it will be available in almost all templates.
|
#5
|
||||
|
||||
<span style="text-decoration: line-through">Thanks! How do you now display this variable in the template?</span>Never mind, I used template conditionals instead. Thanks!
|
#6
|
|||
|
|||
Well, if for example the code you put into global_start looked like
PHP Code:
|
#7
|
||||
|
||||
I couldn't get to display it inside a script tag by using:
PHP Code:
|
#8
|
|||
|
|||
nonono, just use $coolvariable inside templates. (by itself)
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|