Support Forum

Last message read

MR Marco Rossi
Marco Rossi
Member

I could not find so open a new thread.

I migrated the forum from Simple Machine Forum to SimplePress and my users was used to one feature that, actually, is very comfy: when an user open a thread, it goes automatically to the last new message that he doesn’t have read.

So, if it’s a new thread (for that user, that never visited it) it starts from beginning but if, for examples, thread has 10 pages with 100 replies and he read until 68th, when open the thread he starts to see from #69 message. veeery comfy.

This is something that SP already has and I didn’t found? may be a setting that I missed, or it’s something new? and, in this case, this is an advice to add this feature in SP :)

Thanks in advance, this forum (both plugin and assistance) is great.

Marco

20 Answers

New Answer

BR Brandon
Brandon
Member

When looking at a list of new or unread topics any that have a “new” button next to them will take the user to the newest last read post not the last post. 

MR Marco Rossi
Marco Rossi
Member

Hi Brandon,

ok but not all users want to use that list, mostly part of (at least mostly part of mine) click on thread title and expect that it opens to the last post that they have read, may be weeks before.

To go in menu list and browse what there is new, it’s a good thing, well organized but many users simply browses forums, enter in what they are interested and click on a thread and don’t want to browse all posts until find the new one.

Anyway if this topic has been already faced and that one is your solution, I accept it but ask anyway if should be possible to add this feature to the existing one.

Thanks in advance.

 

Marco

BR Brandon
Brandon
Member

You could probably add an extra “new” button that sends a user to the first unread post in each forum listing. Quite a few of my requests, on custom themes I have created, is showing the new/recent list to the user at the top of the group view page instead of at the bottom.  That way when a user goes to the main forum page the first thing the see is that list. They then can look through it and click on any topic that interests them without having to go to each forum and see what’s new.

There is even a way to add the first topic info and last topic in the list. I use something like that here http://placeshiftingenthusiasts.com/forum/ but at the bottom of the group view not at the top. It can be placed at the top easily though.

MR Marco Rossi
Marco Rossi
Member

Well, I should but, in short, a user have to click on a button to go to the latest read post in that thread, instead to click on thread title and simply enter in it?

Also I have a responsive site and when look in this forum (css only theme) with mobile, there are already too many buttons to slalom between :) so adding another one that does the work that simply clicking on thread does, seems a bit redundant, to me.

Anyway, thanks again for support, you are incredibly fast :)

Marco

MR Marco Rossi
Marco Rossi
Member

Users are crucifying me because I insisted to change SMF for SP and now they don’t have this comfy feature to read threads, so I come back to you asking (begging?) you if have considered to add this in one next version.

Thanks in advance

Marco

MP Mr Papa
Mr Papa
Member

wow, that would be extremely annoying to me, if it took me directly to the last unread post… most definitely not what I would want…  and why the last???  why not the first???  if this was something I had to deal with, the first would make way more sense than the last…

but hey, not trying to say you a wrong…  each person has their own opinions on just about every aspect of the forum – and I think we hear all of them! ;)

let me think on this for a bit, but I think I can give you a small piece of code for your spFunctions.php code that would enable your desired behaviour…

MP Mr Papa
Mr Papa
Member

can you try adding this to your spFunctions.php file of the sp theme you are using…

add_filter('login_redirect', 'my_login_redirect', 99, 3);
function my_login_redirect($redirect, $request, $user) {
    global $spThisUser;
    $spThisUser = sp_get_user($user->ID, true);
    if (!empty($spThisUser->newposts)) {
        $saveUser = $spThisUser;
        sp_forum_api_support();
        $redirect = sp_permalink_from_postid(spdb_table(SFTOPICS, 'topic_id='.$saveUser->newposts['topics'][0], 'post_id'));
    }
    return $redirect;
}

I think this will give you desired effect…

MR Marco Rossi
Marco Rossi
Member

Thanks Steve,

also a custom patch should be wonderful :)

Regarding use, I can assure you that opening a thread and arrive directly to the first not read post is very comfortable (may be I wrote uncorrectly “last new message that he doesn’t have read”, but I mean the FIRST that I don’t have read), imagine a 30 pages thread that I missed for some day/week and last post that I read was on 15th, to find it I should read a lot of them, browsinf pages, remembering what I read and finally find what I didn’t read, when I can be led directly to that post.

For first or last page the problem doesn’t exists because it’s only a 1 click far, depending form order that I have (if you become this optionally) choosen, clicking on first or lasta page button but, of course, the best should be make this behavior optional at list at administration level.

MR Marco Rossi
Marco Rossi
Member

Steve, you are too fast :)

But May be this is the right code for the FIRST not read message of for the LAST?

Apologies if I led you in a wrong way embarassed

MP Mr Papa
Mr Papa
Member

not sure what you are asking… it will give you the last post of the last unread topic…

if you want the last post of the first unread topic (what I said I would want)… change this line

$redirect = sp_permalink_from_postid(spdb_table(SFTOPICS, ‘topic_id=’.end($saveUser->newposts[‘topics’]), ‘post_id’));

MR Marco Rossi
Marco Rossi
Member

Well, what I need is: the first unread post of each topic.

If I never read a topic it drive me to first post, if I read partially it drive me to the first post that I didn’t read.

This should be the normal behavior for each topic.

My english is terrible, I know, my apologies, hope that now it’s more clear.

Thanks for your patience

MP Mr Papa
Mr Papa
Member

first unread post of each topic??? how do you want to load multiple topics?? yes, just getting confused… ;)

did you even try my code?

how about just loading the list of unread topics??? as if you had clicked on that button mentioned earlier?

MR Marco Rossi
Marco Rossi
Member

Mr Papa said
 

first unread post of each topic??? how do you want to load multiple topics?? yes, just getting confused… ;)

did you even try my code?

how about just loading the list of unread topics??? as if you had clicked on that button mentioned earlier?

Yes, I see that I created confusion, apologies.

And yes, I tried your code, it works well for meaning you conceived but it’s not what I need :(

I try again to explain me better with this scenario:

1) I go in forum page and see list of topics

2) I click in one topic’s title and

3) the list of posts that appears, starts with the first post that I didn’t read (like if use a permalink to that post).

Simple as that

Hope it’s more clear now embarassed

MP Mr Papa
Mr Papa
Member

now I just struggle with the use case… cannot image how that could be enjoyable user experience…

are you using the unread post list at the bottom of group view?? you users should already see a list of their unread topics… not every post, but a list of topics and the number of unread in each of those topics… then can click and go to that topic…

making that topic expand to a list of posts would be a significant change to core code… and not sure of the worth… each link would take you to the same topic and 99% of the time, the same page in that topic…