| Администратор |
 |
Стаж: 5 месяцев 21 день Сообщения: 228 Откуда: здешние мы
Стиль сайта: subsilver2
Настоящее имя: Андрей
|
Topic Text in Mouse Over - мод графической направленностимод добавляет на форум красивое всплывающее окно со следующим содержанием: * Наведение курсора мыши на иконку последнего сообщения - всплывашка с текстом последнего сообщения темы * Наведение курсора мыши на имя темы - всплывашка с частью текста из первого сообщения темы есть настройки в Админке (можно выбрать какие сообщения показывать - последнее, первое или оба и выставить количество символов во всплывашке). есть возможность в Личном разделе включить или выключить данную функцию (конечно, если она вообще включена в Админке). модификация установлена на этом сайте - можно посмотреть как она работает на списке тем, и на главной странице в активных темах. Выглядеть сие будет примерно так: Вложение:
topic_text_hover.jpg [ 35.99 КБ | Просмотров: 20 ]
topic_text_hover.jpg
Если заинтересовало - ставится этот мод так: скачать из архива сайтараспаковать и загрузить содержимое папки root в корень сайта (где файл config.php). Теперь редактируем файлы форума: */ правок хватает - ставьте внимательно /*

общие правки (для любого стиля)
Открыть includes/acp/acp_board.phpНайти Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover Mod $user->add_lang('mods/topic_text_hover'); // END Topic Text Hover ModНайти Вставить перед найденным Код: Выделить всё // BEGIN Topic Title Hover Mod 'hover_active' => array('lang' => 'ALLOW_TOPIC_TITLE_HOVER','validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'hover_show' => array('lang' => 'TEXT_HOVER_OPTIONS','validate' => 'int:0:3', 'type' => 'custom', 'method' => 'select_topic_text_hover_check', 'explain' => true), 'hover_char_limit' => array('lang' => 'ALLOW_TOPIC_TITLE_HOVER_CHAR','validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['CHARS']), // END Topic Title Hover ModНайти Код: Выделить всё return h_radio('config[referer_validation]', $radio_ary, $value, $key); }Вставить после Код: Выделить всё // BEGIN Topic Text Hover MOD function select_topic_text_hover_check($value, $key = '') { global $phpEx, $phpbb_root_path; include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
$radio_ary = array(TOPIC_TEXT_HOVER_FIRST => 'TOPIC_TEXT_HOVER_FIRST', TOPIC_TEXT_HOVER_LAST => 'TOPIC_TEXT_HOVER_LAST', TOPIC_TEXT_HOVER_BOTH => 'TOPIC_TEXT_HOVER_BOTH');
return h_radio('config[hover_show]', $radio_ary, $value, $key); } // END Topic Text Hover MODОткрыть includes/ucp/ucp_prefs.phpНайти Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover Mod $user->add_lang('mods/topic_text_hover'); // END Topic Text Hover ModНайти Вставить после найденного Код: Выделить всё // BEGIN Topic Title Hover Mod 'text_hover' => request_var('text_hover', (int) $user->data['user_text_hover']), // END Topic Title Hover ModНайти Код: Выделить всё 'user_post_show_days' => $data['post_st'],Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover MOD 'user_text_hover' => $data['text_hover'], // END Topic Text Hover MODНайти Код: Выделить всё 'S_DISABLE_CENSORS' => $data['wordcensor'],Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover MOD 'S_DISABLE_TEXT_HOVER' => $data['text_hover'], 'S_TEXT_HOVER' => $config['hover_active'], // END Topic Text Hover MODОткрыть includes/functions_display.phpНайти Код: Выделить всё $sql = $db->sql_build_query('SELECT', array(Вставить перед найденным Код: Выделить всё // 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_LAST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_array['LEFT_JOIN'][] = array( 'FROM' => array(POSTS_TABLE => 'p'), 'ON' => "f.forum_last_post_id = p.post_id" ); $sql_array['SELECT'] .= ', p.post_text AS last_text_hover'; } } // END Topic Text Hover ModНайти Код: Выделить всё $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover Mod $forum_rows[$parent_id]['last_text_hover'] = (isset($row['last_text_hover'])) ? $row['last_text_hover'] : ''; // END Topic Text Hover ModНайти Код: Выделить всё $last_post_subject = $row['forum_last_post_subject'];Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover MOD if(!empty($row['last_text_hover']) && $auth->acl_get('f_read', $row['forum_id'])) { // strip all bbcode include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx); $last_text_hover = censor_text(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 { $last_text_hover = ''; } // END Topic Text Hover MOD Найти Код: Выделить всё 'LAST_POST_SUBJECT' => censor_text($last_post_subject),Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover MOD 'LAST_TEXT_HOVER' => (isset($last_text_hover)) ? censor_text($last_text_hover) : '', 'LAST_POST_IMG' => $user->img('icon_topic_latest'), // END Topic Text Hover ModОткрыть search.phpНайти Код: Выделить всё if ($config['load_anon_lastread'] || ($user->data['is_registered']Вставить перед найденным Код: Выделить всё // 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_from .= ' LEFT JOIN ' . POSTS_TABLE . ' p ON (p.post_id = t.topic_first_post_id)'; $sql_select .= ', p.post_text AS first_text_hover'; } if($config['hover_show'] == TOPIC_TEXT_HOVER_LAST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_from .= ' LEFT JOIN ' . POSTS_TABLE . ' pt ON (pt.post_id = t.topic_last_post_id)'; $sql_select .= ', pt.post_text AS last_text_hover'; } } // END Topic Text Hover Mod Найти Вставить перед найденным Код: Выделить всё // 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 Найти Вставить после найденного Код: Выделить всё // 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Открыть viewforum.phpНайти Код: Выделить всё if ($forum_data['forum_type'] == FORUM_POST)Вставить перед найденным Код: Выделить всё // BEGIN Topic Text Hover Mod if ($config['hover_active'] && !$user->data['user_text_hover']) { include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx); // the first post text in a topic if($config['hover_show'] == TOPIC_TEXT_HOVER_FIRST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'pt'), 'ON' => 'pt.post_id = t.topic_first_post_id'); $sql_array['SELECT'] .= ', pt.post_text AS first_text_hover'; } // the last post text in a topic if($config['hover_show'] == TOPIC_TEXT_HOVER_LAST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'ptl'), 'ON' => 'ptl.post_id = t.topic_last_post_id'); $sql_array['SELECT'] .= ', ptl.post_text AS last_text_hover'; } } // END Topic Text Hover Mod Найти Вставить после найденного Код: Выделить всё // BEGIN Topic Text Hover MOD if ($config['hover_active'] && !$user->data['user_text_hover']) { include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx); $sql_join = $sql_select = ''; if($config['hover_show'] == TOPIC_TEXT_HOVER_FIRST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_join .= ' LEFT JOIN ' . POSTS_TABLE . ' p ON (p.post_id = t.topic_first_post_id)'; $sql_select .= ', p.post_text AS first_text_hover'; } if($config['hover_show'] == TOPIC_TEXT_HOVER_LAST || $config['hover_show'] == TOPIC_TEXT_HOVER_BOTH) { $sql_join .= ' LEFT JOIN ' . POSTS_TABLE . ' pt ON (pt.post_id = t.topic_last_post_id)'; $sql_select .= ', pt.post_text AS last_text_hover'; } } // END Topic Text Hover MODНайти (может быть написана только часть строки) Для части строки Вставить перед ней Вставить после неё Найти (может быть написана только часть строки) В часть строки Вставить после этой части Найти Код: Выделить всё WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list));Вставить перед найденным К части строки Добавить перед ней Найти Вставить перед найденным Код: Выделить всё // BEGIN Topic Text Hover Mod if ((!empty($row['first_text_hover']) || !empty($row['last_text_hover'])) && $auth->acl_get('f_read', $forum_id)) { // strip all 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Найти Вставить после найденного Код: Выделить всё // 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Найти Код: Выделить всё 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt]К части строки Добавить перед ней Добавить после неё

правки для стилей на основе prosilver
Открыть styles/prosilver/theme/stylesheet.cssНайти Вставить после найденного Найти styles/prosilver/template/forumlist_body.htmlНайти Код: Выделить всё <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}В часть строки Добавить после Код: Выделить всё <!-- IF forumrow.LAST_TEXT_HOVER -->title="{forumrow.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF forumrow.LAST_TEXT_HOVER -->{forumrow.LAST_POST_IMG}<!-- ELSE -->Вставить после неё Открыть styles/prosilver/template/overall_header.htmlНайти Код: Выделить всё <script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>Вставить после найденного Код: Выделить всё <script type="text/javascript" src="{T_TEMPLATE_PATH}/tooltip.js"></script>Открыть styles/prosilver/template/search_results.htmlНайти Код: Выделить всё <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}В часть строки Вставить после следующий код Код: Выделить всё <!-- IF searchresults.FIRST_TEXT_HOVER -->title="{searchresults.FIRST_TEXT_HOVER}"<!-- ENDIF --> Найти Код: Выделить всё <a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF searchresults.LAST_TEXT_HOVER -->title="{searchresults.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF searchresults.LAST_TEXT_HOVER -->{searchresults.LAST_POST_IMG}<!-- ELSE -->Вставить после неё Открыть styles/prosilver/template/ucp_prefs_view.htmlНайти Вставить перед найденным Код: Выделить всё <!-- IF S_TEXT_HOVER --> <dl> <dt><label for="text_hover1">{L_DISABLE_TEXT_HOVER}:</label></dt> <dd> <label for="text_hover1"><input type="radio" name="text_hover" id="text_hover1" value="1"<!-- IF S_DISABLE_TEXT_HOVER --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="text_hover0"><input type="radio" name="text_hover" id="text_hover0" value="0"<!-- IF not S_DISABLE_TEXT_HOVER --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> </dd> </dl> <!-- ENDIF -->Открыть styles/prosilver/template/viewforum_body.htmlНайти Код: Выделить всё <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}В часть строки Вставить после Код: Выделить всё <!-- IF topicrow.FIRST_TEXT_HOVER -->title="{topicrow.FIRST_TEXT_HOVER}"<!-- ENDIF -->Найти Код: Выделить всё <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->title="{topicrow.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->{topicrow.LAST_POST_IMG}<!-- ELSE -->Вставить после неё

правки для стилей на основе subsilver2
Открыть styles/subsilver2/theme/stylesheet.cssНайти Вставить после найденного Открыть styles/subsilver2/template/forumlist_body.htmlНайти Код: Выделить всё <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF forumrow.LAST_TEXT_HOVER -->title="{forumrow.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF forumrow.LAST_TEXT_HOVER -->{forumrow.LAST_POST_IMG}<!-- ELSE -->Вставить после неё Открыть styles/subsilver2/template/overall_header.htmlНайти Вставить перед найденным Код: Выделить всё <script type="text/javascript" src="{T_TEMPLATE_PATH}/tooltip.js"></script>Открыть styles/subsilver2/template/search_results.htmlНайти Код: Выделить всё <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}В часть строки Вставить после Код: Выделить всё <!-- IF searchresults.FIRST_TEXT_HOVER -->title="{searchresults.FIRST_TEXT_HOVER}"<!-- ENDIF --> Найти Код: Выделить всё <a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF searchresults.LAST_TEXT_HOVER -->title="{searchresults.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF searchresults.LAST_TEXT_HOVER -->{searchresults.LAST_POST_IMG}<!-- ELSE -->Вставить после неё Открыть styles/subsilver2/template/ucp_prefs_view.htmlНайти Вставить перед найденным Код: Выделить всё <!-- IF S_TEXT_HOVER --> <tr> <td class="row1" width="50%"><b class="genmed">{L_DISABLE_TEXT_HOVER}:</b></td> <td class="row2"><input type="radio" class="radio" name="text_hover" value="1"<!-- IF S_DISABLE_TEXT_HOVER --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span> <input type="radio" class="radio" name="text_hover" value="0"<!-- IF not S_DISABLE_TEXT_HOVER --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td> </tr> <!-- ENDIF -->Открыть styles/subsilver2/template/viewforum_body.htmlНайти Код: Выделить всё <a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}"class="topictitle">{topicrow.TOPIC_TITLE}В часть строки Код: Выделить всё title="{L_POSTED}: {topicrow.FIRST_POST_TIME}"Вставить перед ней Код: Выделить всё <!-- IF topicrow.FIRST_TEXT_HOVER -->title="{topicrow.FIRST_TEXT_HOVER}"<!-- ELSE -->Вставить после неё Найти Код: Выделить всё <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->title="{topicrow.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->{topicrow.LAST_POST_IMG}<!-- ELSE -->Вставить после неё Найти Код: Выделить всё <a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}В часть строки Код: Выделить всё title="{L_POSTED}: {topicrow.FIRST_POST_TIME}"Вставить перед ней Код: Выделить всё <!-- IF topicrow.FIRST_TEXT_HOVER -->title="{topicrow.FIRST_TEXT_HOVER}"<!-- ELSE -->Вставить после неё Найти Код: Выделить всё <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}В часть строки Вставить после Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->title="{topicrow.LAST_TEXT_HOVER}"<!-- ENDIF -->В часть строки Вставить перед ней Код: Выделить всё <!-- IF topicrow.LAST_TEXT_HOVER -->{topicrow.LAST_POST_IMG}<!-- ELSE -->Вставить после неё
Завершение установки: Запустить установочный скрипт через браузер по адресу после отработки скрипта удалить его с сервера. Почистить кэш. Настройки мода находятся Админка - Функции форума. Успешной установки. Мод стопроцентно рабочий - проверяли.

небольшая доработка tooltip.js
Если у вас выводится 2 подсказки или часть других выводится в стандартном варианте, то эта небольшая модификация от Bricklayer для вас: Открыть /styles/prosilver/template/tooltip.jsНайти Код: Выделить всё var anchors = document.getElementsByTagName ("a");Заменить на Код: Выделить всё function getTagsNames(){ var res=new Array(); var tmp=null; for(var a=0;a<arguments.length;a++){ tmp=document.getElementsByTagName(arguments[a]); for(var t=0;t<tmp.length;t++) res.push(tmp[t]); } return res; } var anchors=getTagsNames('a','div','input','button','img','span','dt','select');Для стиля subsilver2 оставил только ('a','input','button','img','select') Теперь все всплывающие подсказки выводится в дизайне tooltip.

доработка внешнего вида всплывашки
Открываем файл styles/ваш стиль/theme/tooltip.cssЗаменить весь код в файле на следующий Код: Выделить всё #tooltip{ border: 3px #6b8dba solid; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; padding: 5px; display: none; background : url('./images/1.gif'); color: #000000; font: 10px Verdana, Arial, Helvetica, sans-serif; text-align: left; position: absolute; left: 0; z-index: 1000; filter: alpha(opacity=95); opacity: .95; }объяснения по коду: Код: Выделить всё #tooltip{ border: 3px #6b8dba solid; // стиль рамки, по порядку - толщина рамки в пикселях, HTML цвет рамки -moz-border-radius: 10px; // степень закругленности углов, задается для старых браузеров Mozilla Firefox -webkit-border-radius: 10px; // степень закругленности углов, задается для старых браузеров Chrome и Safari border-radius: 10px; // степень закругленности углов, задается для всех прочих браузеров padding: 5px; // внутренние отступы от рамки до текста подсказки display: none; background : url('./images/1.gif'); // фоновое изображение для подсказки, поместить в styles/ваш стиль/theme/images/ color: #000000; // цвет текста в подсказке font: 10px Verdana, Arial, Helvetica, sans-serif; // используемые шрифты в подсказке text-align: left; // расположение текста относительно края position: absolute; left: 0; z-index: 1000; filter: alpha(opacity=95); // степень прозрачности подсказки, значение 100 отключает полностью прозрачность opacity: .95; // степень прозрачности подсказки, значение 1 отключает полностью прозрачность }За эту доработку стоит поблагодарить админа форума Hello-Vitebsk DeaDRoMeO.
Если у Вас установлен мод " Последние темы / NV recent topics", то можно сделать эти всплывашки и там:

соединение с NV recent topics
Открыть includes/functions_recenttopics.phpНайти Код: Выделить всё if ($display_parent_forums) { $sql_query_array['SELECT'] .= ', f.parent_id, f.forum_parents, f.left_id, f.right_id'; } $sql = $db->sql_build_query('SELECT', $sql_query_array); $result = $db->sql_query_limit($sql, $topics_per_page);Вставить перед найденным Код: Выделить всё // 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_query_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'p'), 'ON' => 'p.post_id = t.topic_first_post_id'); $sql_query_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_query_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'pt'), 'ON' => 'pt.post_id = t.topic_last_post_id'); $sql_query_array['SELECT'] .= ', pt.post_text AS last_text_hover'; } } // END Topic Text Hover ModНайти Код: Выделить всё $template->assign_block_vars($tpl_loopname, 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
Найти Вставить перед найденным Код: Выделить всё // 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Открыть styles/ваш стиль/template/recent_topics_body.htmlНайти Код: Выделить всё href="{recent_topics.U_VIEW_TOPIC}" class="topictitle"Вставить после найденного Код: Выделить всё <!-- IF recent_topics.FIRST_TEXT_HOVER -->title="{recent_topics.FIRST_TEXT_HOVER}"<!-- ENDIF -->Найти Вставить после найденного Код: Выделить всё <!-- IF recent_topics.LAST_TEXT_HOVER -->title="{recent_topics.LAST_TEXT_HOVER}"<!-- ENDIF -->Найти Заменить найденное на Код: Выделить всё <!-- IF recent_topics.LAST_TEXT_HOVER -->{recent_topics.LAST_POST_IMG}<!-- ELSE -->{LAST_POST_IMG}<!-- ENDIF -->
Если у Вас установлен мод " Похожие темы / Precise Similar Topics", то можно сделать эти всплывашки и там:

соединение с Precise Similar Topics
Открыть includes/functions_similar_topics.phpНайти Код: Выделить всё // 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Открыть styles/ваш стиль/template/similar_topics.htmlНайти Код: Выделить всё href="{similar.U_VIEW_TOPIC}" class="topictitle"Вставить после найденного Код: Выделить всё <!-- IF similar.FIRST_TEXT_HOVER -->title="{similar.FIRST_TEXT_HOVER}"<!-- ENDIF -->Найти Вставить после найденного Код: Выделить всё <!-- IF similar.LAST_TEXT_HOVER -->title="{similar.LAST_TEXT_HOVER}"<!-- ENDIF -->Найти Заменить найденное на Код: Выделить всё <!-- IF similar.LAST_TEXT_HOVER -->{similar.LAST_POST_IMG}<!-- ELSE -->{LAST_POST_IMG}<!-- ENDIF -->
|
|