Difference between revisions of "Widget"

From Mibbit Wiki
Jump to: navigation, search
Line 1: Line 1:
The embedded widget is in alpha...
+
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!
  
[http://embed.mibbit.com/e/example.html 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/
  
The basic URL is http://embed.mibbit.com/e/
+
The parameters you can pass are:
Please make sure you use embed.mibbit.com and NOT www.mibbit.com.
 
  
[[Preference parameters]]
+
* 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.
 +
* server - This defaults to irc.mibbit.com. You can only use this if you have authorized your server.
 +
* userListWidth - The width of the user list in pixels
 +
* noServerTab - True by default, if you set this to false, you will get a server tab, and motd etc goes there.
 +
* noServerNotices - False by default. If true, then notices to the embed channel do not get displayed. (Only used if noServerTab==true)
 +
* noServerMotd - False by default. If true, then motd to the embed channel is not displayed. (Only used if noServerTab==true)
  
==iframe Example==
+
Additionally you can specify any setting as shown in /dset. For the Widget there are a few default changes:
  <nowiki><iframe width="600" height="380" scrolling="no" frameborder="0"
+
   
src="http://embed.mibbit.com/e/?channel=%23my_chat&nick=choose_one">
+
chatOutputShowTimes = false
</iframe>
+
showJoinsParts = false
type /nick to change your Nick name,</nowiki> /help, /cs help,
+
showAwaysBacks = false
/ns help, /ms help, or /os help for available commands
+
chatOutputNickWidth = 90
 +
focusNewJoins = false
  
'''Do not use #'s in the urls!''' # Cuts off the query string and everything after it isn't included in the url. Instead, use the url escaped version of #, %23.
+
Please note you must urlencode all parameters. So #foo becomes %23foo etc.
It is okay to use #'s in the channel textbox in the Mibbit IRC Form explained below.
 
  
add these lines onto your web page to have your own chat there. Use any scripting language to avoid nick collisions, e.g. You do not need to use this code if you are using the Mibbit IRC Form. In the generator, just check the box that says "Add a random number between # and # to the end of the nickname." (# being the numbers)
 
...&nick=group_<?php echo mt_rand(10000, 99999); ?>">
 
  
Then, just specify channel and optionally nick.
+
[http://embed.mibbit.com/e/example.html example]
  
* If you do not provide a nick, a random one will be chosen
+
[[Preference parameters]]
* If there is a nick collision, the user will be prompted to choose a new one (IE7 may have issues with prompt
 
  
You can override all of these in the URL, using params.
+
== Securing your widget ==
You can also override autoAway. ,e.g., &autoAway=0 to disable (case matters)
 
==Mibbit IRC Form==
 
  
A form can be used to access the widget easily in a chat window.
+
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 channel/server, and a password.
 +
Then for each url you generate, you must specify a nick (Generate one yourself), and you send over 'key' as a param, 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 specify a channel key if the channel is keyed. Then only people using *your* widget on your site, or people you allow, can enter the channel.
  
[http://infectionirc.net/mibbitform.php?server=irc.mibbit.com&channel=mibbit&nick=mib&force_serv=on&rand_numb=on&rand_min=10000&rand_max=99999 Example form]
+
==iframe Example==
  
The form can be configured [http://infectionirc.net/mibbitform.gen.php here]
+
<nowiki><iframe width="600" height="380" scrolling="no" frameborder="0"
 +
src="http://embed.mibbit.com/?channel=%23my_chat&nick=choose_one">
 +
</iframe>
 +
type /nick to change your Nick name,</nowiki> /help, /cs help,
 +
/ns help, /ms help, or /os help for available commands

Revision as of 20:32, 20 March 2008

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!

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/

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.
* server - This defaults to irc.mibbit.com. You can only use this if you have authorized your server.
* userListWidth - The width of the user list in pixels
* noServerTab - True by default, if you set this to false, you will get a server tab, and motd etc goes there.
* noServerNotices - False by default. If true, then notices to the embed channel do not get displayed. (Only used if noServerTab==true)
* noServerMotd - False by default. If true, then motd to the embed channel is not displayed. (Only used if noServerTab==true)

Additionally you can specify any setting as shown in /dset. For the Widget there are a few default changes:

chatOutputShowTimes = false showJoinsParts = false showAwaysBacks = false chatOutputNickWidth = 90 focusNewJoins = false

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


example

Preference parameters

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 channel/server, and a password. Then for each url you generate, you must specify a nick (Generate one yourself), and you send over 'key' as a param, 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 specify a channel key if the channel is keyed. Then only people using *your* widget on your site, or people you allow, can enter the channel.

iframe Example

<iframe width="600" height="380" scrolling="no" frameborder="0"
 src="http://embed.mibbit.com/?channel=%23my_chat&nick=choose_one">
</iframe>
type /nick to change your Nick name, /help, /cs help,
/ns help, /ms help, or /os help for available commands