Announcement

Collapse
No announcement yet.

[vb3] I have a php if conditional, please help how to write it in template

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

  • Joe D.
    replied
    Try this:

    Code:
    <if condition="$vbulletin->url == 'http://domain.com/forum/somepage.html'">
    </if>
    (single quotes round the URL)

    If it doesn't work simply put $vbulletin->url in the template (not in a conditional) and confirm it exists and holds the value you are expecting.

    Leave a comment:


  • [vb3] I have a php if conditional, please help how to write it in template

    this is if conditional for if the url is xxx, in php

    if ($vbulletin->url == 'http://domain.com/forum/somepage.html')
    {
    }

    i want to use it in template, please help what is looks like?






    i already tried this
    <if condition="$vbulletin->url == http://domain.com/forum/somepage.html">
    </if>
    but got error like this and cant save the template

    The following error occurred when attempting to evaluate this template:

    Parse error: syntax error, unexpected ':' in /home/username/public_html/includes/adminfunctions_template.php(3605) : eval()'d code on line 91

    This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Related Topics

Collapse

Working...
X