Ishimaru-Design > Home > Tutorials > phpBB2 > Simple Colored Usergroups Add-ons for MODs

[phpBB2] Simple Colored Usergroups Add-ons for MODs

  • Author : Ishimaru Chiaki
  • Posted on : 2013-10-24 05:17:21
  • Updated on : 2013-10-27 08:13:03
  • Comments : 0
  • Type : MODs Add-ons
  • Level : Newbie

The "Simple Colored Usergroups" MOD developed by kkroo, and its SCU_global patch are quite popular among phpBB2 admins and it's often used with other MODs.  So several phpBB2 admins might have noticed the usernames aren't colored in blocks or pages added by MOD installations, such as subforums and birthdays.
For this reason, I wrote this tutorial years ago in order to propose patches to adapt Simple Colored Usergroups to frequently used MODs.  These addons have been tested on a local phpBB 2.0.22 board and were used on Ishimaru Design when it used to run phpBB2.

Summary

  1. Add-on for Simple Subforums
  2. Add-on for Birthday MOD
  3. Add-on for Watched topics MOD
  4. Add-on for Admin Userlist MOD

Add-on for Admin Userlist MOD

Even if the Admin Userlist MOD is provided with a patch for colored usergroups, this patch isn't compatible with kkroo's Simple Colored Usergroups MOD.

So, if you use kkroo's MOD, follow these directions :

OPEN

admin/admin_userlist.php

FIND

            $style_color = '';
            if ( $row['user_level'] == ADMIN )
            {
                $row['username'] = '<b>' . $row['username'] . '</b>';
                $style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
            }
            else if ( $row['user_level'] == MOD )
            {
                $row['username'] = '<b>' . $row['username'] . '</b>';
                $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
            }

REPLACE WITH

            // SIMPLE COLORED USERGROUPS MOD START
            $style_color = ($user_color = color_groups_user($row['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';
            $username = '<span ' . $style_color . '>' . $username . '</span>';
            // COLOR GROUPS END

SAVE AND CLOSE FILE

Previous - 0 comments