![]() |
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 |
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> |
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. |
You'd look in the template. For instance, in the postbit template, the variable is called $post.
|
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. |
if $variable['userid'] == $bbuserinfo['userid']
$bbuserinfo['userid'] is you, the viewer, and then compare it to the variable userid. |
Thanks Lynne - Now I know for the future!
Honestly your a saint :) |
All times are GMT. The time now is 02:26 PM. |
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:
|