php forum
php mysql forum
php mysql smarty
 
Topic Options
#245658 - 05/08/03 11:41 PM Username color default
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Is there a way to make a certain groups usernames a specific color instead of the "Normal" blue, maybe have it work like the default moderator color? <img src="/forum/images/graemlins/crazy.gif" alt="" />

Top
#245659 - 05/09/03 12:07 PM Re: Username color default [Re: bisbell]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Not without som modifications. The easiest way is to add a small hack that changes the color in the user table when they are added to the group, in the same way that the moderator color gets set.<br /><br />Use this query:<br />
Code:
<br />            $query = "<br />             UPDATE {$config['tbprefix']}Users<br />             SET U_Color  = '$Color_q'<br />             WHERE  U_Number = '$updateuser'<br />            ";<br />
_________________________
/Gardener | Complete list of my mods

Top
#245660 - 05/09/03 12:13 PM Re: Username color default [Re: c0bra]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Sounds good, bare with me here, where is the user table? <img src="/forum/images/graemlins/doah.gif" alt="" /><br /><br />I need group 5 usernames to be #FF6600

Top
#245661 - 05/09/03 12:34 PM Re: Username color default [Re: bisbell]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
It's a table in the database. To do what I'm suggesting you'll have to do some changes to the file admin/dochangeugroups.php to make it work.<br /><br />Something like this, find these lines:<br />
Code:
<br />      if ($HTTP_POST_VARS[$Id]) {<br />         if (!ereg("-$Id-",$Groups)) {<br />            $Groups .= "$Id-";<br />         }<br />      }<br />
<br />Change them into this:<br />
Code:
<br />      if ($HTTP_POST_VARS[$Id]) {<br />         if (!ereg("-$Id-",$Groups)) {<br />            $Groups .= "$Id-";<br />            $Groups .= "$Id-";<br />            // Set the number to the group to alter color<br />            $colorgroup = 5;<br />            // The color to set<br />            $colorcode = "#FF6600";<br />            if ( $Id == "$colorgroup" ) {<br />                $query = "UPDATE {$config['tbprefix']}Users SET U_Color = '$colorcode' WHERE  U_Number = '$User'";<br />                $dbh -&gt; do_query($query);<br />            }<br />         }<br />      }<br />
<br />Haven't tried the code, but it should update the username color when adding a user to the selected group. The color will stay the same if they are removed though, some more code will have to be added for that.
_________________________
/Gardener | Complete list of my mods

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks