- Compatible XF 1.x versions
-
- 1.2
- 1.3
- 1.4
- 1.5
- Visible branding
- No
So if you would like to have The Xenporta 2 Recent Thread Sidebar Block to have Read and Unread titles a different color, as well as rich usernames, here is the code you need.
Find
EWRwidget_Threads
And find the following:
Change to:
Then go into Extra.css:
Enjoy!
See working example at AltTabMe
Find
EWRwidget_Threads
And find the following:
Code:
<xen:foreach loop="$wUncached" value="$thread">
<li class="profilePostListItem">
<xen:avatar user="$thread" size="s" img="true" />
<div class="messageInfo">
<div class="messageContent">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="messageMeta muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> :
<a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</div>
</li>
</xen:foreach>
Change to:
Code:
<xen:foreach loop="$wUncached" value="$thread">
<li class="profilePostListItem">
<xen:avatar user="$thread" size="s" img="true" />
<div class="messageInfo">
<div class="messageContent">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', 'un'}readThreadTitle {xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="messageMeta muted">
<a href="{xen:link members, $thread.lastPostInfo}"><xen:username user="$thread.lastPostInfo" rich="true" /></a> :
<a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</div>
</li>
</xen:foreach>
Then go into Extra.css:
Code:
.readThreadTitle {
color:(whatever color you want);
}
.unreadThreadTitle {
color:(whatever color you want);
}
Enjoy!
See working example at AltTabMe
- Related resources