MyBB Community Forums

Full Version: When opening a thread, go to new post help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(I made a post in the support forum but I am also posting here since I could potentially get an answer here as well.)

I was wondering how I could get it so when people are viewing threads, when they click on the thread, it'll go to the most newest post of where they left off.

A couple of my members on my board get lost where they were since our threads move at such a fast pace and want to know where they can start reading from again when they stopped viewing the thread.

So here's an example of what I mean. Let's say my friends name is Bob. Bob makes a post:

Bob: Post A and then he leaves and let's say more posts came afterwards.
Post B
Post C and so forth to let's say...
Post T.

Now let's say Bob wants to go view the thread again. He clicks on the thread but what it does is just go to the start of the thread and he doesn't remember where he posted or what he needed to catch up on since he doesn't know what is truly unread yet.

So basically I just want to know where and what template I have to edit to add in the command "&action=newpost" at the end of a thread so that it links them to where they last posted and where all the new unread posts begin. I have a plugin that shows the most recent posts (up to 5 threads) that has the "&action=newpost" action in it so it's easy to remember, but if you just view the threads normally by viewing them in the forum categories, you'll simply get lost since you can't remember where you posted and where you left off.

Any help will be appreciated. I have been digging around but I have found nothing of yet. Thanks in advance.

(our forum gets over 10 pages everyday so it's very hard to keep up with. This will be a huge help if we know where to fix the template to include "&action=newpost".)

To make it simpler, where do I add the command "&action=newpost" to the showthread.php template so that on the forum, when I'm viewing the threads, the threads will have "&action=newpost" at the end of their links so they'll go to the last unread post?
You want to add it to links in forums? If yes, try this. In forumdisplay_thread replace:
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>

To:
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}&amp;action=newpost" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>

Also adding the {$gotounread} if you don't have it should do the thing and you will be able to enter the thread both ways.
You can just tell them to go to their profile > view latest posts > click on the post link rather then the thread and it will direct them there.

Not an exact solution, but a nice way around it.
Thanks for the help. I'll try out these things and see if they work.

+1 rep. Thanks guys works awesome.