Erstmal der Bugfix für die Moderatoren- und Admin-Marker sowie für die farbliche Hervorhebung der Moderatoren und Admins:
Öffne phoogle.php
Finde:
Code: Alles auswählen
// Get list of user_groups
$sql_ary = array(
'SELECT' => 'gt.group_id, gt.group_name, gt.group_colour, gt.group_type', // Add , gt.group_colour, gt.group_type
'FROM' => array(GROUPS_TABLE => 'gt'),
'WHERE' => ($allow_coppa) ? "gt.group_name != 'GUESTS' AND gt.group_name != 'BOTS'" : "gt.group_name != 'GUESTS' AND gt.group_name != 'BOTS' AND gt.group_name != 'REGISTERED_COPPA'",
'ORDER_BY' => 'gt.group_id'
);
Code: Alles auswählen
// Get list of user_groups
$sql_ary = array(
'SELECT' => 'gt.group_id, gt.group_name, gt.group_colour, gt.group_type, acr.role_type', // Add , gt.group_colour, gt.group_type
'FROM' => array(GROUPS_TABLE => 'gt', ACL_GROUPS_TABLE => 'agt', ACL_ROLES_TABLE => 'acr'),
'WHERE' => ($allow_coppa) ? "gt.group_name <> 'GUESTS' AND gt.group_name <> 'BOTS' AND agt.group_id = gt.group_id AND agt.auth_role_id = acr.role_id" : "gt.group_name <> 'GUESTS' AND gt.group_name <> 'BOTS' AND gt.group_name <> 'REGISTERED_COPPA' AND agt.group_id = gt.group_id AND agt.auth_role_id = acr.role_id",
'ORDER_BY' => 'gt.group_id'
);
Code: Alles auswählen
$group[$gid]['type'] = $group_info['group_type'];
Code: Alles auswählen
$group[$gid]['acl_role'][] = $group_info['role_type'];
Code: Alles auswählen
// These two are for the User Groups drop-down box (3 with the colour)
//$gsb = ucwords(strtolower(str_replace("_", " ", $group_info['group_name']))); --> replace this with the next
$gsb = ($group[$gid]['type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group[$gid]['name']] : $group[$gid]['name'];
$gsb_id = $group[$gid]['id'];
$gc = $group[$gid]['colour'];
$group_url = append_sid("{$phpbb_root_path}phoogle.php", "mode=groups&group_id=$gsb_id");
$group_select_box .= "<option value=\"$group_url\" style=\"color: #$gc;\">$gsb</option>"; // Add colour
Finde:
Code: Alles auswählen
$group_select_box .= '</select>';
Code: Alles auswählen
foreach($group as $current_group)
{
// These two are for the User Groups drop-down box (3 with the colour)
//$gsb = ucwords(strtolower(str_replace("_", " ", $group_info['group_name']))); --> replace this with the next
$gsb = ($current_group['type'] == GROUP_SPECIAL) ? $user->lang['G_' . $current_group['name']] : $current_group['name'];
$gsb_id = $current_group['id'];
$gc = $current_group['colour'];
$group_url = append_sid("{$phpbb_root_path}phoogle.php", "mode=groups&group_id=$gsb_id");
$group_select_box .= "<option value=\"$group_url\" style=\"color: #$gc;\">$gsb</option>"; // Add colour
}
Code: Alles auswählen
// Now deal with each user's selected icon and what to do if they are an admin or a moderator
// Within each case is what to do if 'Use Special Markers' is selected or not in the ACP.
// Added marker type for Show/Hide groups feature.
switch($member[$i]['group_id'])
{
case $group[5]['id']:
$member[$i]['user_phoogle_icon'] = ($use_special_markers == 1) ? '1' : $member[$i]['user_phoogle_icon'];
$member[$i]['marker_group'] = 'admin';
break;
case $group[4]['id']:
$member[$i]['user_phoogle_icon'] = ($use_special_markers == 1) ? '2' : $member[$i]['user_phoogle_icon'];
$member[$i]['marker_group'] = 'moderator';
break;
default:
$member[$i]['marker_group'] = 'user';
}
Code: Alles auswählen
/** Now deal with each user's selected icon and what to do if they are an admin or a moderator
* Within each case is what to do if 'Use Special Markers' is selected or not in the ACP.
* Added marker type for Show/Hide groups feature.
* Bugfix by Marc Alexander (c) 2009
*/
$current_id = $member[$i]['group_id'];
if(in_array('a_', $group[$current_id]['acl_role']))
{
$member[$i]['user_phoogle_icon'] = ($use_special_markers == 1) ? '1' : $member[$i]['user_phoogle_icon'];
$member[$i]['marker_group'] = 'admin';
}
elseif(in_array('m_', $group[$current_id]['acl_role']))
{
$member[$i]['user_phoogle_icon'] = ($use_special_markers == 1) ? '2' : $member[$i]['user_phoogle_icon'];
$member[$i]['marker_group'] = 'moderator';
}
else
{
$member[$i]['marker_group'] = 'user';
}
Code: Alles auswählen
// Text coloring for Admin and Moderator names, based on board theme settings.
switch($userlist_group)
{
case $group['5']['id']:
$userlist_name = '<span style="color:#' . $group['5']['colour'] . '">'. $userlist_name . '</span>';
break;
case $group['4']['id']:
$userlist_name = '<span style="color:#' . $group['4']['colour'] . '">'. $userlist_name . '</span>';
break;
default:
$userlist_name = '<span>'. $userlist_name . '</span>';
}
Code: Alles auswählen
/** Text coloring for Admin and Moderator names, based on board theme settings.
* by Marc Alexander
*/
$current_id = $member[$i]['group_id'];
if(in_array('a_', $group[$current_id]['acl_role']))
{
$userlist_name = '<span style="color:#' . $group[$current_id]['colour'] . '">'. $userlist_name . '</span>';
}
elseif(in_array('m_', $group[$current_id]['acl_role']))
{
$userlist_name = '<span style="color:#' . $group[$current_id]['colour'] . '">'. $userlist_name . '</span>';
}
else
{
$userlist_name = '<span>'. $userlist_name . '</span>';
}
Dann noch ein kleiner Bugfix falls es keine Events gibt:
Öffne phoogle.php
Finde:
Code: Alles auswählen
$num_events = sizeof($event);
Code: Alles auswählen
$num_events = (isset($event)) ? sizeof($event) : 0;
edit: Hab das letzte etwas verkleinert.