Announcement

Collapse
No announcement yet.

I cant make a conditional work

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

  • cloferba
    replied
    Originally posted by Wayne Luke View Post
    Try:
    Code:
    <vb:if condition="$user['field8'] == 'Yes'">
    <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script>
    </vb:if>
    Though it would be really nice if we could delimit our template conditions with parenthesis.
    well...I come back to say that if I set Yes its not showed..
    and I donĀ“t know why, without a conditional it works. I have already check the Yes option with the options on the profile fields and are right :S

    Leave a comment:


  • Wayne Luke
    replied
    Try:
    Code:
    <vb:if condition="$user['field8'] == 'Yes'">
    <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script>
    </vb:if>
    Though it would be really nice if we could delimit our template conditions with parenthesis.

    Leave a comment:


  • cloferba
    replied
    Originally posted by Trevor Hannant View Post
    Oops! Change the 'field5' to 'field8'
    Yes, I did it, thats the reason why i dont understand the error :S

    Leave a comment:


  • Trevor Hannant
    replied
    Oops! Change the 'field5' to 'field8'

    Leave a comment:


  • cloferba
    replied
    Originally posted by Trevor Hannant View Post
    Try (not tested):

    Code:
    <vb:if ($user['field5'] == 'Yes'>
    <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script>
    </vb:if>
    In that case i get an error:
    Could not find phrase 'empty_if_condition'.

    Leave a comment:


  • Trevor Hannant
    replied
    Try (not tested):

    Code:
    <vb:if ($user['field5'] == 'Yes'>
    <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script>
    </vb:if>

    Leave a comment:


  • cloferba
    started a topic [Forum] I cant make a conditional work

    I cant make a conditional work

    Some people on my blog want to use cometchat and others not, but they want to hide it because it uses lot of cpu resources and make the site so slow,

    so, Im using:

    First I have created a new User Profile Field (a new field, field8) "Do you want to show Cometchat" with 2 options "Yes" and "No"

    The problem is that whatever is selected, the chat isnt showed

    On the footer I use:
    Code:
    <vb:if condition="$post['field8'] == 'Yes'">
    <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script>
    </vb:if>
    Can somebody explain me why every time i put the conditional the chat isnt showed? I think the conditional its ok
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X