![]() |
I tried doing it like that:
Code:
<vb:if condition="!$bbuserinfo[field10] == 'Hide'"> <vb:if condition="$bbuserinfo[field10] == 'Show'"> It didn't show anything as default. When I turned it to <vb:if condition="!$bbuserinfo[field10] == 'Hide'"> It did show the buttons before changing the settings, it did hide them after clicking hide, but when choosing Show, it doesn't show them anymore. |
For understanding:
You want to make an option for your users, to switch them off in UCP? |
Make new profile-field and take radio-button with on/off-option.
Be sure to have "on as default". Code:
<vb:if condition="$show['guest'] OR $bbuserinfo[fieldX] == 'on'">Script</vb:if> |
That one surprisingly worked both ways, thankies.
EDIT: Ehh, nevermind, it also is problematic. The buttons just disappeared by default and won't show until the options are changed. The profile fields were set to use default http://prntscr.com/7vtjr, but it doesn't seem to work if you don't save the profile before, which is against the point of this, because I want people to see it first. EDIT2: in one of previous codes something like this was used to prevent such situation <vb:if condition="$bbuserinfo[field8] != ''">{vb:raw bbuserinfo.field8}<vb:else />1</vb:if> But I'm not sure where to add != '' because I was doing it wrong I think, I was getting an error. EDIT3: How to make ! (if not) conditionals? Maybe reversing the situation would work? EDIT:4 Fixed it by using <vb:if condition="$bbuserinfo[field10] == 'Hide'"><vb:else /> |
Thank You,
Great Work .. Installed |
Thanks this looks awesome xD
|
whenever i copy this i get this error
Code:
Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3453 |
This is clean, simple and fast. Compared to that last one I was using, this one blows that one away. I've installed it on 4.1.11 and 4.1.12 forums. Works fine.
|
Quote:
|
how can i make this visible only for users? to hide the option for guests
|
All times are GMT. The time now is 05:02 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:
|