Jump to content

Babble is a real time chat system using node.js and sockets. It uses less resources and doesn’t rely on long polling or interval scripts to check for new message. Babble is fully featured with those features laid out below.

Requirements:

A modern browser that supports web sockets. (Firefox/IE11/Edge/Chrome/Safari supports websockets. For mobile browsers, I will only be supporting Safari and Chrome).

Node.js installed on a local or a remote server that can run a node.js script. I have only tested the last 4 versions of node.js, but the latest version of node.js you can install, the better. I will attempt to compile a node.js versions that are compatible with Babble.

The php side of babble should work on php 5.5-7  (IPS 4 doesn’t official support php 7  due to incompatibilities with htmlpurifier has with php 7).

Notes: babble requires node.js. This is an unconditional requirement. So many of the features of babble are node.js dependent, that there isn’t any fallback to another web technology (like ajax/long polling). With that in mind, Babble is very javascript dependent, it will not degrade gracefully if javascript has been disabled in the browser,if you have any tin foil hat wearing members, they will not be able to use babble.

Features:

  • Rooms: Babble comes with two default rooms that can not be removed. The “Babble” room is used by default for Babble, and the Widget Room is used by the “Widget” (the widget can be configured to use the default room).  Each room has permissions that can be set like “View, Message, Whisper, Edit, Delete and Upload”. Each room also has the ability to be configured independently of each other on uploads (what types and sizes), how many messages to show by default, rules to show before entering the room. Rooms can also have 3 bots they can configure (more on bots later).
  • Uploads: Each room can be configured to allow uploads.  If the upload is an image, the image will be “lazy loaded” and resized to fit the dimensions of the message area better. If it is a non-image upload, it will display a link to download. NOTE: Groups who can see the room, can also download and view images.
  • Sounds: Babble comes with a collection of sounds for send, receive, entering, leaving and whispers. Users can enable or disable each sound as they see fit. The sound files can be replaced at any time in the ACP by pointing to the corresponding sound setting to the new location (this is to avoid future updates from overwriting your sound files). NOTE: due to some limitations in mobile OS’s (iOS and android) even if the sounds are enabled by the user, there is one additional step they must take to hear sounds on the effected OS’s. On mobile devices a Speaker Icon will appear, that will need to be activated to be able to hear sounds, this action must be done each page refresh.
  • Whispers: Whispers are private messages that are sent in between users. They will open in a “tab” in the room and will flash when a new message is received if you aren’t currently active on the tab that is. Whispers only work inside the room, you currently can not “whisper” to some one who is not logged into the room you are in (at a later date this might change).
  • Browser Notifications: A user can set how many new messages they receive in a room before a browser notification is triggered (or they can disable them all together). Currently these do not work on mobile OS’s, in the future I plan on adding notifications for iOS and Android.
  • New Message Order: By default babble will order messages newest to oldest, for some users this might not be ideal, so they can reverse the order to oldest to newest. Any new message after this will honor the setting.
  • Group Content: You can set a min. content count per room for each user group before they can send messages. You can use this feature as a reward to your members for participation on your site. Note: Messages made in babble will not increment content counts. 

BOTS:

  • Babble comes with 4 bots, each serve a different function and are triggered in different ways.  3 of the bots can be configured per room, where the 4th bot can be configured to which rooms it sends messages too, as most of its settings are “global”. Hopefully Babble Bots can help you accomplish some pretty amazing things and enrich your users experience with babble. 
  • Time Bot: the time bot can be configured per room*. This bot can be configured to send different messages at different times**.  You can use HTML/BBC in the bots messages. This bot runs from a task, so its HIGHLY recommend that you have your task configured to run as a cron job to see the best results. If not configured to a cron, this bot might not function properly.
  • * you can configure this bot to store its messages in the database or not. Due to a technical limitation with node.js the bot is unable to check to see if there are any users in the room or not, so instead of having the chat history filled with messages from the time bot, they will “go away” on a page refresh.
  • ** this is in minutes passed since the bot was configured, if you set a message to send every 10 minutes, then the first message will be sent 10 minutes after you configured the bot, and each additional message will be sent 10 minutes after this.
  • Count Bot: This bot can be configured per room. You can configure this bot to send messages after x amount of messages sent by users*. You can also send different messages x amount of messages sent. You can use HTML/BBC and special variables(1) in your messages. 
  • * this does not include whispers sent or messages from other bots.
  • Phrase Bot: This bot can be configured per room. You can configure this bot to send messages when a match to a word/phrase is made. You can have multiple matches for the same message or multiple messages for different matches. You can use HTML/BBC and specials variables(1) in the messages.
  • Notifications: This is the bot that has a global configuration. This bot will send messages out when new content is posted to the supported applications*.  Permissions are honored on these notifications, so if the user doesn’t have access to to view the area in question, they wont see the notification.  This bot can only be configured to tell it which rooms to run in, the rest of its settings are global due to its nature.
  • * IPS applications are the only ones support for notifications. In theory any application that uses the content item class should work, but I have only tested my own application that use this and they will work with it, so I’m pretty sure it will work with the other 3rd party application that use the classes. Babble has some API elements to it that will be document on my site later, so any application it doesn’t support, the application developer should be able to create a hook without much of a problem.
  • (1) There are special variables that the count bot and phrase bot have access to, that can be used in the message, to show the name of the person who triggered, the bot’s name, and the match (this is for the phrase bot only).

Commands:

Commands can perform special functions when issued. The commands can be issued thru the chat area (similar to how IRC does it).  Some commands have group restrictions.  You can add commands in 2 ways, in the ACP you can add basic commands , if you need more advanced functionality you can create a “command” file.

Command list:

  • Announce – adds or removes an announcement to the room
  • Ban – bans a user for a room.
  • Unban – unbans a user for a room.
  • BanList – Show’s who has been banned from a room.
  • Ignore – Ignore a user in a room.
  • Unignore – Stop ignored a user in a room.
  • Kick – kick a user from a room.
  • Me – an action command for a room.
  • Mute – Mutes a member for everyone in a room.
  • Unmute – unmutes the member in a room.
  • Mutelist – shows a list of users who have been muted.
  • Notifications – disables or enables notifications from the notification bot.
  • Topic – adds or removes a chat topic from a room.
×
×
  • Create New...