Ishimaru-Design Graphic design, analyses, tips for your boards, sites, blogs
|
View previous topic :: View next topic |
Author |
Message |
Ishimaru Chiaki ID Admin
Joined: 12 Nov 2007 Age: 24 Posts: 230 Location: Where the western wind always blows | Thanks Blood for the avatar ^^
|
Posted: Thu Dec 20, 2007 12:54 am Post subject: Add-ons for Simple Colored Usergroups MOD |
|
|
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 open this topic 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.
Here is the list of addons.
- Add-on for Simple Subforums MOD
- Add-on for Birthday MOD
- Add-on for Watched Topics MOD
- Add-on for Admin Userlist MOD
More add-ons might come later, as I do local testing. _________________ Rest in peace brave warrior, among those who lost their battle against cystic fibrosis before you.
Last edited by Ishimaru Chiaki on Thu Dec 20, 2007 1:11 am; edited 1 time in total |
|
Back to top |
|
|
Ishimaru Chiaki ID Admin
Joined: 12 Nov 2007 Age: 24 Posts: 230 Location: Where the western wind always blows | Thanks Blood for the avatar ^^
|
Posted: Thu Dec 20, 2007 12:58 am Post subject: |
|
|
1- Add-on for Simple Subforums MOD
If you installed this MOD, here are the directions to follow, so the usernames and groups will be colored in the subforums block in viewforum.php
Get your Wordpad/Notepad++ ready !
OPEN
FIND
Code: | $subforum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>'; |
BEFORE, ADD
Code: | $mod_color = ($user_color = color_groups_user($row['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : ''; |
IN LINE, FIND
IN LINE, BEFORE, ADD
' . $mod_color . '
FIND
Code: | $sql = "SELECT aa.forum_id, g.group_id, g.group_name |
IN LINE, FIND
IN LINE, AFTER, ADD
FIND
Code: | $subforum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>'; |
BEFORE, ADD
Code: | // unserialize group color
$row_group_colors = unserialize( $row['group_colors'] );
// get color for current style
if ( ! $userdata['session_logged_in'] )
{
$group_color = $row_group_colors[ $board_config['default_style'] ];
}
else
{
$group_color = $row_group_colors[ $userdata['user_style'] ];
}
$mod_group_color = ( !empty( $group_color ) ) ? 'style="font-weight:bold;color: #' . $group_color . '" ' : ''; |
IN LINE, FIND
IN LINE, BEFORE, ADD
Code: | ' . $mod_group_color . ' |
FIND
Code: | $last_post .= ( $subforum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($subforum_data[$j]['post_username'] != '' ) ? $subforum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $subforum_data[$j]['user_id']) . '">' . $subforum_data[$j]['username'] . '</a> '; |
BEFORE, ADD
Code: | $style_color = ($user_color = color_groups_user($subforum_data[$j]['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : ''; |
IN LINE, FIND
IN LINE, BEFORE, ADD
Code: | ' . $style_color . ' |
SAVE AND CLOSE FILE _________________ Rest in peace brave warrior, among those who lost their battle against cystic fibrosis before you. |
|
Back to top |
|
|
Ishimaru Chiaki ID Admin
Joined: 12 Nov 2007 Age: 24 Posts: 230 Location: Where the western wind always blows | Thanks Blood for the avatar ^^
|
Posted: Thu Dec 20, 2007 1:02 am Post subject: |
|
|
2- Add-on For Birthday MOD
If you installed the Birthday MOD, here are the directions to follow, so the members who are having a birthday today or shortly will be shown with their group color.
Get your Wordpad/Notepad++ ready !
OPEN
FIND
Code: | $color = '';
if ( $row['user_level'] == ADMIN )
{
$color = ' style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$color = ' style="color:#' . $theme['fontcolor2'] . '"';
}
|
REPLACE WITH
Code: |
// COLOR GROUPS ADDON FOR BIRTHDAYS
$color = ($user_color = color_groups_user($row['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';
$username = '<span ' . $color . '>' . $username . '</span>';
// COLOR GROUPS END
|
FIND
Code: |
$user_birthdays[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $color . '>' . $row['username'] . '</a>' . $age;
|
IN LINE, FIND
IN LINE, BEFORE, ADD
FIND
Code: | $color = '';
if ( $row['user_level'] == ADMIN )
{
$color = ' style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$color = ' style="color:#' . $theme['fontcolor2'] . '"';
} |
REPLACE WITH
Code: |
// COLOR GROUPS ADDON FOR BIRTHDAYS
$color = ($user_color = color_groups_user($row['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';
$username = '<span ' . $color . '>' . $username . '</span>';
// COLOR GROUPS END
|
FIND
Code: | $upcoming_birthdays[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $color . '>' . $row['username'] . '</a>' . $age; |
IN LINE, FIND
IN LINE, BEFORE, ADD
SAVE AND CLOSE FILE _________________ Rest in peace brave warrior, among those who lost their battle against cystic fibrosis before you. |
|
Back to top |
|
|
Ishimaru Chiaki ID Admin
Joined: 12 Nov 2007 Age: 24 Posts: 230 Location: Where the western wind always blows | Thanks Blood for the avatar ^^
|
Posted: Thu Dec 20, 2007 1:07 am Post subject: |
|
|
3- 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
FIND
Code: | $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&" . POST_USERS_URL . '=' . $watch_rows[$i]['poster_id']) . '">' . $watch_rows[$i]['last_username'] . '</a> '; |
BEFORE, ADD
Code: | $last_poster_color = ($user_color = color_groups_user($watch_rows[$i]['poster_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : '';
|
IN LINE, FIND
IN LINE, BEFORE, ADD
Code: | ' . $last_poster_color . ' |
FIND
Code: | $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&" . POST_USERS_URL . '=' . $watch_rows[$i]['topic_poster']) . '">' . $watch_rows[$i]['author_username'] . '</a> '; |
BEFORE, ADD
Code: | $topic_poster_color = ($user_color = color_groups_user($watch_rows[$i]['user_id'])) ? 'style="font-weight:bold;color: #' . $user_color . '" ' : ''; |
IN LINE, FIND
IN LINE, BEFORE, ADD
Code: | ' . $topic_poster_color . ' |
SAVE AND CLOSE FILE _________________ Rest in peace brave warrior, among those who lost their battle against cystic fibrosis before you. |
|
Back to top |
|
|
Ishimaru Chiaki ID Admin
Joined: 12 Nov 2007 Age: 24 Posts: 230 Location: Where the western wind always blows | Thanks Blood for the avatar ^^
|
Posted: Thu Dec 20, 2007 1:09 am Post subject: |
|
|
4- 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
Code: | admin/admin_userlist.php |
FIND
Code: | $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
Code: | // 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 _________________ Rest in peace brave warrior, among those who lost their battle against cystic fibrosis before you. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Design by Ishimaru-Design
|