PDA

View Full Version : How do I make an image show up in the postbit for only one *additional* usergroup?


KipLarson
05-01-2007, 02:19 AM
How do I make an image show up in the postbit for only one *additional* usergroup?

i.e. number 15 in my usergroup is a premium usergroup. If you pay to join it, you are added to the addional usergroup (your primary remains unchanged).

How do I make an image show up in the postbit for people that belong to this "additional" usergroup?

HMBeaty
05-01-2007, 02:24 AM
Try this

<if condition="is_member_of($bbuserinfo, 15) "><img src="YOUR_IMAGE.gif" /></if>

KipLarson
05-01-2007, 02:32 AM
Nope. Doesn't work :(

4x4 Mecca
05-01-2007, 03:44 AM
This may not be clean code since it uses the array method, but some one can clean it up since I don't know the proper coding.
<if condition="in_array($bbuserinfo['usergroupid'], array(15))"> <img src="YOUR_IMAGE.gif" /> </if>

I would guess this would be the right code
<if condition="$bbuserinfo['usergroupid']==15"><img src="YOUR_IMAGE.gif" /> </if>

KipLarson
05-01-2007, 04:47 AM
Neither of those worked either :(

Is there something else I need to do in the usergroup manager to allow stuff like that to show up or something? I can't figure this out. For whatever reason, I use the same style of coding all over my site for various ads but now it won't work.

Hmmm

4x4 Mecca
05-01-2007, 05:23 AM
the first one i posted is working for me right now... so I don't know why it doesn't work for you

tobybird
05-01-2007, 08:45 AM
How do I make an image show up in the postbit for only one *additional* usergroup?

i.e. number 15 in my usergroup is a premium usergroup. If you pay to join it, you are added to the addional usergroup (your primary remains unchanged).

How do I make an image show up in the postbit for people that belong to this "additional" usergroup?

Since I don't use ranks on my board as intended...

I use the ranks feature to accomplish this. I have a paid members user group and this is the only group that gets the "rank" image. I've also moved the ranks code in the postbit to move the image further down.

KipLarson
05-02-2007, 05:54 PM
the first one i posted is working for me right now... so I don't know why it doesn't work for you

what is the width of the image you're using? Perhaps it's not working for that reason?

Man this is really frustrating. I'll look at the code again in a sec. Do you have it set up so that once the user pays to upgrade they keep their primary usergroup but are put into a premium user group as their additional one?

This is what I have in my postbit, but it doesn't work:

<if condition="in_array($bbuserinfo['usergroupid'], array(15))"> <img src="http://www.gamingvidz.com/forum/gamingvidz/misc/premium.jpg" /> </if>

And I made sure that the img src was typed in correctly too. Perhaps because I have the premium upgrade set up to just add them into the additional usergroup perhaps I need to add in every usergroup or something? I don't know... I'm frustrated.

Since I don't use ranks on my board as intended...

I use the ranks feature to accomplish this. I have a paid members user group and this is the only group that gets the "rank" image. I've also moved the ranks code in the postbit to move the image further down.

This doesn't help me. I'm already using ranks.

4x4 Mecca
05-02-2007, 06:54 PM
My exact code is as follows for the "Admin log in as user" mod. I didn't want to click their profile everytime to use it, so I have it so I have a tiny icon in there postbit.

<!-- Start Admin Log In As User -->
<if condition="in_array($bbuserinfo['usergroupid'], array(6))">
<a href="http://www.4x4mecca.com/forum/index.php?$session[sessionurl]u=$post[userid]&amp;admin_log_in_as_user=$post[userid]"><img class="inlineimg" src="http://www.4x4mecca.com/forum/images/kirsch/buttons/lastpost.gif" alt="Log in as $post[username]" border="0" /></a>
</if>
<!-- End Admin Log In As User -->

KipLarson
05-02-2007, 08:48 PM
I don't use this mod: "Admin log in as user" that you're referring to.

I'm just trying to use if conditionals to display an image for people that belong to an additional usergroup

tobybird
05-02-2007, 09:00 PM
Kip, try this: http://www.vbulletin.com/forum/showthread.php?t=206737&highlight=usergroup+conditionals

4x4 Mecca
05-02-2007, 10:44 PM
I know, you could change it easily to fit your needs though, like this

<if condition="in_array($bbuserinfo['usergroupid'], array(15))">
<img class="inlineimg" src="http://www.gamingvidz.com/forum/gamingvidz/misc/premium.jpg" alt="" border="0" /></if>

KipLarson
05-03-2007, 05:13 AM
Kip, try this: http://www.vbulletin.com/forum/showthread.php?t=206737&highlight=usergroup+conditionals

Thank you SOOO much. This is what I ended up with and it works great in my legacy postbit ;)

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