1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.
    Dismiss Notice
  3. 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

Discussion in 'Template Modifications [Archive]' started by Vincent, Dec 29, 2010.

  1. Vincent

    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>
     
  2. Marc

    Marc Well-Known Member

    This not work anymore then?
     
  3. Vincent

    Vincent Well-Known Member

    It still works, just tested in a xF 1.0.1 installation and it works :)
     
    Marc likes this.
  4. Marc

    Marc Well-Known Member

    Hmmm .. cant get it workin on mine LOL ... Must have done something wrong, will have another look. Cheers for the quick reply :)
     
  5. Vincent

    Vincent Well-Known Member

    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
     
  6. James

    James Well-Known Member

    So this makes the node icons mark the forum as read? That could be a little confusing for users don't you think? ;)
     
  7. Vincent

    Vincent Well-Known Member

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

    "Click Forum Icon to Mark as Read (Like vBulletin)"?
     
  8. James

    James Well-Known Member

    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?
     
  9. Vincent

    Vincent Well-Known Member

    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.
     
  10. James

    James Well-Known Member

    Woops my bad, I just misunderstood!
     
  11. hcmagix

    hcmagix Active Member

    I think a better way is double klick on forum node icon to mark forum as read. vb like :)
     
  12. Vincent

    Vincent Well-Known Member

    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 ;)
     
    hcmagix likes this.
  13. James

    James Well-Known Member

    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.
     
  14. Vincent

    Vincent Well-Known Member

    If you know it you click it ;)
     
  15. borbole

    borbole Well-Known Member

    Nice tip. Thanks for the share :)
     
  16. Garamond

    Garamond Well-Known Member

    Yeah nice one, was looking for this :) thanks
     
  17. CFodder

    CFodder Well-Known Member

    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?
     
  18. Vincent

    Vincent Well-Known Member

    I'll look into that for you later. Don't have time now. If I forget, please remind me :D
     
  19. CFodder

    CFodder Well-Known Member

    No rush bud, just when ya can :)
     
  20. Garamond

    Garamond Well-Known Member

    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.
     

Share This Page