Chapter 2. Installing Minichat on Your Website
Prev |  | Next

# Chapter 2. Installing Minichat on Your Website

We have made Minichat available to demonstrate new projects we are working on, to run some tests, and collect your opinions. The feedback we’ve recieved has exceeded our expectations. The most common question was: Can I/how can I install this on my website?

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

Just to remind you - this code is under development and will be updated and changed frequently. It may even stop working temporarily or permanently. We can and will intentionally block certain users or IP addresses if we discover any abuse. If you are ready for this and still want to use it continue reading…​

First thing to know: Minichat will only work with the tigase.org XMPP server right now. This is not because of 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 or XMPP server the installation would be much more difficult, involving Apaches proxy mod installation, configuration and possibly 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 XMPP server. It means that although you can configure Minichat to send messages to user@jabber.org, Tigase server won’t deliver those messages.

## Instructions:

1. Register an account on the tigase.org website. For purposes of this guide let’s say the account name is: your-account. The Jabber ID will be: your-account@tigase.org.

   Note! There seems to be some confusion so let me clarify this. You create an account on the www.tigase.org website but your Jabber account domain is: tigase.org.

2. Setup the 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 safe.

3. There are a few ways for adding the client to the website but you always use 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 your own account here.
   - name=YourName screen name (displayed name) of your account.
   - domain=tigase.org domain name you want 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&name=YourName&domain=tigase.org"
         width="220px" height="250px" frameborder="0"></iframe>

   - By adding a single bit of code: autologin=true the client automatically connects to the server and is ready for chatting without need to click on the title bar.

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

   - A 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 a 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&name=YourName&domain=tigase.org"
           width="220px" height="250px" frameborder="0"></iframe>

Enjoy and send us your comments…​

Prev |  | Next
Chapter 1. Jabber/XMPP introduction | Home | Chapter 3. How to Use Tigase Service