• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Give Forum Node Icons "Mark Forums as Read" Links

Vincent

Well-known member
#1
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} OR !{$visitor.user_id}', '{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} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
		</xen:if>
 

Marc

Well-known member
#4
Hmmm .. cant get it workin on mine LOL ... Must have done something wrong, will have another look. Cheers for the quick reply :)
 

Vincent

Well-known member
#5
Hmmm .. cant get it workin on mine LOL ... Must have done something wrong, will have another look. Cheers for the quick reply :)
Make sure you're in node_forum_level_2
If you can't find, feel free to contact me by PM and I'll help you out :D
 

James

Well-known member
#6
So this makes the node icons mark the forum as read? That could be a little confusing for users don't you think? ;)
 

James

Well-known member
#8
Nono I was wondering if clicking the node icon marks the corresponding node as read, or the whole forum?

In vB if I clicked a node of "Announcements", it'd mark the announcements section as read and not the whole forum. Yours (if I'm reading correctly) marks the whole forum as read?
 

Vincent

Well-known member
#9
uhm, for example if you click the the Icon next to
XenForo Pre-Sales and Feedback

The whole XenForo Pre-Sales and Feedback forum is marked as read.
 

James

Well-known member
#13
Double click functionality shouldn't exist on the internet! People won't ever click forum nodes anyway, so there isn't any confusion between a single and double click on the icons.
 

CFodder

Well-known member
#17
Great little modification, works a treat.

Only thing I was wondering is once we've confirmed we want the forum marked as read it takes us into the forum, how would I adjust it so it just takes me back to the main forum page?
 

Vincent

Well-known member
#18
Great little modification, works a treat.

Only thing I was wondering is once we've confirmed we want the forum marked as read it takes us into the forum, how would I adjust it so it just takes me back to the main forum page?
I'll look into that for you later. Don't have time now. If I forget, please remind me :D
 

Garamond

Well-known member
#20
Great little modification, works a treat.

Only thing I was wondering is once we've confirmed we want the forum marked as read it takes us into the forum, how would I adjust it so it just takes me back to the main forum page?
I also need this adjustment, did you find time to do it?

There is also a need to get rid of the confirmation box - because since people are already double-clicking the icon, they are aware of what they are doing. Hence, no need for an extra confirmation popup box.