PDA

View Full Version : Image Before or After Username in postbit


bouncer18
06-07-2006, 01:43 AM
I am looking to put a small image infront/behind the username in the Postbit...

Unfortuantlly, the only way i know of doing this was through the rank system however this time i rather use an If/Then type statement if possible..

ie:

If userid = 2 then show a xxx.gif after username..

does this make sense? I have a board with lots of members and only 1 license.. i am afraid to mess up anything just because i wanna put a image infront/behind someones name

Thanks to those that can help

Zachery
06-07-2006, 04:08 AM
<if condition="$post[userid] == X">imgcode</if>

Edit the postbit template and put it where you want.

bouncer18
06-08-2006, 10:20 PM
cant you make it take up like... 8 lines of code so i dont feel retarded..

thanks for your help. Appreciate it

Zachery
06-09-2006, 08:35 AM
I've been doing this alot for 4-5 years now, don't feel so bad ;)

LT Mote
05-13-2010, 05:33 PM
Will this also work in vB4?

Zachery
05-13-2010, 07:14 PM
<vb:if condition="$post[userid] == x">something here</vb:if>

BirdOPrey5
05-17-2010, 01:39 AM
Another way to do this is like I do it... different usergroups have a different badge or medal next to their names... admins, mods, premium, and ultra-premium users all have their own graphic. You can visit my forums to see it; http://www.juot.net/forums/ They show up in the post bit and also in the who's logged in section at the bottom of the main forum page.

To do this just add the HTML <img> code to the "Username HTML Markup" in the usergroup editor. If you want it before the username put it in the opening box, if you want it after the username, like me, put it in the closing HTML box... make sure you add the border=0 attribute so you don't get an ugly border in Internet Explorer. If you are going to use a different image for each user then this is a pain but in that case that is what avatars are for. My guess is you just have a handful of images so usergroups is probably a good way to go... make a custom usergroup with the same settings as registered users with the img tag in the proper "Username HTML Markup" box... make sure each user's "Display Group" is set to default and the "Primary Usergroup" is one of the new ones you created.