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.
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:

	disabled_room_msg:"You must be a member to enter this room.",

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">

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'];

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

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

Importing user profiles

This tutorial will show you how to import your user profiles into FCChat.

In FCChat, each user is automatically given a default profile page; however, this profile is not linked to or integrated with any external source.

If you have integrated your pre-existing user accounts with the chat. (See the User Guide’s section on account integration), you may wish to link your user’s pre-existing profiles as well.

In order to do this, you must edit the field import_profiles in the FCChat configuration.

You will enter into the import_profiles field the url of the page that will generate the profile. The URL needs to be constructed in such a way so that the user’s name can be appended to it. The page will take the user’s name and output the user’s profile accordingly.

Once you have done this, the chat will no longer use the default profile pages. Instead, when you click on profile, in the user’s dialog box, you will be taken to the page you specified in the import_profiles field.

For example, PHPBB profile pages can accept the user’s name as a parameter in the querystring, so in order to link your chat users to their PHPBB profiles, you would set import_profiles to

Of course, you would replace MYPHPBBFORUM with the path to your forum. When the profile is fetched, FCChat will automatically append the user’s name to the end of the URL, so that the “un=” part will become “un=USERNAME”, where USERNAME is the name of the particular user.

Unlike PHPBB (unfortunately), many systems do not have a default means of obtaining the profile directly from the user’s name. In this case you must create a script which will accomplish this task.

You will create the script so that it can accept the user’s name (in the querystring, for instance). Then, using that information, it will output the profile, or perhaps redirect to the profile page. The exact code required to write the script is system specific and outside the scope of this tutorial.

Place the script on your site, and link to it using the import_profiles field. Again, keep in mind, when setting up the URL to your script, that FCChat will append to this URL the user’s name.

{“topic”:”Importing user profiles”}