Posts from only a certain forum

Chat rooms for mChat with optional password protection and 1-on-1 chats
Post Reply
clight77
Donor
Posts: 20
Joined: 01 May 2017, 01:06

Posts from only a certain forum

#1

Post by clight77 » 28 Jan 2019, 23:37

Hi there.

I just made a new chat room but I wanted posts from only a certain forum to get posted there, would that be possible to do?

Thanks...

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

Re: [1.2.6] mChat Rooms add-on

#2

Post by terry2 » 28 Jan 2019, 23:50

So you mean if you had a sexy forum you want posts from forum id 4 to be posted in the new mchat room ? the rooms are selectable in mchat acp but you would need the forum id bit like how login reply edited is done in mchat.

clight77
Donor
Posts: 20
Joined: 01 May 2017, 01:06

Re: [1.2.6] mChat Rooms add-on

#3

Post by clight77 » 29 Jan 2019, 00:39

Yep yep yep :)

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

Re: Posts from only a certain forum

#4

Post by kasimi » 30 Jan 2019, 19:33

  • Open ext/kasimi/mchatrooms/event/main_listener.php
  • Find

    Code: Select all

    - This code is only accessible to donors -
  • Add after, and adjust forum and room IDs:

    Code: Select all

    - This code is only accessible to donors -

clight77
Donor
Posts: 20
Joined: 01 May 2017, 01:06

Re: Posts from only a certain forum

#5

Post by clight77 » 31 Jan 2019, 00:12

Great man will try in a bit.
THX :)


Hate to be dense but where do I get the room ID from ?

clight77
Donor
Posts: 20
Joined: 01 May 2017, 01:06

Re: Posts from only a certain forum

#6

Post by clight77 » 31 Jan 2019, 02:54

Found room ID, was not easy tho, thanks and it does work :)

Added in 15 minutes 3 seconds:
I am assuming that this can be used for multiples ?

if ($event['forum_id'] == 123)
{
$sql_array['room_id'] = 456;
}


Like:


if ($event['forum_id'] == 123,124,125,126)
{
$sql_array['room_id'] = 456,126,134;
}


Also another question is it possible to not alow any chat in that room, so just the post shows?

Cheers

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

Re: Posts from only a certain forum

#7

Post by terry2 » 31 Jan 2019, 08:54


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

Re: Posts from only a certain forum

#8

Post by kasimi » 31 Jan 2019, 11:07

clight77 wrote:
31 Jan 2019, 03:09
I am assuming that this can be used for multiples ?
For more than one room, paste the same code block again with different IDs:

Code: Select all

- This code is only accessible to donors -

clight77
Donor
Posts: 20
Joined: 01 May 2017, 01:06

Re: Posts from only a certain forum

#9

Post by clight77 » 31 Jan 2019, 15:07

Thanks to both works perfectly :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest