Изменение цвета фона темы и строки ЛС
От автора -
Title: Unread Items Color Change
Description: Changes background color of unread topics and PM's.
Version: 1.1.0
Installation Level: Easy
Installation Time: ~5minutes
Author Username: FabryDesign
Хмм, в обще почитал про мод Unread Items Color Change, по указанной ссылке и так сказать просто совместил описанное там. В частности подсвечивать не только в списках топиков и ПМ, но и на центральной странице. Может кому пригодится.
styles/prosilver/theme/colours.css
.bg3 { background-color: #cadceb; }
.bg4 { background-color: #F7F6CE; }
ul.topiclist li.row dt a.subforum.unread {
background-image: url("{IMG_SUBFORUM_UNREAD_SRC}");
}
ul.topiclist li.row dt a.subforum.unread {
background-color: #F7F6CE;
background-image: url("{IMG_SUBFORUM_UNREAD_SRC}");
}
/includes/functions_display.php
// Used to tell whatever we have to create a dummy category or not.
$last_catless = true;
$forum_rows_copy = $forum_rows; // Get a copy to not mess up the original $forum_rows
// Empty category
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
{
$cat_unread = false;
foreach ($forum_rows_copy as $rows)
{
if ($frows['parent_id'] == $row['forum_id'])
{
$cat_unread = (isset($forum_tracking_info[$frows['forum_id']]) && $frows['orig_forum_last_post_time'] > $forum_tracking_info[$frows['forum_id']]) ? true : false;
}
if ($cat_unread) break;
}
'S_IS_CAT' => true,
'S_UNREAD_FORUM' => $cat_unread,
includes/ucp/ucp_pm_viewfolder.php
'SUBJECT' => censor_text($row['message_subject']),
'S_UNREAD' => $row['pm_unread'],
/styles/prosilver/template/forumlist_body.html
<li class="row">
<li class="row<!-- IF forumrow.S_UNREAD_FORUM --> bg4<!-- ENDIF -->">
styles/prosilver/template/viewforum_body.html
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_UNREAD_TOPIC --><!-- IF topicrow.S_ROW_COUNT is even --> bg3<!-- ELSE --> bg4<!-- ENDIF --><!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<li class="row<!-- IF topicrow.S_UNREAD_TOPIC --> bg4<!-- ELSE --><!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
styles/prosilver/template/ucp_pm_viewfolder.html
<li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
<li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.S_UNREAD --><!-- IF messagerow.S_ROW_COUNT is odd --> bg3<!-- ELSE --> bg4<!-- ENDIF --><!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
<li class="row<!-- IF messagerow.S_UNREAD --> bg4<!-- ELSE --><!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
i got this working great with subsilver2 here is the fix you only need to modify the 2 files in the template folder, the rest is the same as the original mod for prosilver. no need to modify the stylesheet for the subsilver2 version.
Я получил эту работу отлично с subsilver2 вот исправление вам нужно всего лишь изменить 2 файла в папке шаблона, остальное же, как оригинальный мод для prosilver. Нет необходимости изменять таблицу стилей для версии subsilver2
styles/subsilver2/template/viewforum_body.html
<td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS -->
<td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="row1">
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS -->
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->">
<td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="row1" width="140" align="center">
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row3<!-- ELSE -->row2<!-- ENDIF -->" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row3<!-- ELSE -->row2<!-- ENDIF -->" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="140" align="center">
<td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS -->
<td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="row1">
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS -->
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->">
<td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="row1" width="140" align="center">
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row3<!-- ELSE -->row2<!-- ENDIF -->" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row3<!-- ELSE -->row2<!-- ENDIF -->" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="<!-- IF topicrow.S_UNREAD_TOPIC -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="140" align="center">
styles/subsilver2/template/ucp_pm_viewfolder.html
<td class="row1" width="25" align="center" nowrap="nowrap">{messagerow.FOLDER_IMG}</td>
<!-- IF S_PM_ICONS -->
<td class="row1" width="25" align="center">{messagerow.PM_ICON_IMG}</td>
<!-- ENDIF -->
<!-- IF messagerow.S_PM_DELETED --><td class="row3"><!-- ELSE --><td class="row1"><!-- ENDIF -->
<td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center" nowrap="nowrap">{messagerow.FOLDER_IMG}</td>
<!-- IF S_PM_ICONS -->
<td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="25" align="center">{messagerow.PM_ICON_IMG}</td>
<!-- ENDIF -->
<!-- IF messagerow.S_PM_DELETED --><td class="row3"><!-- ELSE --><td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->"><!-- ENDIF -->
<td class="row1" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td>
<td class="row1" width="20" align="center"><p class="topicdetails"><input type="checkbox" class="radio" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td>
<td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR_FULL}<!-- ENDIF --></p></td>
<td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td>
<td class="<!-- IF messagerow.S_UNREAD -->row2<!-- ELSE -->row1<!-- ENDIF -->" width="20" align="center"><p class="topicdetails"><input type="checkbox" class="radio" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td>
Вернуться в 450 модов движка форумов phpBB (до версии 3.0.14)