From Mibbit Wiki
Revision as of 18:15, 20 November 2008 by Microchip08 (talk | contribs)
Jump to: navigation, search

Wiki Home | FAQ | Features | IRC Commands | IRC Modes | Widget Information | Widget: WebIRC Server Setup | URI Parameters | Wish List | Registration Information | Mibbit Staff

Home | Quick Start Guide | Live Mibbit Help

If you'd like to have webchat on your own website, then you could use a Java applet (slow, ugly, and not very accessible), or you could use Mibbit! example

The first step, is to decide where you want your users to go. You can either create a channel on irc.mibbit.com or if you manage your own irc server, please contact Mibbit and ask for it to be authorized.

The basic URL for the Mibbit Widget is http://embed.mibbit.com/

Some of the parameters you can pass are:

  • nick - If you do not specify this, a random one will be chosen eg mib_6d7s8euf
  • channel - A single channel that the user will be directed to (multiple channels only on some servers like efnet).
  • server - This defaults to irc.mibbit.com.
  • autoConnect=true - avoids the connect-form. Additionally an op (using a mibbit client) must set "/autoconnect on" in your channel.
  • settings - Unique "Prefs" ID (taken from a full Mibbit.com account). See Widget Configuration and Skins.

Full list of defaults: Uri_parameters, example URL:


Please note you must urlencode all parameters. So #foo becomes %23foo etc.

You can use the Widget-Creator to create a link or an iframe code snippet.

Widget Configuration

Widget configuration is best done through passing a unique settings ID to the widget. To do this, create an account on Mibbit.com. Then go into the preferences and change the settings to how you want your widget to appear. At the top of the preferences screen there will be a unique ID for your settings (like 7ca12664887d4b6e7a0fa6552f9e0de6). This should be passed to the widget using the &settings= parameter. Example:


Please note there is currently a bug that means it will not be shown right after a register. So if you register a new account, click reload, *then* go into prefs.

Widget parameters

There are many parameters that can be added to the widget by adding them to the URL. For example:

<a href="http://embed.mibbit.com/
target="_blank">start MibChat on irc.freenode.net (new window)</a>

View the full parameter lists: Dset and Uri_parameters

Enable Autoconnect For Widget

Make sure that if you are doing this, make sure you are using a Mibbit client, and have operator status or higher.

  1. Send the command /autoconnect on (only once) in your channel
  2. Add &autoConnect=true to the widget's URI
  3. If necessary, remove the old &forcePrompt=xxx from the URI

Use the Widget in an Iframe

Make sure your page has a DTD setup, otherwise IE will not work properly. Place this code at the top of your page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Then place this code where you want the chat widget to appear:

<iframe width="600" height="380" scrolling="no" frameborder="0"
type /nick to change your Nick name, /help, /cs help,
/ns help, or /ms help for available commands

Be sure to change the server and channel to your chatroom

See also: Advanced iframe using PHP to pre-fill a nick like "prefix_<randompart>"

Use the Widget in a Popup

Copy and place this link in your page to open a popup window for the chat widget

<a href='#freenode/test' 
Join our "#test" chat on Freenode (popup)</a>

The javascript must be on one line. Be sure to change the server, channel and settings to your chatroom/preferences. The embedded URL can be shrunk (and obfuscated) via http://tinyurl.com . The resulting tiny url from the example above: http://tinyurl.com/6qmlr4 .

Use the Widget in an Object Tag

Does not work in Internet Explorer. Use as a last resort.

Copy and place this into your HTML for it to work:

<object id="chat" type="text/html" data=" http://embed.mibbit.com/index.html?server=irc.mibbit.com"></object>

To degrade correctly in IE, place text between the object tags, e.g., "We're sorry, you use a non-standards-compliant browser", and that will be shown instead of a blank spot.

Securing your widget

There is also a secure mode of operation, if you wish you channel to be slightly more secure, or do not want anybody able to have a widget pointing at your channel. With this system, you tell us the server, channel and a password ( tech@mibbit.com ). Then for each url you generate, you must specify a nick (Generate one yourself), and you send over 'authkey' as a param (see Uri_parameters), equal to md5(nick + ":" + password). This means that unless you know the password, embedding to that channel/server is pretty hard. Additionally you can also send us the channel key if the channel is keyed, which then is sent from the mibbit backend to the irc server. Then only people using *your* widget on your site, or people you allow, can enter the channel.