PDA

View Full Version : Profile Field in Postbit - Displaying as #


youradhere4222
07-20-2008, 04:05 PM
Hello -

I included code in my postbit template to display a profile field in the postbit.

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$post[field7]"><div class="smallfont">Affiliation: $post[field7]</div></if>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: The bold, blue text is the text I added in. I'm also using the postbit that vbulletin.com is using, so I'm editing the postbit template, not the postbit_legacy template.

It is listed as field7, so I'm guessing I have the field right. It's a multiple-selection menu with 24 options, and a maximum of one can be selected. It's not private, it's not searchable but it does display on the Member's list.

The problem I'm experiencing is that the text Affiliation: shows up fine, but the text displayed isn't what I want. I'm looking for words - as those are the selections, but instead I'm getting numbers.

At first I selected the second option, and it displayed as a 2. Then I selected the last option, and it's displaying as 8388608.

Does anyone know what the problem could be?

SLR722
07-20-2008, 05:52 PM
What are the options here? I recently post on my blog. A modification for vBulletin Country Flags (http://www.k4z.org/blog/vbulletin-country-flags-modification/#comment-7) and you can see in my install how I have done it.

<!-- K4Z.ORG Country Flags Start -->
<if condition="$post['field5']">
Country: <img src="$stylevar[imgdir_button]/flags/$post[field5].gif" alt="Users Flag!" border="" />
</if>
<!--// K4Z.ORG Country Flags End -->

Title: Country Flag
Description:Add a country flag to your profile
Profile Field Category: (Uncategorized)
Options: Open the list.txt and copy and paste the whole file in here
Set Default: None
Display Order: 5 (Or whatever else is there)
Field Required: Yes, at registration and profile updating
Field Editable by User: Yes
Private Field: No
Field Searchable: No
Show on Members List: Yes
Allow user to input their own value for this option: No
Max length of allowed user input: SKIP
Field Length: SKIP
Regular Expression: SKIP
Display Page: Edit Your Details

I hope this helps. You can also try reading about the operator bits which are generated in multi choice with number options, check it out here..


How To Add A Profile Field To The Postbit (http://www.vbulletin.com/forum/showthread.php?t=108785)

:D

Opserty
07-20-2008, 07:16 PM
It's a multiple-selection menu with 24 options, and a maximum of one can be selected.
Doesn't limiting it to one select, defeat the purpose of a multiple selection option?

See the 2nd post of the link given above (How To Add A Profile Field To The Postbit (http://www.vbulletin.com/forum/showthread.php?t=108785))

youradhere4222
07-21-2008, 04:07 AM
Doesn't limiting it to one select, defeat the purpose of a multiple selection option?

See the 2nd post of the link given above (How To Add A Profile Field To The Postbit (http://www.vbulletin.com/forum/showthread.php?t=108785))

Ah - thank you. :)

That's way to difficult to understand; I guess I'll allow users to input their own choices.

SLR722
07-21-2008, 07:24 PM
You do not need to follow the binary operators. Mine works the same way and does not follow the operator erand..