Excude some sections

Support area for phpBB's mChat extension
Post Reply
Selune
Posts: 6
Joined: 17 Mar 2018, 10:16

Excude some sections

#1

Post by Selune » 17 Mar 2018, 10:24

Hi !

I'd like to know the way to exclude some forum sections from the "new topic/posts" mchat options.
Please help ! :)

User avatar
kasimi
mChat developer
Posts: 599
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Excude some sections

#2

Post by kasimi » 17 Mar 2018, 10:33

Find this empty line: https://github.com/kasimi/mChat/blob/2. ... s.php#L793 in core/functions.php and add this code to not get any notifications for posts/topics from forums 1, 2 and 3:

Code: Select all

if (in_array($forum_id, [1, 2, 3]))
{
	return;
}
Alternatively, if you are using a posting bot, for example this one, there's a new setting since mChat 2.0.2 that allows you to exclude your bot user from posting mChat notifications. Set the Require user permission setting in mChat's Global settings to Yes and set the Can use mChat permission for your bot user to No. :+1:

Selune
Posts: 6
Joined: 17 Mar 2018, 10:16

Re: Excude some sections

#3

Post by Selune » 03 Apr 2018, 22:51

Hi.
Thank you alot for your answer.
The section is now ignored as expected on our forum.
We would like to forbid our bot to post too, but couldn't find the "Require user permission" setting. Is this "MCHAT_POSTS_AUTH_CHECK" ? (not translated in the french lang file)

User avatar
kasimi
mChat developer
Posts: 599
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Excude some sections

#4

Post by kasimi » 04 Apr 2018, 08:15

Selune wrote:
03 Apr 2018, 22:51
Is this "MCHAT_POSTS_AUTH_CHECK" ?
Yes, that's the setting's language key. :+1:

There seems to be a problem in mChat 2.0.2 and 2.0.3 which causes login notifications to be skipped if Require user permission is enabled. See here. The fix I mentioned there should help, please test and report if it works.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests