The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Using custom profile field contents in condition
I want to create a custom permission for my members to allow them to hide their instant messaging information if they select a radiobutton.
So my question is if I have two radio buttons (Yes/No) called field9 how can I use that in a condition to hide or show content? I understand about vB conditionals but I always know I can't use vb:raw in a conditional - so how can I do it? Thanks in advance |
#2
|
||||
|
||||
Depends on what template you are using it in. If the variable is called $variable, then you would do something like:
HTML Code:
<vb:if condition="$variable['field9'] == 'Yes'">whatever if it is Yes</vb:if> |
#3
|
||||
|
||||
Thanks Lynne, you are once again very helpful as you have in the past
How could I find out the name of the variable required though? It would be put into the memberinfo, postbit and member list templates. |
#4
|
||||
|
||||
You'd look in the template. For instance, in the postbit template, the variable is called $post.
|
#5
|
||||
|
||||
Thanks Lynne for your help. Hopefully I'm sorted now
EDIT: Probably a daft question but is there a variable I can use to determine whether the user viewing the profile is the profile owner? I have searched but I'm not quite sure what I should be searching for if you see what I mean. |
#6
|
||||
|
||||
if $variable['userid'] == $bbuserinfo['userid']
$bbuserinfo['userid'] is you, the viewer, and then compare it to the variable userid. |
#7
|
||||
|
||||
Thanks Lynne - Now I know for the future!
Honestly your a saint |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|