Uniphix
05-02-2006, 10:21 PM
Hello there,
I am trying to do something to save me from creating hundreds upon hundreds of "on site pages" and just use templates :) if you know what i mean...
I am currently trying to create a global function to grab things from arrays that have information I need...
Example::
$rsql = "SELECT r.name, r.description, r.index, r.str, r.strcap, r.dex, r.dexcap, r.int, r.intcap, r.classes, r.image FROM " . TABLE_PREFIX . "races AS r";
$rresult = $vbulletin->db->query($rsql);
$raceinfo = $vbulletin->db->fetch_array($rresult);
so inside the templates I can do something like this
<if conditon="$raceinfo[name]==$pagetitle">
//do my stuff here, where I can get all the values based on the Race Name to == the same as the $pagetitle from the vba's page title...
</if>
My problem is I cannot seem to get this to work how can I get this to be globaly to every page I create that will use that template that way I don't need to add 50 templates for 50 races, and just have it display all the info based on the $pagetitle to == the $raceinfo[name]...
I am trying to do something to save me from creating hundreds upon hundreds of "on site pages" and just use templates :) if you know what i mean...
I am currently trying to create a global function to grab things from arrays that have information I need...
Example::
$rsql = "SELECT r.name, r.description, r.index, r.str, r.strcap, r.dex, r.dexcap, r.int, r.intcap, r.classes, r.image FROM " . TABLE_PREFIX . "races AS r";
$rresult = $vbulletin->db->query($rsql);
$raceinfo = $vbulletin->db->fetch_array($rresult);
so inside the templates I can do something like this
<if conditon="$raceinfo[name]==$pagetitle">
//do my stuff here, where I can get all the values based on the Race Name to == the same as the $pagetitle from the vba's page title...
</if>
My problem is I cannot seem to get this to work how can I get this to be globaly to every page I create that will use that template that way I don't need to add 50 templates for 50 races, and just have it display all the info based on the $pagetitle to == the $raceinfo[name]...