Composr Tutorial: Running chatrooms (features and advice)
Written by Philip Withnall (ocProducts)Chatrooms are a great community feature, and are very useful places to do brainstorming. Composr includes powerful chat and instant messaging functionality.
Table of contents
Composr Tutorial: Running chatrooms (features and advice)
- The chat screens
- Downloading chat logs
- Setting sound effects
- Creating a private room
- Advice for younger users
- Bots (advanced)
- The shout-box block
- Third-party approaches
- See also
The chat screens
The screens are within the chat module (site:chat page-link, Social > Chat lobby on the default menus). When loaded the lobby presents you with a list of all chatrooms you are eligible to enter (i.e. ones you don't have permission to access or you've been banned from don't appear). If you have the necessary permissions (the 'Edit mid-impact (medium visibility) content' privilege, and access to the cms_chat module), appropriate links also appear to the moderation module.
You will also see a friend list, which you can use to start instant messaging conversations. Instant Messaging conversations are like conversations in chatrooms, except rooms do not need to be created – they are run on purely a private invitation basis and very quick to get going.
To send a message, simply enter it in the input box at the top, and press "enter", or click the "Submit message" button. The input box will be emptied, and your message will appear in the message window shortly afterwards. Messages from other conversants in the same chatroom appear periodically in the messages window.
The options at the bottom of the chatroom page control how your messages appear to others, and there are also some links to pertinent links provided below. The list of links is filtered according to permissions.
There is also a configuration option that allows you to start IM conversations by clicking on usernames ("Clicking a username starts an IM"). Ordinarily this action would link to a member profile view screen, but for 'chat-based' websites, starting an IM may be more appropriate. Of course even with this option some links still point direct to profile screens, such as links from the member directory.
You may have multiple simultaneous conversations, as conversations are separated using tabs.
If a member is not in the lobby when they are invited to start a conversation then they will be sent an e-mail alert after you make the first message in a conversation with them, inviting them to visit the lobby. Upon visiting the lobby all active conversations that they have started or been invited to will appear.
It is recommended that members who make a lot of use of the IM system leave the lobby open, so that they are easily reachable. By the time you respond to your e-mail alert, the conversant who wishes to talk to you may have lost interest. Alternatively, there is a configuration option ("Site-wide IM") you can enable that essentially turns your whole website into the chat lobby, so that pop-up windows instantly appear for any new conversation that someone starts with a member (assuming the member is somewhere on the website of course).
Conversations may be closed by clicking the 'Close' button. If you do not close a conversation then it will remain in the system unless you are the only member who has not closed it and you have since left the lobby.
The friend list shows online status indication for all your friends, and similar statuses are shown for all conversants within active conversations. These statuses are dynamically updated as members come and go (there's no need to reload your browser window). Members may be:
- online (using the website, but not in the lobby)
- offline (not using the website at all)
- active (in the lobby)
- away (was in the lobby recently, but is not anymore – may be online, or may be offline)
If a member signs in, or a new message is posted in a conversation, then the browser window may flash (depending on your web browser). A sound will also play if you have left sound enabled. In addition, when a member signs in an activity indicator will mention that they have just signed in and the indicator will remain for a number of seconds.
ChatcodeChatcode allows users to do some advanced things via coded embedded within messages. Messages may also contain Comcode.
Documentation for Chatcode (including example commands) is provided in the "Chatcode help" page within your own Composr site, but in summary users can:
- Send private messages. Embed messages targeted toward specific members within your wider public message.
- Talk to bots. Send messages directly to bots coded up to respond only to direct messages.
- Send room invitations (advanced). Invitations act in much the same way as private messages, apart from the fact that they can be sent to multiple people at once, and their display format is designed specifically for displaying a link to a chatroom – it displays a fixed message, and a link. Invitations should not be used in conjunction with IM conversations – they are intended only for inviting people active in chatrooms in to other chatrooms.
- Create new rooms (advanced). The room that you create will belong to the message poster, and only people on the allow list and message poster will be allowed into it. All the people on the allow list will automatically have invitations to enter the new room sent to them.
BlockingYou may choose to block members. Blocked members cannot easily see when you are online – it is the Composr equivalent of hiding from a member. However, just as in the real world, someone paying close attention will not be fooled, as they will see your activity and notice that you are not ever online, and 'join the dots' to realise that you have blocked them.
Downloading chat logs
Setting sound effectsChatroom users may set sound effects for different chat actions (from the link provided in the chat lobby), and also override the sound effects so they are different for different members. New sound effects may be uploaded in .mp3 format, or effects may be chosen from the inbuilt sound effect library.
Creating a private room
When creating a private chatroom, bear in mind what sort of purpose you're creating the room to fulfil, and try to outline this in the room entry message. Make sure you add some members or usergroups to the allow/disallow lists as well, or the room you create won't be private at all (unless you define access, access is public)!
Once created, the private chatroom will be visible in the chatrooms list for all eligible members.
Room pruning in more detailRooms are only pruned if they are inactive longer than the "Private room deletion time" option and have an owner or a private list of allowed usernames (i.e. are a private room). Rooms created through the Admin Zone do by default not have those properties (i.e. are not private rooms), while rooms created through the public site do (i.e. are private rooms).
Set the "Private room deletion time" option to "0" if you wish to disable room pruning entirely.
ModerationThe moderation screen for the chat system (in Content Management > Chat moderation) allows the editing/deletion of chat messages.
This screen lists all messages in the room (with chatcode unparsed), with some useful information and a link to the member profile view screen of the submitter. Clicking on the message post date takes you to a message-edit page. On this page, you can edit the message details, and submit them. The changes won't immediately be reflected in the views of anybody using the relevant chatroom, but if a new user joins, or if somebody refreshes the room, they'll see the changes.
Deleting messagesTo delete a chat message, simply go to its edit screen, and tick (check) the "Delete" box, then submit the page. The message will be completely erased from history. Please note that this might take a significant chunk out of a conversation, so should be used sparingly; editing is probably a better way to go.
Deleting all messages
It is found in Admin Zone > Structure > Chatrooms.
Admin Zone > Structure > Chatrooms > Add chatroom.
Submitting the form will create the chatroom, and it will be immediately visible and accessible to all eligible conversants.
Editing chatroomsGo to Admin Zone > Structure > Chatrooms > Edit chatroom to see a list of all the chatrooms. Clicking on the name of a chatroom will bring you to the edit form for that chatroom.
All the options are the same as for the add chatroom form, and submitting the form makes the changes immediately visible to users of the chat system.
Deleting chatroomsTo delete a chatroom, simply go to that chatroom's edit screen, and tick (check) the "Delete" box, then click the "Save" button. The chatroom will be completely erased, and so will all messages in that chatroom. Any conversants using that chatroom will receive an error the next time they refresh, or the next time the system checks for messages.
Deleting all chatrooms
Caution: The shout-box
Be sure to create a new chatroom for the shout-box to feed from and re-associate it via the block parameter (or if you didn't use a block parameter, the block will automatically associate with the new chatroom as it'll be the first one).
Advice for younger usersTeenagers and children may hear many stories of chatrooms being dangerous and that they should stay away from them. As an administrator, you should place some emphasis on safety, and make sure your younger users are aware of the following guidelines:
- Do not arrange to meet people met in a chatroom
- Do not trust anybody you meet in a chatroom – no matter what they tell you, they don't have to be telling the truth
- Do not send photos, reveal your real name, or do webcam sessions
- Remember: anybody could be using the chatrooms; not just people like you
If users of your chatrooms are aware of this advice, and take heed of it, hopefully no problems will arise. However, it would be wise to occasionally (or frequently) check on what's going on in each chatroom, just to be sure. The moderation facilities are there for a reason.
Bots (advanced)The Chatroom system supports bots, i.e. chatroom conversants powered by code rather than being actual humans. Chatroom users can send private messages to a "bot" and get messages back.
Programmers can add new bots by writing new hook code files (the existing ones in sources/hooks/modules/chat_bots serve as examples).
It is easy to imagine useful bots that could be created; as just one example, imagine a bot that could answer questions based on searching an FAQ catalogue.
The shout-box blockComposr includes a 'shout-box' block, which is essentially a little portion of your menu that can be used for members to place short messages. Like all blocks, the shout-box is of course optional. The shout-box is tied to a specified chatroom, which by default, is the 'General Chat' chatroom.
Third-party approachesComposr's chatroom system is not perfect for everyone. There are four main areas where there are some natural limitations to the system:
- No video chat.
- No sales-chat system.
- No desktop app chat.
- Performance concerns on volume use. Because the system works by very regular web requests ("polling") it does create significant server load if lots of users are in the chatroom. We have optimised this significantly, but it is still an issue with (depending on server capacity) hundreds of users.
We'd love to improve all these areas within Composr, but frankly it would be very costly for us to develop them so we'd need sponsors to put a lot of money in. These are the main areas we'd like to make future developments in:
- High-quality WebRTC integration within the chat system
- Worked tutorial on configuring WebRTC server infrastructure
- Extend the IM system for a sales-chat use case
- Support storage of messages in an IRC server – perhaps directly integrating with its database, or via some kind of plugin (or even our own custom IRC server)
- Support for file sharing
CometChatCometChat (a commercial chat system) provides support for Composr CMS. See our video tutorial:
Video chatVideo chat either needs a powerful central video server, or a complex peer-to-peer system.
For video chat it is therefore best just to use an established third-party infrastructure such as:
- Talky (which lets you access rooms by just giving an identifying URL – meaning you can integrate it into a Composr chat template easily)
- Jitsi (similar)
- appear.in (similar)
- Google Hangouts (you'd need to direct people to start a hangout)
- Skype (ditto)
- CometChat (they provide a video chat option on their Platinum Edition)
We'd love there to be feasible Open Source offerings, but the complexity of software and hardware infrastructure of Open Source systems is currently very high such that it is not feasible for anything less than a full time team to deploy. Proprietary Flash systems used to be simpler, but Flash is no longer an appropriate technology for website development.
Desktop app chatIRC is an old chat system that is still popular and works well. Client support is very broad.
For a long time it looked like XMPP was going to replace it, but XMPP popularity has declined due to its complexity and commercial vendors pulling away from it (in favour of their own proprietary offerings – Facebook Messenger, etc).
The down-side of IRC is that it is complex. However, Kiwi IRC is an excellent system that lets you put IRC within a frame on your site. We use this on the Composr site, and even are able to pre-set the chat username to match the username of the logged in Composr user.
Sales-chat systemsComposr caters well for public/private chatrooms, and private instant messaging, but is not designed specifically for one-on-one live chat sessions between guest visitors and a staff team.
For this we advise integration external software, which should be very easy. For an example of a free live chat solution see Comm100.
This is one of the few cases where relying on a third party tool does not provide user experience problems, as it's a use-case that is quite oblique to the rest of the website experience (works in a pop-up, and is an isolated sequence of interactions).
- An online congregation point, where many people can talk simultaneously – over the Internet – in one big text-based conversation
- A conversant that is powered by Composr code rather than a real human
- An embedded chatroom
- Chat Lobby
- The screen listing chatrooms and hosting IMs
- A simple system for embedding chatroom-specific commands within messages
- Instant Messaging
- Conversations with friends outside formal chatrooms
Please rate this tutorial:
Have a suggestion? Report an issue on the tracker.