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 Watched topics MOD

If you installed the Watched Topics MOD which adds a page where your members can view a list of topics they watch via a link in the link bar, here are the directions to color the usernames in this page.

Get your Wordpad/Notepad++ ready !

OPEN

watched_topics.php

FIND

           $last_poster = ($watch_rows[$i]['poster_id'] == ANONYMOUS ) ? ( ($watch_rows[$i]['last_username'] != '' ) ? $watch_rows[$i]['last_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $watch_rows[$i]['poster_id']) . '">' . $watch_rows[$i]['last_username'] . '</a> ';

BEFORE, ADD

        $last_poster_color = ($user_color = color_groups_user($watch_rows[$i]['poster_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';

IN LINE, FIND

href="

IN LINE, BEFORE, ADD

' . $last_poster_color . '

FIND

     $topic_poster = ($watch_rows[$i]['topic_poster'] == ANONYMOUS ) ? ( ($watch_rows[$i]['author_username'] != '' ) ? $watch_rows[$i]['author_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $watch_rows[$i]['topic_poster']) . '">' . $watch_rows[$i]['author_username'] . '</a> ';

BEFORE, ADD

        $topic_poster_color = ($user_color = color_groups_user($watch_rows[$i]['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';

IN LINE, FIND

href="

IN LINE, BEFORE, ADD

' . $topic_poster_color . '

SAVE AND CLOSE FILE

Previous - 0 comments - Next