vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Mark Threads Unread (vB4) (https://vborg.vbsupport.ru/showthread.php?t=302901)

nerbert 10-02-2013 10:00 PM

Mark Threads Unread (vB4)
 
1 Attachment(s)
This product undoes thread read marking so the thread will show in New Posts in case you want to come back to it later. Open the Thread Tools menu and click the button at the bottom. Enable/disable is in General Settings.

Improved version now handles both database and cookie methods of marking threads read. The link now shows only for threads younger than the read marking limit.

Bug fixed The improved version had a bug, which I have fixed.

Installation: Import the product file in Product Manager

nerbert 10-03-2013 03:18 AM

Reserved

ozzy47 10-03-2013 09:01 AM

That's cool nerbert, glad you found a way to do it. :)

cellarius 10-03-2013 10:41 AM

It should be mentioned that this only works for threads that are newer than the global new/unread cutoff. If your forum shows new threads to your users for seven days, only threads from the last seven days can be marked unread. Or did you find a way around that?

nerbert 10-03-2013 11:24 AM

When thread is marked read the threadid, userid and read time are recorded in the data base. This product simply deletes that entry based on threadid and userid.

I haven't followed through all the code but I would assume a year old thread isn't shown in New Posts simply because search.php searches back only so far (the seven days you used for an example). So to show a thread older than seven days you would have to build a special table to store ancient threads marked unread and append that list to the New Posts search. It's doable I suppose but far more work than I want to get into.

cellarius 10-03-2013 02:00 PM

Quote:

Originally Posted by nerbert (Post 2449653)
When thread is marked read the threadid, userid and read time are recorded in the data base. This product simply deletes that entry based on threadid and userid.

That's what I derived from your code ;)

Quote:

I haven't followed through all the code but I would assume a year old thread isn't shown in New Posts simply because search.php searches back only so far (the seven days you used for an example).
That's not how it works. Search.php has nothing to do with it. The markread table is pruned by a cron job. All threads that are older than the cutoff will be deleted from that table automatically. It would grow enourmously big if that would not be the case, since a value is stored for every thread for every user that reads it.
Quote:

So to show a thread older than seven days you would have to build a special table to store ancient threads marked unread and append that list to the New Posts search. It's doable I suppose but far more work than I want to get into.
It's not only for the New Posts search. The unread markings are used all over the place (bolding in showthread, for example). And there are other tables (for read groups, for example).

Your addon does what is possible, and I'm sure many will find it very helpful. It's great you made it. I've looked into the system quite extensively for an addon of mine, and chances are you'll pretty soon hear requests to extend it. I had to explain the limits of the system quite a few times...

tbworld 10-03-2013 08:04 PM

Thank you @Nerbert and @Cellarius, I looked at the code for unread markings and received a headache for the undertaking. I really appreciate your discussion on this subject.

cflyrun 10-04-2013 04:51 PM

Even if it's only able to be marked unread for one day, that'll still do it. I have an online classroom and check the forums every day, sometimes I want to mark a thread unread to come back to in a day or so, not usually longer than that. Sweet, installing now, THANKS. Happy to donate a bit of $ as well...

DF031 10-04-2013 05:15 PM

Hi all,

Where do I find my current "global new/unread cutoff." ?

tbworld 10-04-2013 09:36 PM

Quote:

Originally Posted by DF031 (Post 2449954)
Hi all,

Where do I find my current "global new/unread cutoff." ?

I am taking a stab at what you are asking. See if this helps:
ACP -> Options -> Settings-> General Settings --> Database Read Marking Limit


All times are GMT. The time now is 09:11 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
  • Page Generation 0.01111 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete