Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 31 Mar 2012, 15:41
eviljoker7075 eviljoker7075 is offline
 
Join Date: Dec 2008
Display icon if user is n a specific user group

Can anyone help with a bit of code. I would like to add an icon in the postbit template next to a users post if the poster is in a specific user group.

Is this possible?

The closest I've got so far is:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But that just shows the icon next to all posts if the user you're logged in as is within that group.
Reply With Quote
  #2  
Old 31 Mar 2012, 15:57
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Real name: Iain
Try:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #3  
Old 31 Mar 2012, 16:34
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Or, how about just using Ranks?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #4  
Old 31 Mar 2012, 16:53
eviljoker7075 eviljoker7075 is offline
 
Join Date: Dec 2008
Originally Posted by Iain M View Post
Try:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thanks, does that work for additional usergroups too, or is there a different way of checking that?

I don't really want to use the user ranks as I want to expand this to more than just a line under the username, to include other features later down the line - but the thought did cross my mind

--------------- Added 31 Mar 2012 at 17:11 ---------------

Ah, I think I found it!


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #5  
Old 31 Mar 2012, 17:13
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Real name: Iain
For additional usergroups try $post['membergroupids']
Reply With Quote
  #6  
Old 31 Mar 2012, 17:18
eviljoker7075 eviljoker7075 is offline
 
Join Date: Dec 2008
Both of those work - is either better on performance etc?
Reply With Quote
  #7  
Old 31 Mar 2012, 17:22
Iain M's Avatar
Iain M Iain M is offline
 
Join Date: Jul 2005
Real name: Iain
I don't think either would have that much effect on performance. But your way would be tidier since that searches both the normal usergroups and additional usergroups =]
Reply With Quote
  #8  
Old 31 Mar 2012, 20:29
eviljoker7075 eviljoker7075 is offline
 
Join Date: Dec 2008
Excellent, thank you very much for your help
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:41.

Layout Options | Width: Wide Color: