PDA

View Full Version : Create custom variables?


nothing4me
07-16-2008, 08:48 PM
I want to create a variable for VBulletin. It will request some SQL information and the parse it into a variable. So like:
$variablename = mysql_query("SELECT * FROM tablename");// Count rows

How would I make this "$variablename" forum global so I can use it in any VBulletin templates?

Marco van Herwaarden
07-17-2008, 08:41 AM
Put it in a plugin that is executed on each page. You might have to use a "global $myvariable;" in the plugin to bring it into scope.

nothing4me
07-17-2008, 12:15 PM
Put it in a plugin that is executed on each page. You might have to use a "global $myvariable;" in the plugin to bring it into scope.Yea, I found a tutorial on that in did it. :)