1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Switch off jump to first unread?

Discussion in 'Styling and Customization Questions' started by Smooth, May 26, 2011.

  1. Smooth

    Smooth Active Member

    Hey guys and gals,

    Is there a way to stop the jump to first unread feature when clicking a thread?

    I would prefer that it always goes to the first post in the thread please?

    Many thanks in advance for your replies.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Clicking the time stamp will load the first post.
     
  3. Smooth

    Smooth Active Member

    Thanks Brogan.

    Any way to switch it off altogether so that clicking either takes you to the first post?
     
  4. Mike

    Mike XenForo Developer Staff Member

    You can edit the thread_list_item template to change the link to just point to the thread itself (as it does for guests or when it's read).
     
  5. Smooth

    Smooth Active Member

    Thanks Mike :) Got the template but my head hurts trying to spot the code :) Any hints?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Find this:
    Code:
    <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                        title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
    Replace with this:
    Code:
    <a href="{xen:link threads, $thread}"
                        title="{xen:phrase go_to_first_message_in_thread}"
     
  7. Russ

    Russ Well-Known Member

    Try...

    in thread_list_item Find:

    Code:
    <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
    class="{xen:if $thread.hasPreview, PreviewTooltip}"
    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper wrap, $thread.title, 50}</a>
    <xen:if is="{$thread.isNew}"><a href="{xen:link threads/unread, $thread}" class="unreadLink" title="{xen:phrase go_to_first_unread_message}"></a></xen:if>
    
    Replace with:
    Code:
    <a href="{xen:link threads, $thread}"
    title="{xen:if {$visitor.user_id}, '{xen:phrase go_to_first_message_in_thread}'}"
    class="{xen:if $thread.hasPreview, PreviewTooltip}"
    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper wrap, $thread.title, 50}</a>
    <xen:if is="{$thread.isNew}"><a href="{xen:link threads, $thread}" class="unreadLink" title="{xen:if {$visitor.user_id}, '{xen:phrase go_to_first_message_in_thread}'}"></a></xen:if>
    
    I think that should do the trick...
     
  8. Smooth

    Smooth Active Member

    :D thank you all! Super speedy responses!

    I tried them in order... and tried Brogans first... worked an absolute treat.

    Thank you!
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Russ' is actually more correct, I was being lazy and only did the first half of the code ;)
     
  10. Smooth

    Smooth Active Member

    Have ammended to Russ' instructions.

    Thank you both!
     

Share This Page