Announcement

Collapse
No announcement yet.

How to use get_template() to call a variable template?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use get_template() to call a variable template?

    I'm using vBulletin 2.3.4 and I'm trying to get a variable template name to be used in the get_template() function, but I'm not sure about the syntax. I've searched this forums and vb.org with many different phrases and haven't found anyone asking about this, or a solution. Here's what I'm doing...

    I've got a variable called $order and the value can change to one of 5 different template names that exist in the templates table. $order has the correct name that I want when I want, but using the following statement doesn't work to get the template name that the $order variable is set to:

    PHP Code:
    eval("\$thumbnail = \"".gettemplate('$order')."\";"); 
    I've tried several different variations such as:

    PHP Code:
    eval("\$thumbnail = \"".gettemplate('."$order".')."\";");
    eval(
    "\$thumbnail = \"".gettemplate('."\"$order\".')."\";");
    eval(
    "\$thumbnail = \"".gettemplate('"$order"')."\";"); 
    but none of them work either! If I call the templates directly using:

    PHP Code:
    eval("\$thumbnail = \"".gettemplate('thumbnail1')."\";"); 
    it works but will only pull thumbnail1 all the time. Any help would be appreciated so I can get this working.
    `,,`,,`
    AJ
    AJ's VPinMAME Table Downloads
    Visual Pinball Forums
    `,,`,,`
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X