exclude a member or forums from announcing?

Support area for phpBB's mChat extension
Post Reply
User avatar
Xcalibr8
Donor
Posts: 16
Joined: 22 Oct 2017, 00:08

exclude a member or forums from announcing?

#1

Post by Xcalibr8 » 05 Jan 2019, 15:17

Hello,
I currently can't use the option on mchat to announce new posts. The reason is because i run feed post bot and have a couple hundred posts by that everyday. I would love to be able to either exclude certain forums or just 1 user from this function. I have 1 user account setup for the bot to use to post rss feeds so if i could exclude that, the problem would be solved.
As always, I appreciate all the great support I have received here. :beer:

terry2
Donor
Posts: 169
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: exclude a member or forums from announcing?

#2

Post by terry2 » 05 Jan 2019, 22:52

ext/dmzx/mchat/core/notifications.php

Code: Select all

if ($this->user->data['user_id'] == YOUR ID HERE)
		{
			$mode_config = [
				'login' => 'mchat_posts_login',
            ];
		}
		else
		{
			$mode_config = [
				'post'	=> 'mchat_posts_topic',
				'quote'	=> 'mchat_posts_quote',
				'edit'	=> 'mchat_posts_edit',
				'reply'	=> 'mchat_posts_reply',
				'login' => 'mchat_posts_login',
			];
		}
This will stop the user from posting in chat if he logs in that will be posted only.

User avatar
Xcalibr8
Donor
Posts: 16
Joined: 22 Oct 2017, 00:08

Re: exclude a member or forums from announcing?

#3

Post by Xcalibr8 » 05 Jan 2019, 23:41

Ok, I tried this and it didn't stop the Mchat from posting notifications in the chat from that user. I tried using the username (NewsBot) and with the user id # (129). i'm doing something wrong. Where should I paste this in the file? Which user info should i use? here is my latest clip to show You where I tried using it.
notify.PNG
notify.PNG (27.64 KiB) Viewed 339 times
notify.PNG
notify.PNG (27.64 KiB) Viewed 339 times

terry2
Donor
Posts: 169
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: exclude a member or forums from announcing?

#4

Post by terry2 » 06 Jan 2019, 00:45

It does you added it to the wrong place i been using it from day one i'l post the find and replace when i am on a pc.

find

Code: Select all

		$mode_config = [
			'post'	=> 'mchat_posts_topic',
			'quote'	=> 'mchat_posts_quote',
			'edit'	=> 'mchat_posts_edit',
			'reply'	=> 'mchat_posts_reply',
			'login' => 'mchat_posts_login',
		];
replace with

Code: Select all

if ($this->user->data['user_id'] == YOUR ID HERE)
		{
			$mode_config = [
				'login' => 'mchat_posts_login',
            ];
		}
		else
		{
			$mode_config = [
				'post'	=> 'mchat_posts_topic',
				'quote'	=> 'mchat_posts_quote',
				'edit'	=> 'mchat_posts_edit',
				'reply'	=> 'mchat_posts_reply',
				'login' => 'mchat_posts_login',
			];
		}
Mine that i use same as code above
Selection_027.png
Selection_027.png (39.52 KiB) Viewed 336 times
Selection_027.png
Selection_027.png (39.52 KiB) Viewed 336 times

User avatar
Xcalibr8
Donor
Posts: 16
Joined: 22 Oct 2017, 00:08

Re: exclude a member or forums from announcing?

#5

Post by Xcalibr8 » 06 Jan 2019, 02:32

Bingo! we have a winner! That's awesome man. Thanks so much.

i usually try to figure out stuff myself although I don't know diddly about css and php and such. :lol: I miss the simplicity of static html. So much easier to see what's going on. You directions where spot on.
Cheers :beer:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest