The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Multiple-Selection Checkbox in Postbit?
Hey everyone!
I've been editing my postbit to use custom user profile fields. I have one field that I want to be in the postbit that is a Multiple-Selection Checkbox type. Each person is to choose 3 options out of the 10 to be displayed. I'm trying to figure out a way to show one with a line break in between the next so that all three are neat and clean. Originally I figured they would show up fine but crammed together. For whatever reason when I chose some options as a test it gave me the number of the options. For example if I chose the first, third, and fifth options it would read 135. I'd like it to display the entered text with those line breaks. Does anyone have any idea how to do this? Thanks guys! EDIT: I am also curious if anyone knows how to display images instead of text as options in the postbit while still having the text option in the selection process. For example, I want to choose a profession that's listed. I select cook from the dropdown in the user cp. Then in the postbit it shows cook.gif or whatever it may be. Any ideas? Thanks |
#2
|
||||
|
||||
Multiple mods here (including mine) allow you to place the results of a multi-selection profile field into the postbit, and as you saw, it doesn't work. It's because the data is saved differently in this case.
It's possible if you know that a multi-selection profile field is specifically being called. You just have to use the data pulled from the standard profile field call (e.g. the result is 135) into a database call that gets the correct data. As for your edit question, something like this may work: Code:
<if $post['field5'] == "cook"> <img src="cook.gif" /> </if> |
#3
|
||||
|
||||
Ccan you give me a link to the hack/addon you're talking about please? I looked through your hacks but didn't see one for that specifically. Thank you again!
--------------- Added [DATE]1245994022[/DATE] at [TIME]1245994022[/TIME] --------------- Code:
<if $post['field5'] == "cook"> <img src="cook.gif" /> </if> When I try the following based on your advice I get an error Code:
<tr> <td><if condition="$post['field17']"></td> <td><div><B>Professions:</B> <if $post['field17'] == "Cook"> <img src="http://fainte.com/forums/images/lotro/guardian.png" /> </if></div> </if></td> </tr> Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /mnt/w0209/d36/s22/b029b64a/www/fainte.com/forums/includes/adminfunctions_template.php(3596) : eval()'d code on line 196 line 196 is the line where it says cook |
#4
|
||||
|
||||
Dropdown mod.
Yeah, looks like I had the semantics wrong on the if statement I suggested. Try this: Code:
<tr> <if condition="$post['field17']"> <td><div><B>Professions:</B> <if condition="$post['field17'] == 'Cook'"> <img src="http://fainte.com/forums/images/lotro/guardian.png" /> </if> </div></td> </if> </tr> |
#5
|
||||
|
||||
Code:
<tr> <if condition="$post['field17']"> <td><div><B>Professions:</B> <if condition="$post['field17'] == 'Cook'"> <img src="http://fainte.com/forums/images/lotro/guardian.png" /> </if> </div></td> </if> </tr> The only thing that changed is that now Professions: shows up but still no picture |
#6
|
||||
|
||||
May need to take the single quotes off of around Cook. Not 100% sure. Also, needs an alt tag (e.g. alt="Cook") after the src snippet.
Code:
<img src="http://fainte.com/forums/images/lotro/guardian.png" alt="Cook" /> |
#7
|
||||
|
||||
[QUOTE=Wired1;1837648]May need to take the single quotes off of around Cook. Not 100% sure. Also, needs an alt tag (e.g. alt="Cook") after the src snippet.
I've tried with single quotes and without. I've used an alt as well. Still no luck. Even without the image it doesn't work though. If you replace the image with a word like Cook then it doesn't work either. I think it may be something to do with the line above that. I was thinking I wonder if there is a way to say a specific option. The link to edit an option appears as Code:
http://fainte.com/forums/admincp/profilefield.php?do=renamecheckbox&profilefieldid=17&id=1 |
#8
|
||||
|
||||
Well the code will only work if the profile field contains that word. As I stated above, multiple selection fields don't contain it. It will contain 135 or whatever. You'd have to set the conditional for what's really in the field instead of Cook.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|