Warning: The author of this contribution does not provide support for it anymore.

mChat

Chat Room only Visible when logged in - mChat

Chat Room only Visible when logged in

by image45 » Fri Aug 13, 2010 4:18 pm

If you change your Global Options to the below code then you can enable mchat content to be visible only when loged into the forum/site.


OPEN: /forum/mchat.php
FIND

Code: Select all

// Options (global)
$mchat_enable = true; /* Enable mChat content inside forum board! */if($user->data['is_registered'] == false){
$mchat_enable = false;/* Enable mChat content outside forum board! */}
$mchat_refresh_time = 10; /* Auto Update time in seconds (recommended from 10 to 45). */
$mchat_message_limit = 20; /* The maximum number of messages in index page (recommended from 10 to 20). */
$mchat_archive_limit = 50; /* The maximum number of messages in archive page (recommended from 10 to 50). */
$mchat_secret_code = '7g4sgO62AN6MVMa'; /* Secret code for installation and removal mChat from a database (only latin letters and numbers). */
$mchat_flood_time = 20; /* Flood control time in seconds (recommended from 5 to 30). (set 0 to disable) */
$mchat_allow_urls = true; /* Convert the addresses of sites to links? */
$mchat_allow_smilies = true; /* Allow to use smilies? */
$mchat_color_nick = false; /* Colored nicks in the treatment. */
$mchat_message_max_length = 500; /* The maximum number of characters in message (recommended from 100 to 1000). (set 0 to disable) */
$mchat_not_allowed_bbcodes = ''; /* Not allowed bbcodes for use in mChat (separate bbcodes with a vertical bar, example: 'b|u|code'). (set empty to disable) */
$mchat_use_custom_page = true; /*   Use the chat on mchat.php page? */
$mchat_use_custom_page_whois = true; /*   Show who is online on board to custom page? */
$mchat_date_format = 'd M Y, H:i'; /*   Date format for show in messages. (set empty to use default date by board or user setting) */
$mchat_message_max_word = 100; /* Maximum length of words in message (recommended from 50 to 150). (set 0 to disable) */


OPEN: /language/en/mods/mchat_lang.php
FIND:'MCHAT_ENABLE' =>, message and replace with below version.

Code: Select all

'MCHAT_ENABLE' => 'Please <a href="ucp.php?mode=login&redirect=mchat.php" class="postlink">login</a> or <a href="ucp.php?mode=register&redirect=mchat.php" class="postlink">register</a> to send messages in the chat room section.',


If you ever need to switch your chat room off for registered user’s logged into the forum/site you will need to replace the original 'MCHAT_ENABLE' =>, message content first.

Robert
User avatar
image45
Registered User
Posts: 168
Joined: Wed Feb 24, 2010 6:05 pm
Name: Robert
Contact:

Re: Chat Room only Visible when logged in

by Anyasha » Sat Aug 14, 2010 2:00 pm

Or you could set the "Can view mChat" permission to NO for the Guest group. :)
Kiss me, I'm Polish!
User avatar
Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: Chat Room only Visible when logged in

by image45 » Sat Aug 14, 2010 11:33 pm

Anyasha wrote:Or you could set the "Can view mChat" permission to NO for the Guest group. :)


My mChat.php file only has the following options for guest group

// Options (guest)
$mchat_allow_guest_bbcode = false; /* Allow use bbcodes in messages? */
$mchat_allow_guest_add_mess = true; /* Allow add message? */
$mchat_allow_guest_read_archive = false; /* Allow read archive? */


Reading the archive is not the same as "Can view mChat", are you sure this is not only available for the new mChat version 1.2.17 3.0.5 and 1.2.17 3.0.7 version rather than the original 1.2.6 3.0.5 first version.

Thanks
User avatar
image45
Registered User
Posts: 168
Joined: Wed Feb 24, 2010 6:05 pm
Name: Robert
Contact:

Re: Chat Room only Visible when logged in

by RMcGirr83 » Mon Aug 16, 2010 1:35 am

...the new mChat version 1.2.17 3.0.5 and 1.2.17 3.0.7 version


Is the one that is permissions based.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20629
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Chat Room only Visible when logged in

by AllCity » Sat Jan 29, 2011 6:25 pm

image45, Good work!
My mods home page.
User avatar
AllCity
Registered User
Posts: 228
Joined: Sun Jun 22, 2008 6:33 pm
Name: Andrey Shapoval
Contact: