PDA

View Full Version : Small image in postbit for only one usergroup. How do I do it?


KipLarson
04-20-2007, 06:05 PM
Small image in postbit for only one usergroup. How do I do it?

I have a premium usergroup that I want to thank for showing their support by subscribing to the site by placing a little image in the postbit for them.

What is the easiest way to do this? Their usergroup number is 15. Is this the correct way to do it?:

<if condition="!is_member_of($bbuserinfo, 15) ">

Or is it supposed to be something else?

Thanks in advance.

Brad
04-20-2007, 09:03 PM
Use this;

<!-- Is user a member of usergroupid 15? -->
<if condition="is_member_of($vbulletin->userinfo, 15)">

<!-- User is in the correct group, so show the image -->
<img src="http://www.example.com/path/to/your/image.gif" alt="some image" />
</if>

KipLarson
04-20-2007, 11:26 PM
Oh ok. Thanks.

By the way, does a "!" mean "not"? Because if that's the case, I could probably just use the code I had above (as long as I took out the "!" symbol).

I'm just wondering. (although I'll probably just use the code you posted).

Nudda
04-21-2007, 03:45 AM
user ranks is the easier way to do this

admin cp --> user ranks

KipLarson
04-21-2007, 02:24 PM
Hmmm, I hadn't thought of that.

You're basically saying to just go into the user ranks in the admin cp and give an image to the usergroup I desire and I can just forget about dealing with if conditionals in the postbit?

The only problem I see that having is that I wouldn't be able to place the image in the right location of the postbit (right above the "online" button)

Semere79
04-21-2007, 03:59 PM
Use this;

<!-- Is user a member of usergroupid 15? -->
<if condition="is_member_of($vbulletin->userinfo, 15)">

<!-- User is in the correct group, so show the image -->
<img src="http://www.example.com/path/to/your/image.gif" alt="some image" />
</if>

What would be the seperator to this if I wanted to allow multipule users to see certain thing but they are in different groups? Like 15,17,22,45 or whatever?

KipLarson
05-01-2007, 01:40 AM
<!-- Is user a member of usergroupid 15? -->
<if condition="is_member_of($vbulletin->userinfo, 15)">
<!-- User is in the correct group, so show the image -->
<img src="http://www.gamingvidz.com/forum/gamingvidz/misc/premium.jpg" alt="Premium Member" width="204" height="28" border="0" />
</if>


This doesn't work :(

<if condition="is_member_of($bbuserinfo, 15) ">
<a href="http://www.gamingvidz.com/forum/payments.php" target="_blank"><img src="http://www.gamingvidz.com/forum/gamingvidz/misc/premium.jpg" ph" alt="GV Premium Member" border="0" /></a>
</if>

This doesn't work either? Any ideas on how to fix this besides user ranks? I don't want to use those.

Please help.