The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
ok i have this code
$battlescene=$DB_site->query("SELECT name FROM rpg_battlescenes ORDER BY rand() LIMIT 1"); to select a random "name" entry from the db and i want to be able to use $battlescene in a template, i THOUGHT you would do this eval("\$battlescene = \"".gettemplate("battle_arena")."\";"); but for some reason it's not doing what i want it too, is the code right so far? also right under all that code is eval("dooutput(\"".gettemplate('battle_arena')."\" );"); does that have anything to do with how i would go about this? |
|
#2
|
||||
|
||||
|
you have to use $battlescene[name] within your template
|
|
#3
|
||||
|
||||
|
im gonna kick myself now
lol thanks xenon |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|