• 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
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>
 
Hmmm .. cant get it workin on mine LOL ... Must have done something wrong, will have another look. Cheers for the quick reply :)
 
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
 
So this makes the node icons mark the forum as read? That could be a little confusing for users don't you think? ;)
 
So this makes the node icons mark the forum as read? That could be a little confusing for users don't you think? ;)

I couldn't find a better title :s
What would you suggest?

"Click Forum Icon to Mark as Read (Like vBulletin)"?
 
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?
 
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.
 
I think a better way is double klick on forum node icon to mark forum as read. vb like :)

I am not gonna remake vBulletin, I'm creating features for XenForo.
If you click the button a menu pops up and that's the XenForo way and I'm not gonna change ;)
 
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.
 
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?
 
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
 
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.
 
Top Bottom