PDA

View Full Version : Adding icons to postbits


bmckain
11-07-2007, 07:23 PM
Hi All,

I’m trying to add icons above or below the avatar to represent applications. I’ve seen this done but now that I am trying to implement it I am running into trouble.

The way I approached it was to create a User Profile Field with a multiple check box. I.E.,

Chose your app(s)

App 1, App 2, App 3 and so on

Then I added the following code

<!-- BEGIN POSTBIT-->
<if condition="$post[field5]">
<img src="$stylevar[imgdir_misc]/$post[field5].png" alt="$post[field5]" border="0" />
<else />
<img src="$stylevar[imgdir_misc]/Unknown.gif" alt="Unknown" border="0" />
</if>
<!-- END POSTBIT -->

I used this from another hack.

It does go to the right field but because there is more than one selection it gets confused and spits out a number, in this case 144.png under the avatar. There are icons with the exact same name as the selections. I've tried this as a single selection radio button and it works that way.

What I believe I need is a loop call for an array. Does anyone know how to do that in vB?

Thanks, I really appreciate the help.