XMPP chat module?

81 views
Skip to first unread message

Jarimatti Valkonen

unread,
Apr 10, 2013, 1:38:38 AM4/10/13
to zotoni...@googlegroups.com
Hi,

I need to add a small chat into one web page. Previously I've used ejabberd and Jappix Mini (https://github.com/jappix/jappix/wiki/JappixMini).

The question is: is there already something similar in Zotonic? I'm aware of the mod_chat, but I remember reading that an improved chat module with XMPP support would be on the way. Ideally I'd like to be able to use also XMPP clients in addition to the web chat.


Best regards,
Jarimatti Valkonen

--
Jarimatti Valkonen
jari...@me.com



Andreas Stenius

unread,
Apr 10, 2013, 3:26:12 AM4/10/13
to Zotonic users
Hi Jarimatti,

First, mod_chat should at it currents state be seen more as a proof of
concept, or something to base your own chat module on. It has not been
kept up to date with recent versions of zotonic either.

I am unaware of any other chat modules for the time being.


2013/4/10 Jarimatti Valkonen <jari...@me.com>:
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Zotonic users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Arjan Scherpenisse

unread,
Apr 10, 2013, 5:33:00 AM4/10/13
to zotoni...@googlegroups.com
I don't think such a module exists.

How I think it would work is the following:

BOSH is the way to use XMPP over HTTP in the browser. So you would need
a BOSH endpoint, pointing at your Jabber server.

Then, you could use Strophe.JS to implement a MUC (Multi User Chat)
client in the browser.
http://strophe.im/strophejs/

Or use an existing one like this one:
http://candy-chat.github.io/candy/

One could implement all of that inside a Zotonic module...

Arjan

Jarimatti Valkonen

unread,
Apr 11, 2013, 10:55:44 AM4/11/13
to zotoni...@googlegroups.com
Hi all,

It was actually quite simple to make a basic module. I could publish this to e.g. Github if anyone is interested?

Currently everything (chatroom name, server name etc.) are hard-coded in a page template but I intend to change this. What would be the best way to handle configuration? I understand that the main Zotonic config section has global parameters and this is probably too limiting if one would like to use multiple chatrooms in a single site. Would page properties be better?

Oh, and I must say that I'm very satisfied with Zotonic so far.


br,
Jarimatti


Jarimatti Valkonen <jari...@me.com> kirjoitti 10.4.2013 kello 12.56:

> Well here I have a plan then. I'll try to make a module out of this with some existing JS client. Candy is one good candidate.
>
> I'll begin with anonymous chat and next try to add Zotonic user login.
>
>
> Thanks for the information,
> Jarimatti
>
> Lähetetty iPhonesta
--
Jarimatti Valkonen
jari...@me.com



Jarimatti Valkonen

unread,
Apr 10, 2013, 5:56:52 AM4/10/13
to zotoni...@googlegroups.com
Well here I have a plan then. I'll try to make a module out of this with some existing JS client. Candy is one good candidate.

I'll begin with anonymous chat and next try to add Zotonic user login.


Thanks for the information,
Jarimatti

Lähetetty iPhonesta

Arjan Scherpenisse <ar...@scherpenisse.net> kirjoitti 10.4.2013 kello 12.33:

Message has been deleted

Jarimatti Valkonen

unread,
Apr 28, 2013, 11:17:43 AM4/28/13
to zotoni...@googlegroups.com
I'll have to clean the code up a bit and put it to github. It's nothing fancy, just a module consisting of Candy, dispatch rule and a template at this point. But I think it's a good starting point and I intend to improve it.

Candy is found here: http://candy-chat.github.io/candy/


Cheers,
Jarimatti



"Chad J. Dupuis" <sup...@yyhmsg.net> kirjoitti 28.4.2013 kello 16.57:

> We are in the process of converting a drupal site into zotonic and will need a chat module with login and anon features like you are building. We'd be happy to test your module if you want to put it in github... thanks!
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Zotonic users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Jarimatti Valkonen
jari...@me.com



Jarimatti Valkonen

unread,
May 11, 2013, 8:55:36 AM5/11/13
to zotoni...@googlegroups.com
The code is now available at https://github.com/jarimatti/mod_chat_candy for anyone interested.

The status for now is that it "works for me". The module includes a dispatch rule and an example template, please also check the Candy docs regarding configuration.


Cheers,
Jarimatti
Reply all
Reply to author
Forward
0 new messages