Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Real "read/not read" threads and "new messages in forum" highlighting v1.2 Details »»
Real "read/not read" threads and "new messages in forum" highlighting v1.2
Version: 1.00, by JohnWoo JohnWoo is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-20-2004 Last Update: Never Installs: 4
 
No support by the author.

Hello all!

It is just a vb3 version of old hack
https://vborg.vbsupport.ru/showthread.php?t=47101
And with same weak sides.

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 profile) 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 (if there are new posts since your last visit of that thread)
-one additional SELECT (of 2 fields only) for each subforum on forumdisplay.php
-one additional SELECT (of 2 fields only) for each forum on index.php
-one addditional UPDATE in newreply.php
-"mark forum read" works using one extra UPDATE
-and "mark all forums read" using 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 thread in each forum and if it found, display that there were no new posts in that forum.

Additionally read\unread marking can be time based (new field ) "marktime" in users custom fields. 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 profile settings.
And at last to mark forum (or all forums) read we just mark read last thread in that forum (or in all forums

History:
v.1.2
Fixed moved threads highlighting.
some changes in functions.php and functions_forumdisplay.php

v.1.1
Fixed SQL request. If you tried to install v 1.0 already, better drop view field
ALTER TABLE `thread` DROP `view`
and recreate it again
ALTER TABLE `thread` ADD `view` TEXT NOT NULL

Sorry for my English and please ask questions if you don't understand something

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-24-2004, 02:47 PM
codemonkey codemonkey is offline
 
Join Date: Jan 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ohh now it works fine. there is only one problem: The "mark all forums as read" function doenst work.
Reply With Quote
  #23  
Old 03-24-2004, 03:45 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"mark all forums as read" must mark as read last thread in each forum. After all forums on index.php must not be highlighted. It don't work? Or may be you want to be marked as read all threads in all forums? If yes? then there is no way to mark all threads in all forums as read (because it will update all threads in database ) - sorry.
Reply With Quote
  #24  
Old 03-24-2004, 04:30 PM
codemonkey codemonkey is offline
 
Join Date: Jan 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JohnWoo
"mark all forums as read" must mark as read last thread in each forum. After all forums on index.php must not be highlighted. It don't work? Or may be you want to be marked as read all threads in all forums? If yes? then there is no way to mark all threads in all forums as read (because it will update all threads in database ) - sorry.
But then your hack makes no sense. sorry but why will not every thread mark as read? Like in phpBB or something else.
Reply With Quote
  #25  
Old 03-24-2004, 04:48 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know nothing about phpBB, but lets say that you have board with 100.000 threads and 10.000 members. Then when some member will deside to "mark all threads read", vB will have to run query with 100.000 affected rows. And update of text field in 100.000 rows at once will kill your MySQL server, and if it will be still alive, what if 200 members at once will decide to do same thing? So I am sure that it will never be possible in that highlighting scheme. Besides i don't understand what for do you need it - sorry
Reply With Quote
  #26  
Old 03-26-2004, 01:48 AM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed but problem.....

everything is lit up as if there were new replys to everything. but only one thread has been made. Everything is bold. did I need to change something? and where?
Reply With Quote
  #27  
Old 03-26-2004, 05:05 AM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, but i am not sure that i understand
If somebody post reply to thread that was marked as read ( marked for you) it must become bold (unread) because it means that you have not read it yet completely?
Or all threads become unread after reply to one single thread? If first, it was supposed to be so, and if second, you need to check changes in newreply.php
Reply With Quote
  #28  
Old 03-26-2004, 09:03 AM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no replies whatsoever right now
Reply With Quote
  #29  
Old 03-26-2004, 09:17 AM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still understand nothing - sorry
You always see all threads as unread or you never tried to open that threads or they all turn to unread after one single reply ?
Reply With Quote
  #30  
Old 03-26-2004, 05:38 PM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry but I really don't understand what you don't get from my pics and explination.

I installed this. EVERYTHING shows up as UNREAD no matter what!
Reply With Quote
  #31  
Old 03-26-2004, 08:39 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

then if you completely sure that scripts were changed correctly, extra field was created as
NOT NULL
(it was fixed in v.1.1) and you have no NULL values in that field for all posts, I have no ideas - sorry... It works on my side.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04270 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete