![]() |
Quote:
Code:
<vb:if condition="$show['guest'] AND THIS_SCRIPT == 'index'"> |
Quote:
thanks lynne but this will occur Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3416 The following error occurred when attempting to evaluate this template: %1$s 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 |
Change the = to == and try again. :)
|
How can I create a condition based on "Social Groups" (no user groups)? I tried this but it didn't work:
Code:
<vb:if condition="($bbuserinfo['groupid'] <> 2) "> |
Where are you trying to use this conditional?
|
I want to use it in the footer template.
My site uses a floating tool bar. For members that want to hide the tool bar all together, I want to allow them to add themselves to the social group, "Hide Tool Bar". I then want to use the conditional to hide the tool bar code if the user is a member of this social group. |
Quote:
Luckily however vBulletin has a built in feature, publicly joinable usergroups that should work exactly as you describe. In your Usergroup manager in Admin CP, make a new usergroup based off of registered users. Set the option to make it a publicly joinable usergroup. Call it "Hidden Toolbar" or whatever. Members can join it via the User CP -> Group Memberships And then you can use the standard condition: Code:
<vb:if condition="is_member_of($bbuserinfo, X)"> OR... now that I've typed that out... The "right" way of doing this would be using a Custom Profile Field. In Admin CP make a New Custom Profile Field... Basically a "Yes/No" option to turn on/off the toolbar... Then you would use a condition like: Code:
<vb:if condition="$bbuserinfo['fieldX'] == 'Yes' "> I can give you more details on this if you think it will work for your needs. |
I used the custom profile field solution. Thank you so much!!!!
|
Is there a conditional to use if one would like to show something only to the member who posted the post?
For example: I created a custom field that I would like for the member to enter information into that s/he and the admin can see when posted, but no other members can see. (A secure field - if you will). Thanks, Kether |
You could do a condition to show code only to the user who posted it...
Code:
<vb:if condition="$bbuserinfo['userid'] == $post['userid']"> But you'd still need to make the extra field to hold the data and everything else needed to process it. The conditional is the easy part. |
All times are GMT. The time now is 02:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|