PDA

View Full Version : Need Help - Custome Profile Fields.


Xaices
04-05-2007, 01:23 PM
I am having difficulty getting my custome user profile fields information to display correctly in the postbit.

I am using the following code:

<if condition="$post['field5']"><div class="smallfont" style="background-color: #261d0c; padding: 4px; border-bottom: 2px solid #0e0b04;"><strong>Class:</strong> $post[field5]</div>
<div style="padding-top: 4px;"></div>
</if>


The background cellpadding border all that displays correctly. Even Class: shows up. Where I am running into problems is 'field5'. It is not displaying the correct information.

For my user profile it should display:

Class: Dread Knight

How ever it is displaying:

Class: 8

For the life of me I can not figure out where it is pulling that "8" from or why it is displaying 8 rather than Dread Knight.

Is there something wrong with the way I coded it?

Thanks for any help ahead of time!

p.s. Here is a link to demonstrait what I am talking about IRE Recruitment Message - IRE (http://www.ire-guild.org/forums/showthread.php?t=77) notice right side of post bit user profile fields display.

Triky
04-05-2007, 01:28 PM
Try to control again the configuration of your custom user field. Maybe it contain the error.

However, if you've set your custom profile field with Options, you could use this type of code:


<if condition="$post['fieldX'] & 1">
CODE TO DISPLAY IF OPTION 1 IS SELECTED
</if>
<if condition="$post['fieldX'] & 2">
CODE TO DISPLAY IF OPTION 2 IS SELECTED
</if>
<if condition="$post['fieldX'] & 4">
CODE TO DISPLAY IF OPTION 3 IS SELECTED
</if>
<if condition="$post['fieldX'] & 8">
CODE TO DISPLAY IF OPTION 4 IS SELECTED
</if>
<if condition="$post['fieldX'] & 16">
CODE TO DISPLAY IF OPTION 5 IS SELECTED
</if>
<if condition="$post['fieldX'] & 32">
CODE TO DISPLAY IF OPTION 6 IS SELECTED
</if>
<if condition="$post['fieldX'] & 64">
CODE TO DISPLAY IF OPTION 7 IS SELECTED
</if>
<if condition="$post['fieldX'] & 128">
CODE TO DISPLAY IF OPTION 8 IS SELECTED
</if>

Xaices
04-05-2007, 01:32 PM
Sorry Triky I do not fully understand what you are trying to tell me.

edit: ok now that you have added the code in I will give it a go see what comes of it.

Triky
04-05-2007, 01:42 PM
With "configuration of your custom profile field", I mean: Go to -> AdminCp -> User Profile Fields -> Edit your own -> Check if it's all ok.

Xaices
04-05-2007, 02:43 PM
Found the problem and you were right. I had multiple line selection not single line.

Some times the most simple of things I overlook.

Thanks for your help.

Triky
04-05-2007, 02:47 PM
No problem! :)