[Template Modification] Give Forum Node Icons "Mark as Read" Links.

Status
Not open for further replies.

Vincent_imported

Trusted Member
Dec 1, 2010
747
0
100
28
Belgium
www.hlxbans.net
Hello,

If you want your Unread Forum Node Icons to be "Mark Forum as Read" link for Registered Users.

Notes:
  • It will only be a link if you're a Registered User, so not to guests.
  • It will only be a link if the forum has unread posts.
Go to the template called node_forum_level_2 and replace the following code:
Code:
<span class="nodeIcon" title="{xen:if $forum.hasNew, '{xen:phrase unread_messages}', ''}"></span>

by the following code:
Code:
<xen:if is="{$visitor.user_id} AND {$forum.hasNew}">
<a href="{xen:link 'forums/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">
<span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
</a>
<xen:else />
<span class="nodeIcon" title="{xen:if $forum.hasNew, '{xen:phrase unread_messages}', ''}"></span>
</xen:if>
 
  • Like
Reactions: 5 people

Garamond

OMG Member
Mar 5, 2011
4
0
35
50
... and how to get rid of the confirmation? Since you're actually double-clicking the icons, there really is no need for a confirmation pop-up box.
 
  • Like
Reactions: 1 person
Status
Not open for further replies.