03.12.2016, 13:07
Problem polega na tym, że statusu ikony tematów (nowe posty, popularny wątek, zamknięty wątek itp) źle się wyświetlają. Przykładowo jeśli użytkownik odpowie w danym wątku, wtedy ikonka działu pokazuje, że dany wątek jest zamknięty (a powinna mu się pokazywać, że zawiera jego posty). A jeśli jest zamknięty, pokazuje że są nowe posty, lecz obrazka kłódki już tam nie ma (tak jakby pokazywało, że temat zawiera nowe posty i jest otwarty). Te ikony są robione za pomocą Font Awesome.
forumdisplay_thread
forumdisplay_threadlist
Załączam jeszcze thread_status.css
Jeśli ktoś by się podjął głębszej pomocy, byłym bardzo wdzięczny
forumdisplay_thread
Kod PHP:
<tr class="inline_row">
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><span class="thread_status {$folder}" title="{$folder_label}"> </span></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span>{$thread['multipage']}</span>
<div class="author smalltext">{$thread['profilelink']}</div>
</div>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>
forumdisplay_threadlist
Kod PHP:
<div class="float_left">
{$multipage}
</div>
<div class="float_right">
{$newthread}
</div>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder clear">
<tr>
<td class="thead" colspan="{$colspan}">
<div class="float_right">
<span class="smalltext"><strong><a href="misc.php?action=markread&fid={$fid}{$post_code_string}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&type=forum&fid={$fid}&my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
</div>
<div>
<strong>{$foruminfo['name']}</strong>
</div>
</td>
</tr>
<tr>
<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=subject&order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&sortby=starter&order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=replies&order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=views&order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
{$ratingcol}
<td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=lastpost&order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
{$inlinemodcol}
</tr>
{$selectall}
{$announcementlist}
{$threads}
<tr>
<td class="tfoot" align="right" colspan="{$colspan}">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="fid" value="{$fid}" />
<select name="sortby">
<option value="subject"{$sortsel['subject']}>{$lang->sort_by_subject}</option>
<option value="lastpost"{$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
<option value="starter"{$sortsel['starter']}>{$lang->sort_by_starter}</option>
<option value="started"{$sortsel['started']}>{$lang->sort_by_started}</option>
{$ratingsort}
<option value="replies"{$sortsel['replies']}>{$lang->sort_by_replies}</option>
<option value="views"{$sortsel['views']}>{$lang->sort_by_views}</option>
</select>
<select name="order">
<option value="asc"{$ordersel['asc']}>{$lang->sort_order_asc}</option>
<option value="desc"{$ordersel['desc']}>{$lang->sort_order_desc}</option>
</select>
<select name="datecut">
<option value="1"{$datecutsel['1']}>{$lang->datelimit_1day}</option>
<option value="5"{$datecutsel['5']}>{$lang->datelimit_5days}</option>
<option value="10"{$datecutsel['10']}>{$lang->datelimit_10days}</option>
<option value="20"{$datecutsel['20']}>{$lang->datelimit_20days}</option>
<option value="50"{$datecutsel['50']}>{$lang->datelimit_50days}</option>
<option value="75"{$datecutsel['75']}>{$lang->datelimit_75days}</option>
<option value="100"{$datecutsel['100']}>{$lang->datelimit_100days}</option>
<option value="365"{$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
<option value="9999"{$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
</select>
{$prefixselect}
{$gobutton}
</form>
</td>
</tr>
</table>
<div class="float_left">
{$multipage}
</div>
<div class="float_right" style="margin-top: 4px;">
{$newthread}
</div>
<br class="clear" />
<br />
<div class="float_left">
<div class="float_left">
<dl class="thread_legend smalltext">
<dd><span class="thread_status newfolder" title="{$lang->new_thread}"> </span> {$lang->new_thread}</dd>
<dd><span class="thread_status newhotfolder" title="{$lang->new_hot_thread}"> </span> {$lang->new_hot_thread}</dd>
<dd><span class="thread_status hotfolder" title="{$lang->hot_thread}"> </span> {$lang->hot_thread}</dd>
</dl>
</div>
<div class="float_left">
<dl class="thread_legend smalltext">
<dd><span class="thread_status folder" title="{$lang->no_new_thread}"> </span> {$lang->no_new_thread}</dd>
<dd><span class="thread_status dot_folder" title="{$lang->posts_by_you}"> </span> {$lang->posts_by_you}</dd>
<dd><span class="thread_status lockfolder" title="{$lang->locked_thread}"> </span> {$lang->locked_thread}</dd>
</dl>
</div>
<br class="clear" />
</div>
<div class="float_right" style="text-align: right;">
{$inlinemod}
{$searchforum}
{$forumjump}
</div>
<br class="clear" />
{$inline_edit_js}
Załączam jeszcze thread_status.css
Kod PHP:
.thread_status {
display: inline-block;
}
.thread_status.dot_folder:before {
font-family: FontAwesome;
font-size: 8px;
color: #017DCC;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_folder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_hotfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_hotfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_hotlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_hotlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_lockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FFD700;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_lockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_newfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FFD700;
content: "\f023";
position: absolute;
z-index: 1;
}
.thread_status.dot_newfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_newhotfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_newhotfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_newhotlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_newhotlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.dot_newlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FFD700;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.dot_newlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.folder:before {
font-family: FontAwesome;
font-size: 8px;
color: #C6C6C6;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.folder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.hotfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.hotfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.hotlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.hotlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.lockfolder:before {
font-family: FontAwesome;
font-size: 14px;
color: #333;
content: "\f023";
position: absolute;
z-index: 1;
}
.thread_status.lockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.movefolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FFD700;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.movefolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.newfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #BDE1A0;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.newfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.newhotfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.newhotfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.newhotlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #FA6A6A;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.newhotlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
.thread_status.newlockfolder:before {
font-family: FontAwesome;
font-size: 8px;
color: #AEAEAE;
content: "\f111";
position: absolute;
z-index: 1;
}
.thread_status.newlockfolder:after {
font-family: FontAwesome;
font-size: 14px;
color: #fff;
content: "\f15c";
position: relative;
z-index: 0;
background-color: #333;
border: #333 1px solid;
}
Jeśli ktoś by się podjął głębszej pomocy, byłym bardzo wdzięczny