XF 1.1 Disable notifications block

Morgain

Well-known member
There's a default setting that means XF will only send out one or two notifications, then if you don't visit the board you don't get any more.

I've always found this the opposite of useful. If someone is too busy to visit, then that's exactly when they most need to stay in touch by getting their notifications. If they want to cut the number they are getting they should be able to visit to do that, and that might reconnect them.
If notifications fall away, then a busy person is much more likely to forget all about the forum. Ive done it myself with lots of forums when I stop getting notifications. I do tend to visit when I go on getting a series of them and I feel I'm still part of it. People forgetting all about our forums is the last thing we want.

I appreciate some other admins may not see it this way for whatever reason, but that's their business. I think this block on notifications should be at admin discretion so both needs can be happy.

So how do I disable the current setting? I assume there's a bit of php somewhere that sets the number of notifications sent before the notification is disabled. So if that was commented out, or set to zero, that would get what I want, and notifications would go on sending.
 
There is a single email, as can be seen by the following text sent out:
This message was sent to you because you opted to watch the thread Custom BB Code Manager at XenForo Community with email notification of new replies. You will not receive any further emails about this thread until you have read the new messages.

I'm not sure where the code to change this would be.
 
in library/XenForo/Model/ForumWatch.php find and comment out the following lines:
PHP:
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;

In library/XenForo/Model/ThreadWatch.php find and comment out the following lines:
PHP:
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;
 
Very good work, King Kovifor.

I suspect this code was included for the following reasons:

1) Limit the number of email sent on very busy forums
2) Prevent emails from being sent to those members that were not interested in the thread any longer
3) Limit the number of email sent on a very active thread
 
in library/XenForo/Model/ForumWatch.php find and comment out the following lines:
PHP:
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;

In library/XenForo/Model/ThreadWatch.php find and comment out the following lines:
PHP:
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;
Hallelujah!!!!

I've been digging really hard to find the answer to this question. I'm so relieved to have finally found it, as I really need this functionality as well.

Thank you Thank you Thank you
 
Well, glad you found a post I made a few months ago. Forgot I had looked into this already at one point.
As I'm sure you can tell, I've been all over this board the last few days trying to come at this functionality from several different angles. I knew this had to have been addressed already, and just kept digging. Thanks for your help.
 
So, the two revised code blocks should look as follows? .... are the mods correct?

library/XenForo/Model/ForumWatch.php
PHP:
/*
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;
*/

library/XenForo/Model/ThreadWatch.php
PHP:
/*
            if (isset(self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']]))
            {
                continue;
            }
            self::$_preventDoubleNotify[$thread['thread_id']][$user['user_id']] = true;
*/
 
Last edited:
If I am understanding this correctly you guys want to change this behaviour:

If I reply to this thread now and I watch this thread, one more person will reply and I will get an alert stating "There may be more messages after this".

If I do not read the thread again, I will get no more alerts.

And it's that which you guys want to change?

The code above will have never worked to change that behaviour.

This is the code to comment out:
PHP:
else if ($previousPost['post_date'] > $user['thread_read_date'])
{
    // user hasn't read the thread since the last alert, don't send another one
    continue;
}
 
As this problem eventually killed my main forum I largely lost interest in XF. I hope it gets solved.

I'm having the same issue. We just moved from another forum software, and our users are accustomed to receiving an email each time the thread is updated. Although my members love xenForo in every other way, this email issue is killing our traffic.


If I am understanding this correctly you guys want to change this behaviour:

If I reply to this thread now and I watch this thread, one more person will reply and I will get an alert stating "There may be more messages after this".

If I do not read the thread again, I will get no more alerts.

And it's that which you guys want to change?

The code above will have never worked to change that behaviour.

This is the code to comment out:
PHP:
else if ($previousPost['post_date'] > $user['thread_read_date'])
{
    // user hasn't read the thread since the last alert, don't send another one
    continue;
}

Thank you so much, Chris! :) I'll give this a try!

Is the code for watching the forum (opposed to the thread) the same as the previous code given? Or has that changed as well?
 
If I am understanding this correctly you guys want to change this behaviour:

If I reply to this thread now and I watch this thread, one more person will reply and I will get an alert stating "There may be more messages after this".

If I do not read the thread again, I will get no more alerts.

And it's that which you guys want to change?

The code above will have never worked to change that behaviour.

This is the code to comment out:
PHP:
else if ($previousPost['post_date'] > $user['thread_read_date'])
{
    // user hasn't read the thread since the last alert, don't send another one
    continue;
}

Will this work for 1.4? And where to find this, so I can remove it?
 
That post was written after 1.4 was released ;)
I just wanted to be sure. So I will find those code lines in library/XenForo/Model/ThreadWatch.php and when deleted (or commented out), people will get alerts from threads they haven't read after the red alert balloon disappeared?
 
Wonderful this is getting sorted. Too late for me.

I had three thriving little communities which were torn down and destroyed by this feature.
I was working with busy people who actively WANTED to be kept informed on what was happening on the board. The fact someone did not visit for a while was not an issue.
In fact they would come every 2 - 3 weeks and contribute - if they stayed connected by copy emails. But when the copy emails stopped they drifted further away. I would reach out personally and send them friendly mails and they would come back. But it was too much work for me and should not be necessary. I was ill for a month, could not put in the manual messages .... and lost a lot of participation.

It was devastating to me that after years of hard work and money poured into my communities they died. All because this feature is not optional at admin level.

XF is designed well for large or very large boards. Badly for small ones. I still grieve for my lovely communities.
 
Nothing is being sorted, and the default behaviour is unlikely to change.

It is a shame when communities don't work out as planned, though often it is down to other factors.
 
Top Bottom