Topic Title Colour phpbb 3модификация даёт возможность выбрать цвет названия темы. таким цветом она будет выделяться и на странице темы и на форуме. так же модификация позволяет выставить права доступа для пользования модом.я поставил здесь эту модификацию, чтобы наглядно показать её работу.
сканы работы и настройки мода:
Вложение:
color-forum.png [ 7.88 КБ | Просмотров: 3940 ]
color-forum.png
Вложение:
color-topic.png [ 11.61 КБ | Просмотров: 3940 ]
color-topic.png
Вложение:
color-posting.png [ 28.66 КБ | Просмотров: 3940 ]
color-posting.png
Вложение:
rol-color.png [ 30.74 КБ | Просмотров: 3940 ]
rol-color.png
если заинтересовало - ставим:
Скачать мод из архива сайта:
Скачать из файлового архива сайтасодержимое папки root загрузить на сервер (где файл config.php) - там всего один файл.
Теперь необходимо провести SQL-запрос (к сожалению создать скрипт-установщик не удалось - проводить придётся вручную.
Код: Выделить всё
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_topic_title_colour', 1);
ALTER TABLE phpbb_topics ADD topic_title_colour varchar(6) DEFAULT '' NOT NULL;
Затем редактируем файлы:

общие правки
Открыть
posting.phpНайти
Код: Выделить всё
$uninit = array('post_attachment' => 0, 'poster_id' => $user->data['user_id'], 'enable_magic_url' => 0, 'topic_status' => 0, 'topic_type' => POST_NORMAL, 'post_subject' => '', 'topic_title' => '', 'post_time' => 0,
После части сроки
Вставить
Найти
Код: Выделить всё
$message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
Вставить после найденного
Код: Выделить всё
$post_data['topic_title_colour'] = request_var('topic_title_colour', '');
Найти
Код: Выделить всё
'topic_title' => (empty($post_data['topic_title'])) ? $post_data['post_subject'] : $post_data['topic_title'],
Вставить после найденного
Код: Выделить всё
'topic_title_colour' => (!empty($post_data['topic_title_colour'])) ? $post_data['topic_title_colour'] : '',
Найти
Вставить после найденного
Код: Выделить всё
'PREVIEW_TITLE_COLOUR' => $post_data['topic_title_colour'],
Найти
Код: Выделить всё
'TOPIC_TITLE' => censor_text($post_data['topic_title']),
Вставить перед найденным
Код: Выделить всё
'TOPIC_TITLE_COLOUR' => $post_data['topic_title_colour'],
Найти
Вставить после найденного
Код: Выделить всё
'S_COLOUR' => (($auth->acl_get('f_topic_title_colour', $forum_id) && ($mode == 'post' || $mode == 'edit' && $post_data['post_id'] == $post_data['topic_first_post_id'])) ? true : false),
Открыть
viewforum.phpНайти
Код: Выделить всё
'TOPIC_TITLE' => censor_text($row['topic_title']),
Вставить после найденного
Код: Выделить всё
'TOPIC_TITLE_COLOUR' => $row['topic_title_colour'],
Открыть
viewtopic.phpНайти
Код: Выделить всё
'TOPIC_TITLE' => $topic_data['topic_title'],
Вставить после найденного
Код: Выделить всё
'TOPIC_TITLE_COLOUR' => $topic_data['topic_title_colour'],
Открыть
includes/functions.phpНайти
Код: Выделить всё
'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup')),
Вставить после найденного
Код: Выделить всё
'U_COLOR_PALET' => addslashes(append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=postform&name=topic_title_colour')),
Открыть
includes/functions_posting.phpНайти
Код: Выделить всё
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
Вставить после найденного
Код: Выделить всё
'topic_title_colour' => (!empty($data['topic_title_colour'])) ? $data['topic_title_colour'] : '',
Найти
Код: Выделить всё
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
Вставить после найденного
Код: Выделить всё
'topic_title_colour' => (!empty($data['topic_title_colour'])) ? $data['topic_title_colour'] : '',

языковые правки en
Открыть
language/en/posting.phpНайти
Вставить перед найденным
Код: Выделить всё
//-- mod : topic title colour --------------------------------------------------
//-- add
$lang = array_merge($lang, array(
'TOPIC_TITLE_COLOUR' => 'Topic Title colour',
));
//-- fin mod : topic title colour ----------------------------------------------
Открыть
language/en/acp/permissions_phpbb.phpНайти
Код: Выделить всё
'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
Вставить перед найденным
Код: Выделить всё
'acl_f_topic_title_colour' => array('lang' => 'Can add a colour to topics title', 'cat' => 'post'),

языковые правки ru
Открыть
language/ru/posting.phpНайти
Вставить перед найденным
Код: Выделить всё
//-- mod : topic title colour --------------------------------------------------
//-- add
$lang = array_merge($lang, array(
'TOPIC_TITLE_COLOUR' => 'Цвет название темы',
));
//-- fin mod : topic title colour ----------------------------------------------
Открыть
language/ru/acp/permissions_phpbb.phpНайти
Код: Выделить всё
'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
Вставить перед найденным
Код: Выделить всё
'acl_f_topic_title_colour' => array('lang' => 'Может выбирать цвет названия темы', 'cat' => 'post'),

для стиля на основе prosilver
Открыть
styles/prosilver/template/posting_editor.htmlНайти
Код: Выделить всё
<dl style="clear: left;">
<dt><label for="subject">{L_SUBJECT}:</label></dt>
<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
</dl>
Вставить после найденного
Код: Выделить всё
<!-- IF S_COLOUR -->
<dl>
<dt><label for="topic_title_colour">{L_TOPIC_TITLE_COLOUR}:</label></dt>
<dd><input class="text small" type="text" id="topic_title_colour" name="topic_title_colour" value="{TOPIC_TITLE_COLOUR}" size="10" maxlength="6" /> <span>[ <a href="{U_COLOR_PALET}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
</dl>
<!-- ENDIF -->
Открыть
styles/prosilver/template/posting_preview.htmlНайти
Заменить найденное на
Код: Выделить всё
<h3>{L_PREVIEW}: <!-- IF PREVIEW_TITLE_COLOUR --><span style="color: #{PREVIEW_TITLE_COLOUR}"><!-- ENDIF -->{PREVIEW_SUBJECT}<!-- IF PREVIEW_TITLE_COLOUR --></span><!-- ENDIF --></h3>
Открыть
styles/prosilver/template/viewforum_body.htmlНайти
Код: Выделить всё
<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
Заменить найденное на
Код: Выделить всё
<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.TOPIC_TITLE_COLOUR --><span style="color: #{topicrow.TOPIC_TITLE_COLOUR}"><!-- ENDIF -->{topicrow.TOPIC_TITLE}<!-- IF topicrow.TOPIC_TITLE_COLOUR --></span><!-- ENDIF --></a>
Открыть
styles/prosilver/template/viewtopic_body.htmlНайти
Код: Выделить всё
<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
Заменить найденное на
Код: Выделить всё
<h2><a href="{U_VIEW_TOPIC}"><!-- IF TOPIC_TITLE_COLOUR --><span style="color:#{TOPIC_TITLE_COLOUR};"><!-- ENDIF -->{TOPIC_TITLE}<!-- IF TOPIC_TITLE_COLOUR --></span><!-- ENDIF --></a></h2>

для стиля на основе subsilver2
Открыть
styles/subsilver2/template/posting_body.htmlНайти
Код: Выделить всё
<tr>
<td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
<td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>
Вставить после найденного
Код: Выделить всё
<!-- IF S_COLOUR -->
<tr>
<td class="row1" width="22%"><b class="genmed">{L_TOPIC_TITLE_COLOUR}:</b></td>
<td class="row2" width="78%"><input class="post" type="text" name="topic_title_colour" size="10" maxlength="6" tabindex="2" value="{TOPIC_TITLE_COLOUR}" /> <span>[ <a href="{U_COLOR_PALET}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></td>
</tr>
<!-- ENDIF -->
Открыть
styles/subsilver2/template/posting_preview.htmlНайти
Код: Выделить всё
<tr>
<td class="row1">{MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {POST_DATE} {L_POST_SUBJECT}: {PREVIEW_SUBJECT}</span></td>
</tr>
Заменить найденное на
Код: Выделить всё
<tr>
<td class="row1">{MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {POST_DATE} {L_POST_SUBJECT}: <!-- IF PREVIEW_TITLE_COLOUR --><span style="color: #{PREVIEW_TITLE_COLOUR}"><!-- ENDIF -->{PREVIEW_SUBJECT}<!-- IF PREVIEW_TITLE_COLOUR --></span><!-- ENDIF --></span></td>
</tr>
Открыть
styles/subsilver2/template/viewforum_body.html(правки делать в файле 2 раза - для субфорумов и форумов)
Найти
Код: Выделить всё
{topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}"class="topictitle">{topicrow.TOPIC_TITLE}</a>
Заменить найденное на
Код: Выделить всё
{topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.TOPIC_TITLE_COLOUR --><span style="color: #{topicrow.TOPIC_TITLE_COLOUR}"><!-- ENDIF --> {topicrow.TOPIC_TITLE}<!-- IF topicrow.TOPIC_TITLE_COLOUR --></span><!-- ENDIF --></a>
Открыть
styles/subsilver2/template/viewtopic_body.htmlНайти
Код: Выделить всё
<h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
Заменить найденное на
Код: Выделить всё
<h2><a class="titles" href="{U_VIEW_TOPIC}"><!-- IF TOPIC_TITLE_COLOUR --><span style="color: #{TOPIC_TITLE_COLOUR}"><!-- ENDIF -->{TOPIC_TITLE}<!-- IF TOPIC_TITLE_COLOUR --></span><!-- ENDIF --></a></h2>
Всё. теперь необходимо очистить кэши (стиля, тем, если надо - браузера) и для завершения установки запустить инсталлятор:
после отработки удалить файл с сервера.
можно пользоваться. мод "встал" сразу - глюков вроде не наблюдалось.
оригинальная тема мода:
http://bb3x.ru/forum/mody-kataloga/topic-title-colour-t4008.htmlp.s. Права доступа к использованию мода находятся по адресу
Администраторский раздел -
Права доступа -
Форумные роли - выбрать роль -
Доступ к форумам/
Размещение сообщений -
Может выбирать цвет названия темы.