Код: Выделить всё
// Add topic tracking data to the query (only when query caching is off)
Код: Выделить всё
// BEGIN Topic Text Hover Mod
if ($config['hover_active'] && !$user->data['user_text_hover'])
{
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if($config['hover_show'] == TOPIC_TEXT_HOVER_FIRST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH)
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'p'), 'ON' => 'p.post_id = t.topic_first_post_id');
$sql_array['SELECT'] .= ', p.post_text AS first_text_hover';
}
if($config['hover_show'] == TOPIC_TEXT_HOVER_LAST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH)
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'pt'), 'ON' => 'pt.post_id = t.topic_last_post_id');
$sql_array['SELECT'] .= ', pt.post_text AS last_text_hover';
}
}
// END Topic Text Hover Mod
Код: Выделить всё
$template->assign_block_vars('similar', array(
Код: Выделить всё
// BEGIN Topic Text Hover Mod
if (!empty($row['first_text_hover']) || !empty($row['last_text_hover']))
{
// strip bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($row['first_text_hover']))
{
$first_text_hover = bbcode_strip($row['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($row['last_text_hover']))
{
$last_text_hover = bbcode_strip($row['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
else
{
$first_text_hover = $last_text_hover = '';
}
// END Topic Text Hover Mod
Код: Выделить всё
'PAGINATION' => topic_generate_pagination($row['topic_replies'], append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $similar_forum_id . '&t=' . $similar_topic_id)),
Код: Выделить всё
// BEGIN Topic Post Text Mod
'FIRST_TEXT_HOVER' => (isset($first_text_hover)) ? censor_text($first_text_hover) : '',
'LAST_TEXT_HOVER' => (isset($last_text_hover)) ? censor_text($last_text_hover) : '',
'LAST_POST_IMG' => $user->img('icon_topic_latest'),
// END Topic Post Text Mod
Код: Выделить всё
href="{similar.U_VIEW_TOPIC}" class="topictitle"
Вставляем после найденного
Код: Выделить всё
<!-- IF similar.FIRST_TEXT_HOVER -->title="{similar.FIRST_TEXT_HOVER}"<!-- ENDIF -->
Код: Выделить всё
href="{similar.U_LAST_POST}"
Код: Выделить всё
<!-- IF similar.LAST_TEXT_HOVER -->title="{similar.LAST_TEXT_HOVER}"<!-- ENDIF -->
Код: Выделить всё
{LAST_POST_IMG}
Код: Выделить всё
<!-- IF similar.LAST_TEXT_HOVER -->{similar.LAST_POST_IMG}<!-- ELSE -->{LAST_POST_IMG}<!-- ENDIF -->