![]() |
VB IF with custom field
I'm not very familiar with VB IF statements. I don't even know if I'm calling it the right thing. However, I do remember using an example I found on here some time ago to make text appear only for a certain usergroup.
I'm wondering if it is possible to link this with a custom field. Basically, I want to be able to allow the user to select if they want avatars on or off, on a particular template. Any help would be greatly appreciated. |
If you set up a custom user field (fieldx) and then if you want to turn off avatars if that is set to yes, then you could just write a plugin to do it or you could modify the template to do it. Something like:
<if condition="$bbuserinfo['fieldx'] == 'yes'"> stuff </if> |
That would be:
<vb:if condition="$bbuserinfo['fieldx'] == 'yes'"> stuff </vb:if> |
Whoops, Ozzy is correct. For some reason I thought I was in the vB3 forum, not the vB4 forum.
|
Thanks guys. I'll give it a go!
--------------- Added [DATE]1387754786[/DATE] at [TIME]1387754786[/TIME] --------------- Hi guys, I tried the above with no luck. Can you see if I've done something wrong here? Code:
<p> I got it to work by taking out the else statement and only using the conditional. Thanks very much guys, appreciate it! |
All times are GMT. The time now is 12:44 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:
|