Project

General

Profile

Installing Minichat on your website

Avatar?id=6023&size=32x32

Artur Hefczyc TigaseTeam
Added almost 5 years ago

We have made Minichat available just to demonstrate new stuff we are working on, to do some tests and collect your opinions. The feedback we have got exceeded our expectations. The most common question was: Can I/how can I install it on my website?

Installing the Minichat on your website is very simple so I am putting here instructions for all of you who want to include the Minichat client on your website and allow visitors to chat with you.

Just to remind you - this code is still under development and will be updated and changed very often. It may even stop working temporarily or permanently. We can even intentionally block certain users or IP addresses if we discover any abuse. If you are ready for this and still want to have it continue reading...
<!--break-->
First thing to know: Minichat will work with tigase.org Jabber/XMPP server only right now.
This is not because some limitations in the code or special non-standard implementation. This is to simplify deployment of the service. If you wanted Minichat to connect to a different domain/Jabber server the installation would be much harder, involving Apache proxy_mod installation, configuration and maybe Bosh component/server deployment.

Second thing to know: Minichat connects to the server as anonymous user. To avoid sending spam the anonymous user can only send messages to users within the single Jabber/XMPP server. It means you can configure Minichat to send messages to user@jabber.org but Tigase server won't deliver those messages.

Instructions:

Register an account on the www.tigase.org website. For purpose of this guide let's say the account name is: your-account. The the Jabber ID will be: your-account@tigase.org. Note! There seems to be confusion about this so let me highlight this. You create an account on the www.tigase.org website but your Jabber account is in domain: tigase.org.
Setup Jabber/XMPP client of your choice to connect to the Tigase server in domain: tigase.org. Note you must allow plain text login. TLS is supported so the connection is secure and your password is still save.
There are a few ways for adding the client to the website but you always put startup parameters as URL query to the client link. Following parameters are possible:

jid=your-account@tigase.org tells the client who you want website visitors talk to. Normally you put there your own account.
name=YourName screen name (displayed name) of your account.
domain=tigase.org domain name you want the Minichat to connect to. At the moment only tigase.org is allowed.
autologin=true determines whether the Minichat client automatically connects to the server when the page is loaded or waits for the visitor to click on the title bar.


The first way described is to put the client in exactly the same way as it is on the www.tigase.org website. The chat window is always visible but the client is not connected to the server until someone clicks on the Minichat title bar. Include in your page following code:

<iframe
src="http://minichat.tigase.org/MesComp.html?jid=your-account@tigase.org&amp;name=YourName&amp;domain=tigase.org"
width="220px" height="250px" frameborder="0"></iframe>


Very similar to the first option. The only difference is that the client automatically connects to the server and is ready for chatting without need to click on the title bar. Include following code:

<iframe
src="http://minichat.tigase.org/MesComp.html?jid=your-account@tigase.org&amp;name=YourName&amp;domain=tigase.org&amp;autologin=true"
width="220px" height="250px" frameborder="0"></iframe>


The third option is the least intrusive but the most complex to install. It puts a small, clickable image with text on your page: Click to chat with.... When the website visitor clicks the new window pops up with the Minichat which automatically connects to the server. You need to put some code in the web page header:

<link rel="stylesheet" type="text/css"
href="http://minichat.tigase.org/minichat.css"/>
<link rel="stylesheet" type="text/css"
href="http://minichat.tigase.org/mygwt-all.css" />

And similar to other configurations code in the web page body:

<iframe
src="http://minichat.tigase.org/Runner.html?jid=your-account@tigase.org&amp;name=YourName&amp;domain=tigase.org"
width="220px" height="250px" frameborder="0"></iframe>


Enjoy and send us your comments...