Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Subscribed Threads in Notifications Details »»
Subscribed Threads in Notifications
Version: 1.1.1, by MoMan MoMan is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.x Rating:
Released: 09-13-2010 Last Update: 08-08-2011 Installs: 50
Uses Plugins
 
No support by the author.

As seen on www.pentaxforums.com/forums/ , I'm bringing you a handy mod that adds the number of new subscribed threads to the notifications area, as well as a link to subscription.php. This means that whenever someone replies to one of your subscribed threads, you don't have to check your user cp or your e-mail inbox- just click on the notification! Notifications can also be reset via the User CP (memcached version only*).

This mod is provided free of charge, but I ask that the copyright and contact information be retained within the SOURCE. There are no visible copyrights for this mod. Furthermore, I ask that you do not re-use this code without my permission.

Non-Memcached Version:
Time to install: <1 minute (upload 1 product file)
Current Version: 1.1.0
Queries: 1 per pageload for logged in users
Templates: 0
New Phrases: 1
Compatibility: vB 3.7.x-4.x

Love this mod? Support further projects by donating: http://www.pentaxforums.com/forums/donations/

Enjoy and don't forget to mark this as installed if you decide to use it! Limited support will be offered to those who click install.

Note to owners of large forums: I also offer a version of this mod that does not add any global queries and instead utilizes memcached. I can install this premium version on your site for an hourly charge, assuming your server already has memcached installed. Send me a PM for details.

Download Now

File Type: xml product-adam_subsct.xml (3.0 KB, 236 views)

Screenshots

File Type: png adams_new_thread_notifications.png (12.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
hhwforum, markoroots

Comments
  #52  
Old 11-08-2010, 05:00 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #53  
Old 11-10-2010, 04:31 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #54  
Old 11-10-2010, 05:47 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #55  
Old 11-10-2010, 06:19 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MoMan View Post
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?
Reply With Quote
  #56  
Old 11-11-2010, 11:00 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #57  
Old 11-12-2010, 03:33 AM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #58  
Old 11-12-2010, 06:26 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #59  
Old 11-14-2010, 05:05 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #60  
Old 11-14-2010, 06:04 PM
MoMan MoMan is offline
 
Join Date: Oct 2005
Location: USA
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #61  
Old 11-14-2010, 06:49 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Uhm... the memcache enabled version doesn't have this issue, right?
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 06:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05583 seconds
  • Memory Usage 2,341KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete