XF 2.1 How to add "Go to last post" button at top of top of threads (not new post, but previously read threads)

CZ Eddie

Active member
If I click on a thread with new posts, there is an option to "go to new post". Which is nice.
But my users miss having a button from the old forum.
It was a "Go to last post" button that appeared at the top of every thread, regardless of whether there were new posts or not.

Is this something I can add somehow?
 
@cclaerhout has an add-on which I use, to add an icon alongside the page edge to Go to Top! (or Bottom) with a single click. Several available settings which should probably allow you to adjust it as you wish.

XF2 actually has this feature built-in. :)
Thanks though. I do like and use it but often forget its there.

You can click the date/timestamp of the last poster.

Thanks for the suggestion.
I did figure that one out eventually.
Training users to do it would be impossible I think.

There are obviously workarounds as the two of you have suggested.
It would be nice if someday a button were added to the top of the page, just as there is when there is a new post you have not yet seen.
 
Thanks, I tried my best.

In thread_view template after line 125 I added this following code
HTML:
                        <xf:button href="{{ $firstUnread ? ('#post-' . $firstUnread.post_id) : link('threads/latest', $thread, {'new': 1}) }}"
                            class="button--link"
                            data-xf-click="scroll-to"
                            data-silent="true">
                                {{ phrase('jump_to_new') }}
                        </xf:button>
I probably will change the phrase to something more fitting but it seems to work.
 
Thanks, I tried my best.

In thread_view template after line 125 I added this following code
HTML:
                        <xf:button href="{{ $firstUnread ? ('#post-' . $firstUnread.post_id) : link('threads/latest', $thread, {'new': 1}) }}"
                            class="button--link"
                            data-xf-click="scroll-to"
                            data-silent="true">
                                {{ phrase('jump_to_new') }}
                        </xf:button>
I probably will change the phrase to something more fitting but it seems to work.

Hello, how to directly jump to the latest unread post without having to click on that button?
Can you please share the code to put into the template thread_view?

Thx
 
Top Bottom