The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Print PHP variable to screen.
Hey, this is my first attempt at any kind of vB mod, and im just wondering how you print a php variable created, to screen? (say, within the meta description tag - the variable has been declared within showthread.php)
Cheers in advance! |
#2
|
|||
|
|||
Depending on the location etc, you could use:
- Simply add the variable somewhere in a template that is shown on the page. - Use the PHP 'echo' comand (might not work on all locations within vBulletin or breaks the default page output, so only really usefull for debugging). |
#3
|
||||
|
||||
Quote:
But it doesn't look like you can just place the variable (for state of example, my varible is called $myvar straight into the template and expect it to be printed; do you have to do something to the variable declared within the showthread.php file first? |
#4
|
|||
|
|||
In the postbit you will probably have to use [minicode]$GLOBALS[yourvar][/minicode] as the postbit template is evaluated within a function. Typically you can just insert the variable ([minicode]$yourvar[/minicode]) straight into the template.
Trial and error is sometimes the best way to just figure things out. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|