Username:
Password:
Search for Plugins: Advanced
Please Sign in, Register or Resend Activation Email

Forums

  e107 Coders.org :: Forums :: E107 Plugins :: Suggest a Plugin
 
<< Previous thread | Next thread >>  
UserGroup colors?     Go to page       >>        
Author Post
ShareDXS
Mon Jun 11 2007, 10:17PM
Registered Member #57679
Joined: Mon Jul 24 2006, 09:20PM
Location:
Posts: 22
Is there a plugin where you can colourize a UserGroup like vBulletin does? phpBB also has it. [link] has it. It shows it in the 'Online now' and in the forum posts itself (the colors).

Example: Admins are ORANGE, Super Mods are RED, Mods are GREEN, VIP are BLUE, and so forth?
septor
Tue Jun 12 2007, 01:17PM
Registered Member #20
Joined: Mon May 05 2003, 01:58AM
Location: Michigan
Posts: 339
You have to modify the forum templates.
Back to top
Website
ShareDXS
Thu Jun 14 2007, 03:37AM
Registered Member #57679
Joined: Mon Jul 24 2006, 09:20PM
Location:
Posts: 22
Hmm...so what would I have to modify?
Back to top
Killerpope
Sat Jun 16 2007, 11:37AM

Registered Member #70860
Joined: Sun Jan 07 2007, 03:28PM
Location: Germany
Posts: 290
the code that makes the link to the user-profile and displays the name is the { POSTER } shortcode in the <e107-base>/e107_plugins/forum/forum_shortcodes.php file.
it's:

SC_BEGIN POSTER
global $post_info, $tp;
if($post_info['user_name'])
{
//Insert your logic here to modify the color of the link
    return "<a href='".e_BASE."user.php?id.".$post_info['user_id']."'><b>".$post_info['user_name']."</b></a>";
}
else
{
    /*some more code*/
}
SC_END


[ Edited Sat Jun 16 2007, 11:37AM ]
Back to top
Website
ShareDXS
Sun Jun 17 2007, 07:48PM
Registered Member #57679
Joined: Mon Jul 24 2006, 09:20PM
Location:
Posts: 22
So would I use a 'span' type code like vBulletin uses or 'font'

Example: to get red and bold...span would be:
<span style="color: red; font-weight: bold;">admin colour</span>

In font it would be:
<font color="red"><b>admin colour</b></font>

But what you told me changes everyone doesn't it? What if I want to only colour the specific userclass like Administrators, Moderators, Banned Members, and other custom usergroups I created all a different colour...what would I have to do then?

[ Edited Sun Jun 17 2007, 07:48PM ]
Back to top
Killerpope
Wed Jun 20 2007, 08:47PM

Registered Member #70860
Joined: Sun Jan 07 2007, 03:28PM
Location: Germany
Posts: 290
Killerpope wrote ...


//Insert your logic here to modify the color of the link
return "<a href='".e_BASE."user.php?id.".$post_info['user_id']."'><b>".$post_info['user_name']."</b></a>";


of course you'll have to check whether the user is an admin or not by checking if the constant ADMIN is true. I just wanted to show you where the code has to be changed. Now it's up to you to define who will get different colors
Back to top
Website
snpr swat
Thu Jun 21 2007, 07:38PM
Registered Member #81466
Joined: Wed May 30 2007, 11:55PM
Location:
Posts: 5
Could you possibly give us an example of what to put?
Back to top
Killerpope
Fri Jun 22 2007, 11:09AM

Registered Member #70860
Joined: Sun Jan 07 2007, 03:28PM
Location: Germany
Posts: 290
I've made a plugin: [link]
Back to top
Website
ShareDXS
Mon Jun 25 2007, 07:50PM
Registered Member #57679
Joined: Mon Jul 24 2006, 09:20PM
Location:
Posts: 22
Dude!!! This is AMAZING. =] Thanks a lot! Also, think you can make Head Admin and Admin separate? Other than that...this is AMAZING. =] Thanks a lot.
Back to top
Killerpope
Tue Jun 26 2007, 10:22AM

Registered Member #70860
Joined: Sun Jan 07 2007, 03:28PM
Location: Germany
Posts: 290
I updated the plugin. I've also included hacks for the forum, so the names are colored everywhere in the forum.
Back to top
Website
Go to page       >>   

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.2299 sec, 0.1430 of that for queries. DB queries: 47.