The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hey Guys,
I have got a Custom Profile Field and it acts like a status. Similar to Online and Offline, but Active or Non-Active. What I'd like to do is when a User Selects the "Non-Active" option, a Notice appears saying that the status is "Non-Active" please change to Active. What coding do I need to do this? Thanks |
#2
|
||||
|
||||
![]()
depends what template you want to put it in. But I would imagine something like this
OPTIONS FOR DROPDOWN Non-Active [has an id of 0] Active [has an id of 1] Code:
<vb:if condition="$bbuserinfo['field#'] == 0"> <p style="margin:15px 0;padding:8px;background:#ff0000;color:#333;">Please change to active!</p> </vb:if> |
#3
|
|||
|
|||
![]()
Okay, the coding is right, but changing the "0" and "1" isn't actually changing anything. I'm working on 4.2.0 PL3 if that helps
|
#4
|
||||
|
||||
![]()
i see no custom dropdown profile field on your site.
--------------- Added [DATE]1360256533[/DATE] at [TIME]1360256533[/TIME] --------------- try == '1' instead of == 1 --------------- Added [DATE]1360257340[/DATE] at [TIME]1360257340[/TIME] --------------- Code:
<vb:if condition="$bbuserinfo['field11'] == 'Off Active Duty'"> <p style="margin:15px 0;padding:8px;background:#ff0000;color:#333;">Please change to active!</p> </vb:if> --------------- Added [DATE]1360257519[/DATE] at [TIME]1360257519[/TIME] --------------- If that doesnt work then try "Second Option Selected" Code:
<vb:if condition="$bbuserinfo[field11] & 2"><p>STUFF</p></vb:if> ![]() |
#5
|
|||
|
|||
![]()
It's done via radio buttons. And neither of those codes work. :/
|
#6
|
||||
|
||||
![]()
What template are you posting these in? header/navbar?
|
#7
|
|||
|
|||
![]()
I'm doing it via a notice
|
#8
|
||||
|
||||
![]()
May be a bug as
Code:
<vb:if condition="$bbuserinfo['field11'] == 'Off Active Duty'">STUFF</vb:if> |
#9
|
|||
|
|||
![]()
Got it to work!
![]() |
#10
|
||||
|
||||
![]()
try using a dropdown single-selection and these conditionals. may just be with radio button.
--------------- Added [DATE]1360259313[/DATE] at [TIME]1360259313[/TIME] --------------- What was the code that worked? I am curious. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|