Disclaimer: Данная модификация проверена автором и по крайней мере у него она превосходно работает.
Убедительная просьба сообщать результаты вашего тестирования.
С чего начнем? Прежде всего избавимся от двух довольно тяжелых запросов по получению списка модераторов. Что касается самого списка, то встречающаяся мне рекомендация по вводу списка модераторов в описание форума верна лишь частично - имена (групп) модераторов нельзя делать ссылками, так как к ним не применяется стандартная обработка ссылок phpBB.
Итак:
Код: Выделить всё
#
#-----[ FIND ]------------------------------------------
#
//
// Obtain list of moderators of each forum
// First users, then groups ... broken into two queries
//
#
#-----[ BEFORE, ADD ]------------------------------------
#
/*/
#
#-----[ FIND ]------------------------------------------
#
//
// Find which forums are visible for this user
//
#
#-----[ BEFORE, ADD ]------------------------------------
#
/*/
#
#-----[ FIND ]------------------------------------------
#
'L_MODERATOR' => $lang['Moderators'],
#
#-----[ REPLACE WITH ]------------------------------------
#
// 'L_MODERATOR' => $lang['Moderators'],
#
#-----[ FIND ]------------------------------------------
#
if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = ' ';
$moderator_list = ' ';
}
#
#-----[ REPLACE WITH ]------------------------------------
#
/*
if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = ' ';
$moderator_list = ' ';
}
*/
#
#-----[ FIND ]------------------------------------------
#
'MODERATORS' => $moderator_list,
#
#-----[ REPLACE WITH ]------------------------------------
#
// 'MODERATORS' => $moderator_list,
#
#-----[ FIND ]------------------------------------------
#
'L_MODERATOR' => $l_moderators,
#
#-----[ REPLACE WITH ]------------------------------------
#
// 'L_MODERATOR' => $l_moderators,
Код: Выделить всё
//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
}
}
Перед:
Код: Выделить всё
//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
Код: Выделить всё
//
// Let's decide which categories we should display
//
$display_categories = array();
for ($i = 0; $i < $total_categories; $i++ )
{
$display_categories[$category_rows[$i]['cat_id']] = FALSE;
}
for ($i = 0; $i < $total_forums; $i++ )
{
if ( $is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'] )
{
$display_categories[$forum_data[$i]['cat_id']] = TRUE;
}
}
Код: Выделить всё
//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
}
}
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_forums )
{
Код: Выделить всё
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_categories[$cat_id] )
{

Следующий код, который нам предстоит подкорректировать - отображение наличия новых сообщений в форумах. Корректируем.
Найти:
Код: Выделить всё
$forum_last_post_time = 0;
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
if ( empty($tracking_topics[$check_topic_id]) )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
}
else
{
if ( $tracking_topics[$check_topic_id] < $check_post_time )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
}
}
}
if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $forum_last_post_time )
{
$unread_topics = false;
}
}
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
}
}
Код: Выделить всё
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
if ( intval($tracking_topics[$check_topic_id]) < $check_post_time )
{
$unread_topics = true;
break;
}
}
if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $forum_data[$j]['post_time'] )
{
$unread_topics = false;
}
}
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_data[$j]['post_time'] )
{
$unread_topics = false;
}
}

Найти:
Код: Выделить всё
if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}
if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
Код: Выделить всё
$l_total_post_s = $lang['Posted_articles_total'];
$l_total_user_s = $lang['Registered_users_total'];
Жду ваших мнений...
Продолжение следует...