есть интересная вещь в phpBB...
Код: Выделить всё
<!-- BEGIN switch_user_logged_in -->
<!-- END switch_user_logged_in -->
Код: Выделить всё
<!-- BEGIN switch_user_logged_out -->
<!-- END switch_user_logged_out -->
Код: Выделить всё
<!-- BEGIN switch_user_logged_in -->
<!-- END switch_user_logged_in -->
Код: Выделить всё
<!-- BEGIN switch_user_logged_out -->
<!-- END switch_user_logged_out -->
А нельзя ли в место вывода слова Гость, вывести картинку?Welcome Panel mod писал(а):// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
$name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile") . '" />' . $userdata['username'] . '</a>';
}
else
{
$name_link = $lang['Guest'];
}
// [end] Welcome & Avatar On Every Page
Код: Выделить всё
// [start] Welcome & Avatar On Every Page
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
IGO писал(а):На одном форуме видел: Самый популярный форум: "Название" и Самый мало посейщаемый: "название"
[R: R@m$e$ :U][R: R@m$e$ :U] писал(а):95.ru... так? =)
Код: Выделить всё
## Mod Title: Most 'n Least Active Forums
## Mod Version: 1.0.0
## Author: Armin Altorffer, aka Kharay (aaltorffer@hotmail.com) - http://alterna.hopto.org
##
## This mod is for phpBB2 ver 2.0.x
##
## Description: This mod will show the most and least active forums and posters
## on the bottom of your index page, in that field with the total posts, registered users
## and so on.
##
## The names that it shows are clickable and will point to that specific poster/forum.
Код: Выделить всё
<table align="CENTER" class="forumline" width="800" cellpadding="3" cellspacing="1" border="0">
<tr>
<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/NoseBleed/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}{TOTAL_TOPICS}<br />{TOTAL_USERS}<br />{NEWEST_USER}<br />
{MLAF}<br />
{MLAP}</span>
</td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>
Код: Выделить всё
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// get MLAF:
$maf = get_maf ();
$maf_id = get_maf_id ();
$laf = get_laf ();
$laf_id = get_laf_id ();
$maf_posts = get_maf_posts ();
$laf_posts = get_laf_posts ();
// get MLAP:
$map = get_map ();
$map_id = get_map_id ();
$lap = get_lap ();
$lap_id = get_lap_id ();
$map_posts = get_map_posts ();
$lap_posts = get_lap_posts ();
Код: Выделить всё
#-----[ FIND ]------------------------------------------
#
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'MLAF' => sprintf($lang['Mlaf'], $maf_id, $maf, $maf_posts, $laf_id, $laf, $laf_posts),
'MLAP' => sprintf($lang['Mlap'], $map_id, $map, $map_posts, $lap_id, $lap, $lap_posts),
Тогда меня интересует кусок кода из index.phpVVVas писал(а):Ну дык перенесите посторение переменной из index.php в page_header.php
Код: Выделить всё
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'index_body.tpl')
);
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts) . sprintf($l_posted_today, $posts_today),
// Topics a user has started MOD, By Manipe (Begin)
'TOTAL_TOPICS' => sprintf($l_total_topic_s, $total_topics),
// Topics a user has started MOD, By Manipe (End)
//Most 'n Least Active Posters & Forums (begin)
'MLAF' => sprintf($lang['Mlaf'], $maf_id, $maf, $maf_posts, $laf_id, $laf, $laf_posts),
'MLAP' => sprintf($lang['Mlap'], $map_id, $map, $map_posts, $lap_id, $lap, $lap_posts),
//Most 'n Least Active Posters & Forums(end)
Код: Выделить всё
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
Код: Выделить всё
// get MLAF:
$maf = get_maf ();
$maf_id = get_maf_id ();
$laf = get_laf ();
$laf_id = get_laf_id ();
$maf_posts = get_maf_posts ();
$laf_posts = get_laf_posts ();
// get MLAP:
$map = get_map ();
$map_id = get_map_id ();
$lap = get_lap ();
$lap_id = get_lap_id ();
$map_posts = get_map_posts ();
$lap_posts = get_lap_posts ();
Код: Выделить всё
'PRIVMSG_IMG' => $icon_pm,
Код: Выделить всё
'MLAF' => sprintf($lang['Mlaf'], $maf_id, $maf, $maf_posts, $laf_id, $laf, $laf_posts),
'MLAP' => sprintf($lang['Mlap'], $map_id, $map, $map_posts, $lap_id, $lap, $lap_posts),
Код: Выделить всё
[ Время : 0.1591с | SQL-запросов : 24 | Gzip : Выкл. | Загрузка : 0.21 ]
Код: Выделить всё
[ Время : 1.4703с | SQL-запросов : 43 | Gzip : Выкл. | Загрузка : 0.15 ]
IGO писал(а):Ну, вот почти закончил. Осталось про тестить.
У меня вот какой вопрос:
Я установил мод, который показываетна сайте конференции он тоже установлен.Код: Выделить всё
[ Время : 0.1591с | SQL-запросов : 24 | Gzip : Выкл. | Загрузка : 0.21 ]
После реализайии идеи показывает:Увеличение кол-ва SQL-запросов это очень плохо или жить можно?Код: Выделить всё
[ Время : 1.4703с | SQL-запросов : 43 | Gzip : Выкл. | Загрузка : 0.15 ]