![]() |
Images displayed before Username for certain Usergroups
Hi Guys,
I need to know if there is a plugin out there, that allows me to set an option to display an image before the username; if a user is in a certain usergroup. If not, how would I go about creating one, so it displays everywhere on my forum? I know this can be done with HTML Mark-up, but I want it done my way, so that the HTML Mark-up of this group, don't interfere with other Usergroups. Example: A user can be Premium and apart of this group with the image still displayed left of their username, without affecting the username colour. Any help is appreciated. |
I'm not sure if this exists already, but you could create a plugin using hook fetch_musername and add image code to $user['musername']. Like:
Code:
if (is_member_of($user, X)) |
Quote:
But is this; If User is UserID add image or If user is a member of UsergroupID add images? The second would be preferred ofcourse, but I shall try this nonetheless. |
Quote:
The second one. 'X' is a groupid, and can be the primary group or any secondary group. (BTW, you can also list more values if you want, like is_member_of($user, X, Y, Z...);) |
Quote:
Code:
Parse error: syntax error, unexpected ':' in /home/tactical/public_html/includes/functions.php(1620) : eval()'d code on line 3 |
Oops, there was a typo - should have been ')' instead of ':' -
Code:
if (is_member_of($user, X)) Also you need to be careful to use single quotes in your img tag. If you still get an error, post your exact code here. |
Works brilliantly, thanks KH99, great help as always.
Also to anyone who's trying this and wants text to be displayed when hovering over the Image. Change this: Code:
<img src='X'> Code:
<img src='X' title='Y'> Tested and working http://screensnapr.com/e/4ybRYT.png |
All times are GMT. The time now is 05:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|