Integrating iJab with Roundcube is a good solution for having web based Mail+XMPP (jabber) client. Steps for configuring iJab can be found on its website. Here I shall mention how you can integrate both of them:
- Below is a sample html file for loading both iJab and Roundcube together:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- The HTML 4.01 Transitional DOCTYPE declaration--> <!-- above set at the top of the file will set --> <!-- the browser's rendering engine into --> <!-- "Quirks Mode". Replacing this declaration --> <!-- with a "Standards Mode" doctype is supported, --> <!-- but may lead to some differences in layout. --> <html style="height: 100%; padding: 0; margin: 0; border: none;"> <body style="height: 100%; padding: 0; margin: 0; border: none;"> <iframe style="height: 100%; width: 100%; padding: 0; margin: 0; border: none;" src="/roundcubemail-0.4/"></iframe> <script type="text/javascript" language="javascript" src="/ijab-v1.0-beat3-2/ijab_config.js"></script> <script type="text/javascript" language="javascript" src="/ijab-v1.0-beat3-2/ijab_i18n_en.js"></script> <script type="text/javascript" language="javascript" src="/ijab-v1.0-beat3-2/ijab/ijab.nocache.js"></script> </body> </html>
- Further to auto login to iJab when you enter username and password in roundcube webmail as well as auto logout when you logout from roundcube, download my Roundcube iJab plugin, extract it to roundcube “plugins” folder and add “ijab” to the list of roundcube plugins in “main.inc.php”.
Previously I had used a dirty hack of modifying skins/default/templates/login.html file as I did not know how to write roundcube plugin then. If you had modified that file earlier, then I suggest you revert those changes and use the above plugin instead. - BONUS: Logout shortcut for iJab. Add the below shortcut to /ijab-v1.0-beat3-2/ijab_config.js:
{ href:"javascript:iJab.logout()", target:"_self", img:"/ijab-v1.0-beat3-2/ijab/images/logout.png", text:"Logout" }
You can download logout.png here
References:
http://code.google.com/p/ijab/ – iJab Website
http://code.google.com/p/ijab/w/list – iJab Wiki
http://www.ijab.im/node/4 – iJab Demos
http://www.ijab.im/node/88 – Integrating iJab into your website
http://www.ijab.im/node/90 – iJab API
http://code.google.com/p/ijab/wiki/iJabWithEjabberd – Integrating iJab with Ejabberd
Leave a Reply