The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I access a new variable within a template?
I've used this tutorial to make a simple page. The goal is to create a movie viewer. I need to have access to a new variable inside of a template file so I can use conditionals on my new variable to make something happen.
For example here is my ideal template: HTML Code:
<div> <if condition="$my_new_variable">Do this</if> </div> |
#2
|
||||
|
||||
That's correct, you may want to add a value to it, such as
HTML Code:
<if condition="$my_new_variable == 1">.
PHP Code:
|
#3
|
|||
|
|||
Thanks
I'm not really sure why my variable wouldn't work before. All kosher now, thanks! |
#4
|
|||
|
|||
I have the same Problem:
I want to use a variable $tight_editor in my editor_toolbar_on template which i declared in my profile.php on the first hook which is called profile_start unfortunately in my editor i can't echo the variable any ideas |
#5
|
|||
|
|||
Should the variable be defined global?
|
#6
|
|||
|
|||
Hello,
I battled with a similar issue for quite some time and noticed the following: Lets say I want to display a debug variable in the header template like: HTML Code:
<div>$debugMsg</div> PHP Code:
This is great if you want your code to be in global_start, but what if you need it later? Does anyone know a simple way to change the already processed templates? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|