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 10-26-2010 05:19 PM

Quote:

Originally Posted by asd_ra7la (Post 2114350)
Fatal error: Class 'Memcache' not found in /home/XXXXX/XXXX/global.php(400) : eval()'d code on line 588

Install memcached on your server (pecl install memcached via SSH), or use the non-memcached version of this hack.

jscieza 10-27-2010 06:48 PM

Quote:

Originally Posted by MoMan (Post 2113864)
I've now updated the non-memcached version to 1.0.1 final. This includes the missing phrase.

Maybe a good idea do the same (fix the missing phrase bug) in the memcached version :)

jscieza 10-28-2010 03:40 PM

Okay I went ahead and changed my thread/forum read marking type from cookie to database and installed the NOMEMCACHED product on my forum and it's working fine.

Only one issue. There aren't notifications for email subscriptions. I mean, members only get notifications of threads subscriptions made with the option "without email notification".

MoMan 10-30-2010 05:04 AM

I've updated the phrase. Also, I'm pretty sure it'll work for all kinds of notifications, as they're all stored in the same database table.

grey_goose 10-30-2010 05:29 AM

Tried to install nonmemcached version:

Fatal error: Class 'Memcache' not found in /home/user/public_html/forum/global.php(400) : eval()'d code on line 255

jscieza 10-30-2010 05:18 PM

@grey_goose: double check that you have downloaded the NOMEMCACHE.xml version.

@MoMan: unfortunately it appears that it isn't working for all kind of subscriptions. As I already said, this isn't displaying notifications for subscriptions made with email notification but with no email notification it's working fine. I'm talking about the NOMEMCACHE.xml version.

Thank you,
Jonathan

jscieza 11-04-2010 08:28 PM

Quote:

Originally Posted by jscieza (Post 2116103)
@MoMan: unfortunately it appears that it isn't working for all kind of subscriptions. As I already said, this isn't displaying notifications for subscriptions made with email notification but with no email notification it's working fine. I'm talking about the NOMEMCACHE.xml version.

Any update regarding this matter? Thanks.

MoMan 11-07-2010 03:33 AM

It does work for all types of threads- have a look at what the query does. It doesn't discriminate by subscription type.

jscieza 11-07-2010 03:56 AM

I'm not a programmer so I don't understand queries but I'll be more than happy if you can perform a quick review of the code of the NOMEMCACHED version to see if there is something wrong.

Thanks.

jscieza 11-08-2010 03:31 PM

Something strange is happening.

I have some thread subscriptions and I'm getting the notifications without any problem (except for the one mentioned here) but after marking all forums read the notification is still present! Please take a look at these screenshots for further reference:

http://img585.imageshack.us/img585/7015/crazy1.png
http://img89.imageshack.us/img89/9316/crazy2.png

I remember it was working fine (without this issue) but now this strange behavior is driving me crazy :(

Any idea?

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?

MoMan 11-15-2010 04:39 AM

No, because the last read time is stored in memcache, and updated when you mark forums read :)

jscieza 11-16-2010 11:52 AM

I do have another question regarding your memcache enabled version. You said:

Quote:

The memcached-enabled version caches the new thread count for 5 minutes
So do it means that the notifications aren't going to be in "real time" and there could be a delay of 5 minutes?

MoMan 11-16-2010 03:01 PM

Right, it can take up to 5 minutes for a notification to pop up after a reply has been made to a subscribed thread. However, once you open the thread, the notification is cleared immediately.

jscieza 11-21-2010 01:42 PM

There is another annoying bug in the NOMEMCACHED version.

Sometimes the product is adding notifications properly but sometimes when a subscribed thread gets updated (someone replies to it) the product isn't adding notifications. So in other words, sometimes it work and sometimes it doesn't. It appears to be a random behavior.

I don't know if the memcache-enabled version of your product is better or doesn't have this bug and I'd like to use the memcache-enabled one instead of the NOMEMCACHED version but as I already told you I'm running xCache not Memcache so let allow me to insist with this:

Quote:

Instead of making use of Memcache specific code why don't you simply make use of vBulletin cache, and if your vB uses xCache/Memcache/etc., then the hack will get advantage of this? Also if you go in this way you will not need two versions of your mod anymore as because if your vB doesn't make use of any cache then nothing will be cached.
https://vborg.vbsupport.ru/showpost....8&postcount=25

Quote:

Is there any documentation on that? I'll gladly tweak the public version of this mod to use the vBulletin interface if such an interface is available.
https://vborg.vbsupport.ru/showpost....2&postcount=26

I was talking about this.

jscieza 11-21-2010 01:56 PM

Just updating the bugs in the NOMEMCACHED version for anyone interested:

Quote:

Originally Posted by jscieza (Post 2120275)
Bug #1 - Status: the bug is still present. Note: programmer is unable to reproduce this bug.
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 - Status: this has been fixed (check here and here)
After marking all forums read the subscribed threads notification is still present (it's always 1).

Bug #3 - Status: Awaiting reply from the programmer
Sometimes the product is adding notifications properly but sometimes when a subscribed thread gets updated (someone replies to it) the product isn't adding notifications. So in other words, sometimes it work and sometimes it doesn't. It appears to be a random behavior.


MjrNuT 11-30-2010 03:20 PM

I can confirm Bug #2 in the one day of using the Non-memcached version.

I tried the memcached version but do not have a memcacher server available to me.

uninstalled

jscieza 11-30-2010 08:03 PM

Bug #2 has been already fixed by the programmer.
Quote:

Note that now the notifications will clear when you mark all forums read, but not when you mark an individual forum.
And it's working fine now.

Issue here are bugs #1 and #3.

MoMan 12-01-2010 03:47 AM

I'd like to remind you that the non-memcached version isn't supported, and that I use the memcached version of this on my own site with no problems. If there were bugs, my members would have complained.

Perhaps there's some sort of setting conflict with your particular installations (this goes back to the cookie-based vs database thread marking), I'm not sure.

MoMan 12-14-2010 11:49 PM

I've updated both versions of this mod:

If a soft-deleted thread was still unread, a notification would be shown even though the thread wouldn't be visible to the user. I've now added an AND visible = 1 statement to the query to avoid such conflicts. I recommend you upgrade to 1.0.3 if you're using the non-memcached version of the mod.

jscieza 12-15-2010 01:17 PM

Hi MoMan,

Now all the bugs listed here are resolved.

Thanks for updating your hack :)

Regards,
Jonathan

MoMan 04-20-2011 12:51 AM

I've updated the non-memcached version: it now only uses 1 query, rather than 3, and the overall quality of the code has been improved.

I currently don't have the time to update the memcached version, although this shouldn't matter as much due to the caching.

8thos 07-09-2011 09:53 PM

Non-memcached version of this working fine in vb4.1.4

MoMan 07-24-2011 10:45 AM

Great to hear! I can re-release this in the vb4 section, then.

MoMan 08-11-2011 01:30 PM

I've updated this thread with the latest version of this mod. I've also removed the memcached version, as it seemed it was caused more confusion than it did good. If admins of large forums are looking for a more efficient version of this hack, please contact me via PM.

Amenadiel 11-19-2011 10:23 PM

I tried the memcached version when it was still free. Now I regret not keeping the xml back then :P

Pvtiste 01-25-2012 06:33 PM

Is there a way to disable this notification via usercp?
Thanks

Pvtiste 01-27-2012 01:00 PM

Ok here the modification in order to enable/disable the notification via usercp :

Create a customfield and remember the ID then modify the .xml

Line 27:

PHP Code:

if ($vbulletin->userinfo['userid'] > && $vbulletin->userinfo['xx'] == "Disable"

That's it

Donkey11 04-15-2013 04:18 PM

Hi

After installing when click "Today's Posts" an error

Code:

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501


Help me

Tyran1 05-10-2013 09:26 PM

Quote:

Originally Posted by Donkey11 (Post 2416529)
Hi

After installing when click "Today's Posts" an error

Code:

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501

Warning: Cannot use a scalar value as an array in [path]/search.php on line 2501


Help me

and search zb"profil" usw ... BUG !!!!

jgrakowski 02-16-2014 09:19 AM

I have a problem with this mod.
i have added this mod (sound plays when page loads if notification exists) to my forums, using this sound.
So when someone replies to a subbed thread, notification sound plays.

The problem is, when YOU post a reply in a thread that you are subscribed to, you get a notification, until it becomes marked as read.

with both of these mods the way they are, when you post in a subbed thread, you hear the notification sound.

I was wondering if there is a way to alter this mod so that your own posts in a thread you are subbed to never cause a notification.


All times are GMT. The time now is 01:02 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.01630 seconds
  • Memory Usage 1,842KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (11)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
  • (40)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