vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - Subscribed Threads in Notifications (https://vborg.vbsupport.ru/showthread.php?t=250461)

MoMan 11-08-2010 05:00 PM

I've updated the original post with the latest version of the memcache version of this modification, which uses memcache for both count tracking and thread read times. In the future, I may release the further-improved version which uses memcache only for count tracking.

The non-memcache version of this mod is provided as-is and is not supported. It uses the same queries as the other version, however, so it really should work. I had a look at the code, and saw no problems. There must be something wrong with your forum's read marking- it must not be properly updating the threadread table.

jscieza 11-10-2010 04:31 PM

Well, there are two bugs in this product:

Bug #1
There aren't notifications for email based subscriptions. I mean, members only get notifications of threads subscriptions made with the option "without email notification". If someone has a thread subscribed with instant/daily/weekly email notification then they will not receive notifications in the top right corner but email notifications will be dispatched to the member's inbox as usual.

Bug #2 (strange)
After marking all forums read the subscribed threads notification is still present (it's always 1). I remember it was working fine but now it isn't. That's why I'm marking this bug as strange.

I'm talking about the NOMEMCACHED version running in a vB 3.8.5 forum. The programmer already said that that version is provided as-is so we can't expect any further updates :(

MoMan 11-10-2010 05:47 PM

I don't believe this is an issue with the plugin itself. I've tested both of these things successfully on two separate forums. All I can think of is that other settings/plugins are conflicting with it. I also use is on my own site, on which the users aren't reporting any problems (at least after I introduced the "clear notifications" feature ;))

To debug bug #2, go into the threadread table and see if all records for your username have the same timestamp. If not, then the discrepancy is what the system is picking up as a new thread.

Try the memcached version- it's a lot better!

jscieza 11-10-2010 06:19 PM

Quote:

Originally Posted by MoMan (Post 2120299)
To debug bug #2, go into the threadread table and see if all records for your username have the same timestamp. If not, then the discrepancy is what the system is picking up as a new thread.

Hello,

First of all thank you for the useful info.

I went ahead and performed the following SQL query:
Code:

SELECT *
FROM `threadread`
ORDER BY `threadread`.`userid` ASC
LIMIT 0 , 30

And this is what I got: http://img203.imageshack.us/img203/9169/readtimes.png

Is 'readtime' the timestamp that you're talking about? If so, is there anything wrong with my threadread table? :(

MoMan 11-11-2010 11:00 PM

Now you should run a similar query on the subscription table to see which threads you're subscribed to. Then we can take a look and compare.

jscieza 11-12-2010 03:33 AM

I ran this:

Code:

SELECT *
FROM `subscribethread`
ORDER BY `subscribethread`.`userid` ASC
LIMIT 0 , 30

And got this.

It looks like the subscribethread table doesn't have a timestamp column so how to compare against the threadread table?

If I read the thread then the notification disappear (as designed). Issue here is that after marking all threads as read (mark forums as read) the notifications for subscribed threads don't disappear.

jscieza 11-12-2010 06:26 PM

I even performed the following SQL queries:

Code:

DELETE FROM subscribethread;
DELETE FROM threadread;

And the problem obviously disappeared but as soon as I added new threads subscriptions to my account and then marked all forums as read there is still one thread subscribed notification in the top right corner. I'm getting crazy, trust me :mad:

MoMan 11-14-2010 05:05 PM

Quote:

If I read the thread then the notification disappear (as designed). Issue here is that after marking all threads as read (mark forums as read) the notifications for subscribed threads don't disappear.
You're right, that indeed seems to be the behavior for the non-memcached version. That's because, unlike I thought, the threadread table is never updated.

I see two solutions:
1. Checking the last time the forum was marked read before running the subscribed thread query
2. Updating threadread where userid = $vbulletin->userinfo['userid'] with TIMENOW when $_REQUEST['do'] == 'markread' by adding code to the plugin

MoMan 11-14-2010 06:04 PM

Since forumcache doesn't store the forum read time, I went with #2 and implemented that. Note that now the notifications will clear when you mark all forums read, but not when you mark an individual forum.

jscieza 11-14-2010 06:49 PM

Thanks for the workaround. I'll try it soon.

Uhm... the memcache enabled version doesn't have this issue, right?


All times are GMT. The time now is 09:37 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.01727 seconds
  • Memory Usage 1,741KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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