The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Number of Unread Posts per Thread?
Hello,
I am interested in implementing functionality like the Something Awful forums where, after a user has read a thread, the "go to first new post" button also reads out the *number* of unread posts. Is this possible? So far, all I know is that this is the go to first new post button code: Code:
<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a> </vb:if> Code:
<vb:raw threadinfo_unreadpostscount> Thank you so much in advance for any help you can provide. |
#2
|
|||
|
|||
I have really never looked into it, so I am waiting for other experts on the vbulletin.org to chime in. There is this modification that may give you some insight into the process.
Display Unread Posts (and Reputation Comments in 4.1) https://vborg.vbsupport.ru/showthrea...=231060&page=4 If no one replies, then I will revisit the question for you. |
#3
|
|||
|
|||
I have to be honest, I can't find anything in that plugin to use as a template call for unread post count per thread. Perhaps it's something that is not even tracked?
|
#4
|
|||
|
|||
For posts in a thread, a record of the last post read in the thread, by the user, would have had to been stored. Looking at the database tables I do not see anything that can be used to derive it and unfortunately the way vb handles unread posts does not get us there either. It might be possible to extract recent read post information from the activity stream, but I have to ponder that some more when I have a fresh brain.
Sorry, for the bad news, it would have been nice if it was easily possible. |
#5
|
|||
|
|||
Thanks for the help anyway, tbworld
|
#6
|
||||
|
||||
vB stores read/unread-information as a timeline per thread per user, i.e. it safes the time the user last looked at the thread. One would have to get that time, then count all posts in the post table that have been posted to a said thread after that time. Since this would have to be done with every load of showthread, it has the potential to add a lot of additional strain on the database, especially the post table. It probably is possible, but I would definitely advise against it.
|
#7
|
|||
|
|||
Thanks @cellarius! Very nicely worded.
I have to quit doing research at 4am, for some reason I completely overlooked the 'post' table. I did conclude that on a busy board the extra server load, might not make this feasible, but at least now it is possible. Thanks again for the input. @Cedric FP, I will add this to my backlog and take a further look at this when I have time. |
#8
|
|||
|
|||
Thanks cellarius. Though my ability to write something like that is severely limited, I will try to give it a go anyway. The server load is a good point. I wonder if it is possible to only have it count the unread posts of someone who has already visited the thread at least once. That way, it partially acts as a thread subscription.
@tbworld - thanks. I would greatly appreciate any further help on this issue. Edit: I wonder if there is any similar functionality built into the thread subscription system? |
#9
|
||||
|
||||
Quote:
Quote:
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|