PDA

View Full Version : Help Displaying Pic In Postbit Legacy


Thamelas
12-12-2009, 06:56 PM
Guys I'm hoping you can help me. I'm trying to get a small picture to display based on a user selection in their user details. I can't get it to display correctly. It will post both options and the word "Array" next to it. Can someone take a look and tell me what I'm doing wrong?

Here is a picture of how the code appers on the forum:

https://vborg.vbsupport.ru/external/2009/12/136.jpg

Here is the code:

<if condition="$post['field11']"><if condition="alliance">$post<img src="http://www.wowguideonline.com/forum/images/andromeda/misc/alliance-icon.gif"></if><if condition="horde">$post<img src="http://www.wowguideonline.com/forum/images/andromeda/misc/horde-icon.gif"></if><else />$post[field11]</if>

kh99
12-12-2009, 07:03 PM
I think probably the "Array" comes from the "$post" that's just before <img...

ETA: I'm guessing you want something like this:

<if condition="$post['field11'] == 'alliance'">
<img src="http://www.wowguideonline.com/forum/images/andromeda/misc/alliance-icon.gif">
<else />
<if condition="$post['field11'] == 'horde'">
<img src="http://www.wowguideonline.com/forum/images/andromeda/misc/horde-icon.gif">
<else />
$post[field11]
</if>
</if>

Thamelas
12-12-2009, 07:08 PM
Actually I solved it! Here's what I did:

<if condition="$post['field11']"><div><img src="http://www.wowguideonline.com/forum/images/misc/$post[field11].gif" /></div></if>

A lot simpler!

Thanks for helping me though. :)