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

Status
Not open for further replies.

Vincent_imported

Trusted Member
Joined
Dec 1, 2010
Messages
747
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>
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,100
Doesn't load for me :(
 

Attachments

  • Screen shot 2011-03-12 at 9.20.44 PM.png
    Screen shot 2011-03-12 at 9.20.44 PM.png
    75.1 KB · Views: 20

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,100
I must be missing a codec or something, doesn't work either. Oh well. Never mind!
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,100
I downloaded the file, and played it stand alone. Works fine. Dropbox loads the wrong codec.
 

merk51

OMG Member
Joined
Jul 16, 2008
Messages
46
I just checked this out and unfortunately it seems this has all changed for 1.1b5 - I could be mistaken however it doesn't find the code required.
 

merk51

OMG Member
Joined
Jul 16, 2008
Messages
46
Thanks really appreciate it :) - It's good to know after making myself look like a fool on this site earlier today that I hadn't completely lost my mind and just couldn't find the code haha.
 

Garamond

OMG Member
Joined
Mar 5, 2011
Messages
4
... 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.
 
Status
Not open for further replies.
Top