Log in

View Full Version : postbit code


ChU v2
01-06-2008, 10:34 AM
I'm trying to set some images by usergoups and I'm using this code:


<div align="center">
<if condition="$bbuserinfo['usergroupid'] == 6">
<img src="$stylevar[imgdir_misc]/admin.png">
</if>
<if condition="$bbuserinfo['usergroupid'] == 5">
<img src="$stylevar[imgdir_misc]/mod.png">
</if>
<if condition="$bbuserinfo['usergroupid'] == 8">
<img src="$stylevar[imgdir_misc]/banned.png">
</if>
<if condition="$bbuserinfo['usergroupid'] == 2">
<img src="$stylevar[imgdir_misc]/member.png">
</if>
</div>


Problem is it displays the admin.png image for every user and will not show any other image.

Opserty
01-06-2008, 01:01 PM
Hmm try:

<if condition="is_member_of($vbulletin->userinfo, 6)">
You image code here.
</if>


But take a look at "User Ranks" in your AdminCP it does pretty much what you want.

ChU v2
01-06-2008, 05:26 PM
Hmm try:

<if condition="is_member_of($vbulletin->userinfo, 6)">
You image code here.
</if>


But take a look at "User Ranks" in your AdminCP it does pretty much what you want.

That code didn't work. I've tried the User Ranks before and the images wont show up. I put $post[rank] I think the code is right?

--------------- Added 1199648511 at 1199648511 ---------------

Nevermind, got it. Had to run maintenance after putting User Ranks