Setting up member only rooms.

In this tutorial we will show you how to set up rooms that are only available (or visible) in the member areas of your site.
hi
This is acheived by disabling/hiding the rooms from within the FCChat configuration. WordPress and Joomla users will access the FCChat configuration through their dashboards. Otherwise, the configuration will be accessed directly through the FCChat/config/config.js file. The three fields that apply are:


// CHAT ROOM PARAMS
	disabled_rooms:[],
	disabled_room_msg:"You must be a member to enter this room.",
	hidden_rooms:[],

disabled_rooms and hidden_rooms may each contain a comma separated list of rooms that are to be “deactivated” for non members. The difference between the two fields is that disabled rooms will still be visible to users in non member areas of your site- they just won’t be accessible.

You add some rooms to either list by entering the name of the room you wish to deactivate.

For example:

disabled_rooms:[‘The Lobby’,’Help Desk’],

This will disable the rooms The Lobby and Help Desk.

Once you have added some rooms to either the disabled_rooms or hidden_rooms list, these rooms will be inaccessible, by default, on all pages of your site. The next step, therefore, will be to activate the rooms on the member pages of your site.

Now, FCChat does not know where your member only pages or private pages are, so you will have to “tell” it. In order to do this, you will have to go to each of your member pages and insert a little code into the page, letting the chat know not to disable the room on that page.

The code must be placed on the page after the FCChat configuration has loaded. Usually, placing it before the closing </head> tag will suffice. The purpose of the code is override the hidden_rooms or disabled_rooms fields in order to remove the room from the disabled or hidden rooms list. Continuing with the example from above, let’s say now, that on a particular page, you wish to activate both ‘The Lobby’ and ‘Help Desk’.

You would insert the following code into the page:


<SCRIPT type="text/javascript">
FCChatConfig.disabled_rooms=[];
</script">

Basically, this just clears out the disabled_rooms list on that page, thereby making the rooms active again.

If you wanted to activate only ‘The Lobby’ but leave the ‘Help Desk’ inactive, you would alter the above code as follows:


<SCRIPT type="text/javascript">
FCChatConfig.disabled_rooms=['Help Desk'];
</script">

As you can see, only ‘Help Desk’ will be disabled on this page.

{“id”:”memberrooms”,”topic”:”Setting up member only rooms”}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>