PDA

View Full Version : Real "read/not read" threads and "new messages in forum" highlighting 1.1


JohnWoo
12-28-2002, 10:00 PM
Hello !

Think that i finished testing and optimizing beta hack from
https://vborg.vbsupport.ru/showthread.php?threadid=47035
:)

Features:
- Thread on forumdisplay highlighted for user as read only if that user saw last post in that thread or if last post in that thread is older then user defined (from user CP options) amount of time (from 1 to 999 hours and infinity)
- Forums on index page and subforums on forumdisplay pages will be highlited as "have no new posts" only if user saw last post in that forum or subforum
- Highliting system is completly cookie-free
- System will require extra Database space (2-4% on large forums and 5-6% on small)
- Sytem will add some extra queries to scripts

-one addditional UPDATE is showthread.php
-one additional SELECT (of 2 fields only) for each subforum on forumdisplay.php
-one addditional UPDATE in newthread.php
-two addditional UPDATE in newreply.php
-"mark forum read" works using one extra SELECT and one extra UPDATE
-and "mark all forums read" using one extra SELECT and one extra UPDATE for each forum :)


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 "thread" 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". 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 string in that view field 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 "view" field of 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) was added new "view" 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 thread in that forum (or in all forums:)
Sorry for my English and please ask questions if you don't understand something :)

Chris M
12-29-2002, 04:08 PM
Nice:)

I'm gonna test this out:)

Satan

Smoothie
12-29-2002, 04:17 PM
Is there a live site with this installed? Seems very interesting. Also, is it server intensive?

JohnWoo
12-29-2002, 04:23 PM
There was site. But it is down last 3 weeks and board will be replaced by ibforums (because of expired vb license). And no :) it is not server intensive at all :) Admins say that nothing changed after installing.

Icheb
12-29-2002, 04:35 PM
So there are sites where it can be tested?

JohnWoo
12-29-2002, 04:42 PM
Actually only 1.0 was tested :) And it much more server intensive... 1.1 was tested only locally and i asked 2 my friends to install it, but their forums have about 2 posts\month, so it was not real testing - sorry :)
But from localhost (2.2.6) everything works :)

350Chevy
01-02-2003, 12:54 AM
Originally posted by JohnWoo
.........(because of expired vb license).......

Um, I thought the license never expires. Your support just stops after a year. Then after that you just pay a few dollars($30) for another year of support and downloads. ;)

Any screenshots avail? Or does the look of the board not really change?

Mystis
01-02-2003, 03:18 AM
Originally posted by 350Chevy
Um, I thought the license never expires. Your support just stops after a year. Then after that you just pay a few dollars($30) for another year of support and downloads. ;)

Depends, if you buy the owned ($160) license then that is the case, however if you buy the leased license then, yes, he is correct.

350Chevy
01-02-2003, 05:32 AM
Ahhh... gotcha.. :)

JohnWoo
01-02-2003, 07:11 AM
Becides i have hazy idea about all that licensing things :)
I was just hired and administering vb was my job (for mor then year) And now, for some strange reason, i have to start from the beginning and go investigate ibforums... And i don't like it at all.

And here is screen shot :) part of showthread.php

Paul
01-04-2003, 10:24 AM
I will be testing this myself. We've gotten a number of complaints from a few users that have been missing new threads and who have been asking for a better way to manage what they've read.

I will post the results here in the next few days.

Best wishes,
Paul

MacKenzie
01-04-2003, 06:15 PM
Just a question, perhaps it was in the hack description and I missed it...

But will this hack allow to un-read threads to be marked as new indefinately, or will they still eventually be marked as read?

JohnWoo
01-04-2003, 06:47 PM
Hello !

Not sure that i understand this question correctly - sorry :)
But to marked as read thread need:
- user opened showthread page after last post in that thread
- or last post in forum was in that thread when user desided to "mark read" that forum or all forums
- or last post in thread older then number of hours specified by user in his CP options and if that number of hours is not zero

under any other condition thread will be marked as unread :)

MacKenzie
01-04-2003, 11:01 PM
let me rephrase the question....

How long will unread posts stay unread when user does not read the thread, does not open the thread, and just reads other threads instead?

Icheb
01-04-2003, 11:15 PM
It will be marked unread until the user reads the thread, not a second earlier.

MacKenzie
01-04-2003, 11:26 PM
thanks

Taco John
01-05-2003, 04:53 AM
I've been looking for a hack like this all week... Funny how I run into it on accident...

I'll install it right away and report back after some testing... :)

JohnWoo
01-05-2003, 06:54 AM
Originally posted by MacKenzie
let me rephrase the question....

How long will unread posts stay unread when user does not read the thread, does not open the thread, and just reads other threads instead?

Icheb is right in case of zero in user CP "Highlight as read threads without new posts last" settings :) If there is some other number, unread threads will be marked as read after that number of hours :)

MacKenzie
01-05-2003, 12:43 PM
Thanks.

Excellent hack. We've been needing this feature on my forums. love VB... just hate 2.X.X's method of timing out new posts.... especialy when I tend to spend a half hour to hour making a response post to any number of threads in my debate category ;)

MetroSports82
01-07-2003, 02:43 AM
screenshots?

Icheb
01-07-2003, 11:34 AM
Read the thread again, then you'll find a screenshot. Besides, is your imagination that weak? ;)

MetroSports82
01-07-2003, 12:21 PM
Possibly.... :D thanks. ;)

Paul
01-20-2003, 05:47 AM
We've yet to install this hack but we're revisiting this method--has anyone successfully installed it? If so, how are things since you've done so?

Best wishes,
Paul

bologna.com
02-08-2003, 04:33 PM
Excellent!

Great installation instructions and works like a breeze.

http://www.nobigtoe.com

350Chevy
02-08-2003, 05:06 PM
Nice hack but one extremely large problem here!

My site when from 28 queries on the home page to 49!!!

I love what it does but I'd like to keep my server healthy. ;)

JohnWoo
02-08-2003, 05:37 PM
Hello !


My site when from 28 queries on the home page to 49!!!


Yes :) It ads one additional query per forum on index.php...
Sorry, but it is a pay :) I am still thinking at optimizing...
But only index.php is so large problem. On all other pages it is not too heavy and you may not change index.php at all and leave it without real highlighting. After it "not read messages" on forumdisplay.php and search.php will be still real :)

kylek
03-20-2004, 06:30 PM
Has anyone installed this on the new vb3 gold version? any problems / does it work?. And for a newbie when it mentions commenting lines of post then adding new after the comment, is it just basically adding whatever is mentioned after what to find/ hope this made sense !

JohnWoo
03-20-2004, 06:58 PM
please wait :)
I'll do some tests today and upgraded version for vb3 must appear tomorrow :)

kylek
03-20-2004, 07:24 PM
What a great weekend this has turned out to be, first vb3 gold is released and now the one thing that everyone of my members +++++es about will hopefully be taken care of. Thank you very much JohnWoo !!!!

JohnWoo
03-21-2004, 08:24 PM
Sorry kylek, but i have not much time for playing with it today...
but hope that this one will work :)
https://vborg.vbsupport.ru/showthread.php?t=62748

kylek
03-21-2004, 11:10 PM
No problem, I will go and check that one out. Thanks !!