The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How To Display Multiple Selection Profile Fields
<a href="http://www.vbulletin.com/forum/showthread.php?t=108785" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=108785</a>
Ok, so I've seen this thread and all, but I'm trying to figure out a way to have it automatically grab the appropriate field info for each checkbox. Not entirely sure where to look / call for that info. Any ideas? |
#2
|
||||
|
||||
Bump. Anyone have an idea, or need more info?
|
#3
|
|||
|
|||
Ditto for me. I need this, too.
I can't figure out that post either. I need to be able to display the data. |
#4
|
|||
|
|||
I know what you are wanting to do, but to do it automatically without doing the massive conditional set I don't think is possible - I could be proven wrong there though.
|
#5
|
||||
|
||||
not looking for a way around the conditional, just a way to grab the appropriate info after the conditional is met.
|
#6
|
|||
|
|||
ah, well the only way to do it properly is the way that is posted in the thread you linked to.
|
#7
|
||||
|
||||
The thread DOESN'T say how to show the info though.
To clarify: that thread only gives code that allows you to detect if a particular checkbox is checked, and if so, to do <SOMETHING>. I'm looking for additional code that will ultimately display the checkbox field's name. Example: Let's say you have three checkboxes, A, B, C. You check A and C. Currently with the linked to code, you can detect which boxes were checked, but not pull and display the name of the checkbox, unless I'm missing something. If so, please correct me. |
#8
|
|||
|
|||
With multiple selection profile fields I'm 99% sure that you have to hardcode what you want them to display as the output is the option number values.
So for example, lets say that field 7 is about pets, then you would have Code:
<if condition="$comma = ''"></if> <if condition="$post['field7'] & 1"> $comma Dog <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 2"> $comma Cat <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 4"> $comma Rabbit <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 8"> $comma Hamster <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 16"> $comma Horse <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 32"> $comma Fish <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 64"> $comma Snake <if condition="$comma = ', '"></if> </if> <if condition="$post['field7'] & 128"> $comma Bird <if condition="$comma = ', '"></if> </if> |
#9
|
|||
|
|||
I have profile drop downs for Year, Make, Model for an automotive website and to display the info in the postbit I use this....
Code:
<if condition="$post['field11'] AND $post['field12'] AND $post['field13']"><div><b>$post[field11] $post[field12] $post[field13]</b></div></if> |
#10
|
||||
|
||||
Quote:
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|