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

Discussion in 'Resources / Products / Styles' started by Vincent, Mar 12, 2011.

  1. The community is closed, running in ARCHIVE mode
    Guest, you can only read public discussions. Registration is turned off.
  1. Vincent

    Trusted 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, '{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>
    Fuhrmann, Merk, Michael Dance and 2 others like this.
  2. Floris

    Trusted Member
    Thanks for sharing :D
  3. Mikey

    Trusted Member
    Got a screenshot?
  4. Vincent

    Trusted Member
    Fuhrmann and Mikey like this.
  5. Floris

    Trusted Member
    Doesn't load for me :(

    Attached Files:

  6. Vincent

    Trusted Member
  7. Floris

    Trusted Member
    I must be missing a codec or something, doesn't work either. Oh well. Never mind!
  8. Vincent

    Trusted Member
    It's .avi, Apple is known to not support it :)

    I'll try 'n upload it in mp4 soon.
  9. Floris

    Trusted Member
    I downloaded the file, and played it stand alone. Works fine. Dropbox loads the wrong codec.
    Vincent likes this.
  10. MsJacquiiC New Member

    Nice share = Thanks so much Vincent!

    J.
    Vincent likes this.
  11. Merk Well-Known Member

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

    Trusted Member
    I'll update them :)

    EDIT: Done :D
    Merk and Floris like this.
  13. Merk Well-Known Member

    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.
    Vincent and Floris like this.
  14. BrandonHopkins Well-Known Member

    Works Great thank you! Here is a screenshot you can use if you want.

    Works.PNG
    Vincent likes this.
  15. Garamond Premium Member

    ... 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.
    Floris likes this.
  16. The Pet Board Forum Member

    Good point.
  17. Vincent

    Trusted Member
    Not gonna happen, too much changing. Sorry