![]() |
Real "read/not read" threads highlighting 1.0
Hello everybody !
Few words how it works :) As you know vb "marking threads and posts read" system is time and cookie based. This hack is based on adding to "post" table one extra field - "view" (suppose that it must work fine with TEXT type, but for really large forums we can make it LONGTEXT :) Now when somebody open thread, his usedid will be added to that "view" field of last post of thread. After several users (who open that thread) string in that field may look like 37 298 16879 7287 29087 28 298 So it will be just a long string with userid-s separated by space Now then user open forumdisplay.php script will check each last post of each thread for part of string [space userid space] and if is will be found thread will be marked as read. If you think that it will use too much database space, i can say that it will use some place of course, but not too much, because after each reply in thread (new last post in thread) all old data in all "view" fields of all old posts in thread will be deleted. On forum home page script looks for userid number in "view" field of last post in each forum and if it found display that there were no new posts in that forum. To make it work faster (with less database requests) i added "lastpostid" field in thread table :) Additionally read\unread marking can be time based (new field ) "marktime" in users table. And users are able to select number of hours (all posts older then that number of hours will be marked as read) in their CP options. And at last to mark forum (or all forums) read we just mark read last post in that forum (or in all forums:) Sorry for my English and please ask questions if you don't understand something :) PS Updated to 1.1. New thread here https://vborg.vbsupport.ru/showthrea...threadid=47101 |
what does it do?
|
If im correct this will not mark threads as "read" when your session has timed out. I would install it but im worried about it adding alot of clutter to my Database.
|
Hi!
Sorry :) just found part of missed code in .txt Fixed .zip in first edited post already :) |
John, do you have any idea how many querys this adds and how much processing time it will add to a forum?. Id love to add it but not if it will cause slower responce times.
|
:)
-one addditional UPDATE is showthread.php -one additional SELECT (of 2 fields only) for each thread or subforum on forumdisplay.php and search.php pages -one addditional UPDATE in newthread.php -two addditional UPDATE in newreply.php -"mark forum read" works using one UPDATE -and "mark all forums read" using one UPDATE for each forum :) So, in theory forumdisplay.php will work little slower, but i can't notice it using eyes only :) |
Quote:
|
Hey, as I know.... This is a good one.. BUT
it will add too much data that is not really needed to the database.. Why don't you make an Additional Table .. let's call it (thread_read) and add 3 fields (userid, threadid, timestamp) and then add to it so you can at least delete them from time to time especially if the topics are too old --> no need to specify who read it I hope this would help ;) thanx |
Quote:
|
Hello !
Quote:
Quote:
Quote:
PS It was the only feature that i really missed in vb :) |
I don't know if you can use a JOIN for that.
You combine two or more tables with a JOIN, and if that JOIN doesn't find something in one of the tables which matches the WHERE criteria, the entire query doesn't return anything if I am not mistaken. So you would have to enter something into that table thread_read (or however you want to call it) for every thread there is on your forum. |
This is a good feature...
I REALLY HATE how vbulletin uses cookies for this... If I read a thread i like the stupid ON gif to turn off!!! yet you have to wait 15 minutes for timeout so it will be marked as read.. isn't that stupid?! When online it's hard to see which forum you have read because the ON gif does not switch to OFF. I wish vbulletin would have a better system for read/unread threads and forums because the current system really sucks. I like the idea your trying to do though,.. only if someone could put some sense into vbulletin team to find a workaround for this. |
I just posted optimized version here :)
https://vborg.vbsupport.ru/showthrea...threadid=47101 Now it do no add extra db request for each thread on forumdisplay :) |
No Files Uploaded.
|
All times are GMT. The time now is 12:25 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|