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

Last post question

Discussion in 'XenForo Questions and Support' started by dash, Sep 22, 2013.

  1. dash

    dash Member

    When a user is signed in they can click on the time of the last post to jump to the last post instead of opening the beginning of the thread. However this doesn't work for guests. Any way to enable this for guests?
     
  2. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Short answer: no

    The reason why is that the functionality requires storing in thee database a last read date, and without knowing the user that is not stored :)
     
  3. dash

    dash Member

    Actually clicking on the time of the last post jumps to the last post not the last unread post. Hence I don't understand why this can't work for guests.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Without knowing the reasoning, I am betting this was included to not display it to robots, but don't quote me on that. However, if you'd like to change the functionality, you can find this in thread_list_item:
    HTML:
                    <dd class="muted"><a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>
    
    Replace it with this to continue to hide it from robots (note that this is untested code):
    HTML:
                    <dd class="muted"><a{xen:if '!{$visitor.robotInfo}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>
    
    Or with this to show it to every one:
    HTML:
                    <dd class="muted"><a href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" rel="nofollow" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>
    
     
    Last edited: Sep 22, 2013
    dash likes this.
  5. dash

    dash Member

    Thanks. That worked great.
     

Share This Page