XF 1.1 Disable notifications block

Jeremy

Well-known member
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.
 

Jeremy

Well-known member
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;
 

AndyB

Well-known member
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
 

Main Company

Active member
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
 

Jeremy

Well-known member
Well, glad you found a post I made a few months ago. Forgot I had looked into this already at one point.
 

Main Company

Active member
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.
 

Claudio

Well-known member
Well, glad you found a post I made a few months ago. Forgot I had looked into this already at one point.
Jeremy, I have done the changes you mentioned but they have no effect. Should I make more changes to other files maybe?
 

Jeremy

Well-known member
I'm not sure that code was written almost a year ago and 1.3 was released since then. You shouldn't have to.
 

Main Company

Active member
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:

PrettyPixels

Active member
I tried this in 1.4 and it no longer seems to be working. Any help in updating this would be very greatly appreciated!
 

Chris D

XenForo developer
Staff member
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;
}
 

PrettyPixels

Active member
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?
 

sbj

Well-known member
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?
 

sbj

Well-known member
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?
 

Morgain

Well-known member
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.
 

Chris D

XenForo developer
Staff member
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