inherit
162752
0
Nov 7, 2024 3:58:23 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jan 9, 2015 12:39:13 GMT -8
I've written a plugin showing unread threads on the posts page : but what I want to do ( and can't! ) is, when you click 'NEW' it would take you to the oldest unread post in that thread. Would anyone know if it is stored on the user end or server side? And if on the user side, where? For example, the 'NEW' href is: <a href="/threads/recent/446262" class="">new</a> Selecting to link to a post in a thread is: http://support.proboards.com/post/5153500/thread Which would both take you to: http://support.proboards.com/thread/446262/vdice-dice-rolling-proboards-v5?page=1&scrollTo=5153500 Any help, good or bad news, would be appreciated! Cheers, Pebble.
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jan 10, 2015 9:52:24 GMT -8
I think you'd just have to do it upon coming to the page, because isn't the last post ID in the pb data object for the thread? Just stick a parameter in the url and check to see if it's set before changing page (if needed) and scrolling down to the last post. Otherwise, you could just check to see if there are any pages, and if there are: change to that page, and find the last instance of a post and scroll to it.
|
|
inherit
162752
0
Nov 7, 2024 3:58:23 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jan 10, 2015 11:03:41 GMT -8
Hi Bennett 🚀, I looked at the pb.data and for a thread there is the following: "533576":{"is_sticky":0,"last_post_id":6170178,"is_locked":0,"is_new":1, "created_on":1417387450,"url":"/thread/533576/flag-important-threads", "is_poll":0,"id":533576,"subject":"Flag Important Threads", "last_post_time":1420865326,"first_post_id":6119222,"is_bookmarked":0, "is_announcement":0, "is_falling":0,"board_id":35,"created_by":19529} So, from this I can get to the first post and the last post in that thread, but not the 'first unread post'. If someone hasn't checked in for a couple of pages then taking them to the last post is probably just as annoying as taking them to the first! I can't seem to find any reference to the first unread post
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jan 11, 2015 5:50:51 GMT -8
As far as I'm aware, '/threads/recent/446262' IS a direct link to the latest unread post in that board, the only issue is that you'd have to be outside of that thread for it to work.
As soon as you enter a thread it is assumed read, and so the last unread post would become the last one, even if you entered the thread on the first page.
|
|
inherit
162752
0
Nov 7, 2024 3:58:23 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jan 11, 2015 9:38:03 GMT -8
Cheers Todge. I'm using the above '/threads/recent/446262' but after reading your post I saw that I had an obvious mistake in the code which was taking me to the first post. So obvious I couldn't see it! I can now stop bashing the keyboard and give my head a few well deserved slaps!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jan 11, 2015 12:24:05 GMT -8
No worries..
I thought it was a strange question to come from you.
|
|