The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have a chatbar mod for my board and I want users to be able to disable it if they wish. I have set up a profile field for simply "Yes" or "No" options and i've used this code in my footer template;
Code:
<if condition="$bbuserinfo['field17']=='Yes' OR $bbuserinfo['field17']=='No'> <!-- CometChat Footer Code Start --> <link type="text/css" rel="stylesheet" media="all" href="/discussion/cometchat/cometchatcss.php" charset="utf-8" /> <script type="text/javascript" src="/discussion/cometchat/cometchatjs.php" charset="utf-8"></script> <!-- CometChat Footer Code End --> </if> |
#2
|
||||
|
||||
![]()
You didn't close your condition quotes:
HTML Code:
<if condition="$bbuserinfo['field17']=='Yes' OR $bbuserinfo['field17']=='No'">
|
#3
|
|||
|
|||
![]()
I ended up using this code;
Code:
<if condition="$bbuserinfo['field17']=='Yes'"> By default, Yes is the option for my User Profile Field yet as soon as I applied the code, everyone complained that the chatbar had gone. After playing around, I worked out the only way to get it to show again was to set my option to "No, don't show" in the usercp, save changes then click "Yes, Show" and save changes and it'd show again. What's up with that? Wierd. Anyway I can get around this? + the bar no longer shows for guests ![]() I've also attached a screenshot of the userprofile field if needed- http://img707.imageshack.us/img707/5205/profilej.jpg Thank you |
#4
|
||||
|
||||
![]()
Did you set the profile field values and later change them? Have you looked to see what is in the database for this field? Another way to write the condition could be:
HTML Code:
<if condition="$bbuserinfo['field17']!='No'">
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|