При наведении курсора мыши на ник пользователя который в он лайне появляться рамка с информацией о пользователе,пример на скриншоте.
Установка:Скачиваем
jscripts.rar ( 14.34 Кб )
Кол-во загрузок: 2после распаковываем,и ложим папку jscripts в корень вашего форума.
Редактирование шаблонов:Изменить HTML шаблоны / skin_global (глобальные шаблоны) / global_board_header
Найти:КОД
<script type="text/javascript" src='{$this->ipsclass->vars['img_url']}/folder_js_skin/ips_menu_html.js'></script>
Добавить ниже:КОД
<script type="text/javascript" src='jscripts/wz_tooltip.js'></script>
<script type="text/javascript" src='jscripts/tip_centerwindow.js'></script>
<script type="text/javascript" src='jscripts/tip_followscroll.js'></script>
Сохранить шаблон.
Далее, открываем: skin_boards (главная страница) / Добавить шаблон(см. в самом низу)
Название шаблона: splash_user_row
Входящие переменные: $data
Продолжить.
Тело шаблона:
КОД
<div style='float:left'><b>{$data['members_display_name']}</b><br>{$data['avatar']}<br>{$data['member_rank_img']}<br>{$data['member_number']}<br>{$data['member_group']} {$data['title']}<br>{$data['member_joined']}<br>{$data['member_location']}Пол: {$data['_pp_gender_text']}<br>{$data['member_posts']}</div><div style='float:right; margin-left:5px; border:1px solid #000'><img src='{$data['pp_main_photo']}'></div>
Редактирование файлов:Открыть файл
sources/lib/func_boardstats.phpНайти:КОД
if ( $this->ipsclass->member['id'] )
{
$rows = array( $ar_time.'.'.md5(microtime()) => array( 'id' => 0,
'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
'running_time' => $ar_time,
'member_id' => $this->ipsclass->member['id'],
'member_name' => $this->ipsclass->member['members_display_name'],
'member_group' => $this->ipsclass->member['mgroup'] ) );
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group',
'from' => 'sessions',
'where' => "running_time > $time",
//'order' => "running_time DESC" // Sort in PHP to avoid filesort in SQL
) );
Заменить на:КОД
$this->ipsclass->DB->simple_construct(array( 'select' => 'm1.id, m1.member_id, m1.member_name, m1.login_type, m1.running_time, m1.member_group',
'from' => array('sessions' => 'm1'),
'where' => "m1.running_time > $time",
'add_join' => array(0 => array( 'select' => 'm2.id, m2.email, m2.hide_email, m2.joined, m2.posts, m2.title, m2.last_post, m2.view_avs, m2.bday_day, m2.bday_month, m2.bday_year, m2.last_visit, m2.last_activity, m2.members_display_name, m2.members_profile_views',
'from' => array( 'members' => 'm2' ),
'where' => 'm2.id=m1.member_id',
'type' => 'left'),
1 => array( 'select' => 'm3.aim_name, m3.icq_number, m3.website, m3.yahoo, m3.msnname, m3.location, m3.avatar_location, m3.avatar_size, m3.avatar_type',
'from' => array( 'member_extra' => 'm3' ),
'where' => 'm3.id=m1.member_id',
'type' => 'left'),
2 => array( 'select' => 'm4.pp_main_photo, m4.pp_thumb_photo, m4.pp_gender',
'from' => array( 'profile_portal ' => 'm4' ),
'where' => 'm4.pp_member_id=m1.member_id',
'type' => 'left'))));
Найти:КОД
foreach ( $rows as $result )
{
$last_date = $this->ipsclass->get_time( $result['running_time'] );
Заменить на:КОД
foreach ( $rows as $result )
{
$last_date = $this->ipsclass->get_time( $result['running_time'] );
if (!is_array($this->ipsclass->cache['ranks'])) {
$this->ipsclass->cache['ranks'] = array();
$this->ipsclass->DB->simple_construct(array('select' => 'id, title, pips, posts', 'from' => 'titles', 'order' => "posts DESC"));
$this->ipsclass->DB->simple_exec();
while ($i = $this->ipsclass->DB->fetch_row()) $this->ipsclass->cache['ranks'][$i['id']] = array('TITLE' => $i['title'], 'PIPS' => $i['pips'], 'POSTS' => $i['posts']);
$this->ipsclass->update_cache(array('name' => 'ranks', 'array' => 1, 'deletefirst' => 1));
}
$this->ipsclass->load_template('skin_topic');
$member = $this->ipsclass->parse_member($result);
$output = $this->ipsclass->compiled_templates['skin_boards']->splash_user_row($member);
if (is_array($this->ipsclass->skin['_macros'])) {
foreach($this->ipsclass->skin['_macros'] as $row) {
if ($row['macro_value'] != "") $output = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $output);
}
}
$output = str_replace("'", "\'", $output);
$output = str_replace("\"", "\'", $output);
Найти:КОД
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['member_name']}</a>*{$this->sep_char} \n";
Заменить на:КОД
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$member['member_id']}' onMouseOver=\"Tip('".$output."')\">{$result['member_name']}</a>{$this->sep_char} \n";
Найти:КОД
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['member_name']}</a>*{$this->sep_char} \n";
Заменить на:КОД
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$member['member_id']}' onMouseOver=\"Tip('".$output."')\">{$result['member_name']}</a>{$this->sep_char} \n";
Сохранить шаблон.