View Full Version : Notification of new posts - without returning to Forum
viaccess
07-27-2012, 08:28 AM
A couple of my users have asked if it's possible to receive an instant notification of all posts in a subscribed thread, even if they haven't returned to the Forums in the meantime. The problem is that they may read an 'I agree' post and ignore it, thereby not getting any further notifications, and missing a subsequent post that they would want to respond to.
So, is it possible to include a setting to allow a user to receive a notification of ALL posts, whether or not he/she has returned to the thread in the meantime? I understand why this may be inadvisable with very long threads, else the subscriber's mailbox would be spammed!
Sorry if this has been raised before, but I have looked and can't find it.
Thanks,
James
viaccess
08-23-2012, 11:08 AM
Can nobody help me with this?
I will reward anyone who can with their weight in chocolate (restrictions apply: subject to the person weighing not more than 4oz).
Thanks.
Someone else asked about this a while back, I don't think it can be done without modifying one of the vb files, since there is a hard-coded query to find users who haven't visited since the last notice was sent out. And I should mention that I think a bigger problem for some forum owners, other than spamming people's mailboxes, is that if you had a busy thread with lots of people subscribed, you could be sending out a very large number of emails (this may or may not be a problem for you).
viaccess
08-23-2012, 11:44 AM
Thanks for the replay. It wouldn't be a problem as I run a private, by invitation only, site and am only likely to have a few hundred members, so the email count would not be excessive.
Well, if you look at file includes/functions_newpost.php around line 1192 you'll find this:
WHERE subscribethread.threadid = $threadid AND
subscribethread.emailupdate IN (1, 4) AND
subscribethread.canview = 1 AND
" . ($userid ? "CONCAT(' ', IF(usertextfield.ignorelist IS NULL, '', usertextfield.ignorelist), ' ') NOT LIKE '% " . intval($userid) . " %' AND" : '') . "
user.usergroupid <> 3 AND
user.userid <> " . intval($userid) . " AND
user.lastactivity >= " . intval($lastposttime['dateline']) . " AND
(usergroup.genericoptions & " . $vbulletin->bf_ugp_genericoptions['isnotbannedgroup'] . ")
");
The line is red says only select the user if they have visited since the previous post. If you took that out, everyone would get a notice for every post in threads they're subscribed to (even if they are logged in when the post is made). If you wanted it to be a setting, you'd have to do something more complicated of course.
viaccess
08-23-2012, 03:09 PM
Thank you - that's helpful. The problem is that I don't want this to be a global setting: there are only two or three users who want an email each time a post is made. Most will be quite happy with the present system of receiving one update email and no more until they have visited the Forums again.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.