PDA

View Full Version : How can this be accomplished? Postbit


smooth-c
01-20-2009, 11:44 AM
Hey guys, I have recently created my own little modification to my postbit where the member chooses their favourite album by an artist upon registering / in their usercp and it displays the album cover in the postbit.

http://img514.imageshack.us/img514/1042/minehiskc7.png

Using this code;

<div>
<if condition="$post['field5']">
<img src="images/albumimg/$post[field5].png" alt="$post[field5]" border="0" />
</if>
</div>

Now, when I done this I removed my arcade trophy postbit code, which is

<div class="smallfont">$post[crowns]$post[champtext]</div>

There are some of my users who prefer to keep the arcade postbit rather than the album image, is it possible to allow users to choose which "mod" they'd like to show via userprofile field? and if so, how?

Thanks for reading! Hope someone can help :)

Greg

Lynne
01-20-2009, 02:14 PM
Create another profile field "Would you like to show your album instead of your arcade trophies" (or whatever > Yes or No, then get the field number (fieldX) and do something like:
<if condition="$post['fieldX'] == 'Yes'">
album code
<else />
trophy code
</if>