ajaxbber Code
Status: Alpha
Brought to you by:
gorbulas
Ajaxbber web chat ----------------- Ajaxbber is a web-based Jabber client. It is completly written in Javascript, and uses Ajax technology. Ajaxbber provides basic instant messenging, and roster management through the web browser. There's no need to install anything in your computer, you just have to use a compatible browser. (see FAQ). It's comparable to JWChat, but all windows stays inside one web page. It's widely configurable, and themeable, because it is wholly based on CSS design. Features -------- - Roster management : add, edit, delete contacts - Create account - Status messages - User avatars XEP 0153 - Preferences stored in a cookie - Eye candy effects for notification - All chat windows in the same "tab", and few popups Ajaxbber uses the same technology as JWChat (http://jwchat.org), that's why the following is grabbed from jwchat's README. Requirements ------------ You need to have access to a jabber server by way of either [1]HTTP Polling or [2]HTTP Binding. Either use some server that has support for one of these protocols biult in (e.g. [3]ejabberd) or use some gateway like [4]punjab (python based) or [5]JabberHTTPBind (a java servlet). [1]http://www.jabber.org/jeps/jep-0025.html [2]http://www.jabber.org/jeps/jep-0124.html [3]http://ejabberd.jabber.ru [4]http://punjab.sourceforge.net [5]http://zeank.in-berlin.de/jhb/ Additionally you need a web-server of your choice capable of doing address rewriting. Download -------- Please refer to http://ajaxbber.sourceforge.net/index.php?page=download for download instructions. Quick Install Guide ------------------- * Unpack ajaxbber into some directory that is accessible by your web server. E.g.: /var/www/ajaxbber * Setup your web server so that it redirects some local address like http://jabber.example.com/http-poll/ to some service that either implements HTTP Polling or HTTP Binding. Some servers like ejabberd do have such a service built-in. Please refer to the docs of your jabber server to find out how to use it. If your server does not have such a service built-in or you don't plan to run your own jabber server at all there are standalone components like punjab or JabberHTTPBind available that let you connect to any jabber server using HTTP Binding or HTTP Polling. Here is an example that should work with a default ejabberd installation on the same host: %<-----<schnipp>----- <VirtualHost *> ServerName jabber.example.com DocumentRoot /var/www/ajaxbber <Directory /var/www/ajaxbber> Options +Indexes +Multiviews </Directory> AddDefaultCharset UTF-8 RewriteEngine on RewriteRule http-poll/ http://127.0.0.1:5280/http-poll/ [P] </VirtualHost> %<-----<schnapp>----- Alternatively you could put a .htaccess file within ajaxbber's subdirectory like this (you need to have 'AllowOverride All' in your apache config in order to make this work): %<-----<schnipp>----- <IfModule mod_rewrite.c> RewriteEngine On RewriteRule http-poll/ http://127.0.0.1:5280/http-poll/ [P] </IfModule> %<-----<schnapp>----- Note 1: You need to enable mod_rewrite and mod_proxy at your apache configuration. Apache2 users also need to enable the protocol specific proxy module mod_proxy_http. Note 2: With JabberHTTPBind you don't need to do this sort of address rewriting if you're serving JWChat's files from within your servlet container directly or you're using some technique like mod_jk to mount a remote servlet engine directory transparently into your apache's domain of served addresses. * Restart your web server. * Test if this redirect works. Following the example above point your browser to http://jabber.example.com/http-poll/. You should see the same response as if you you're pointing it to http://jabber.example.com:5280/http-poll/. * Edit 'config.js' to suit your needs. Be sure to set 'httpbase' to the redirected address from above. Within our example it would have to be 'http://jabber.example.com/http-poll/' or 'http-poll/' in short. Note 1: Double check this if using some relative address (relative to ajaxbber's base URL). Note 2: You can't use an httpbase address that is not local to your JWChat installation. Local in this context means that it MAY NOT be on some different host or port then where JWChat is being served from. * If you haven't done yet start your jabber server (if any). * Point your browser to http://jabber.example.com and log in. Disclaimer ---------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA