Name: mod_webpresence Purpose: Presence on the Web Author: Badlop Type: Module Requirements: ejabberd SVN Download: ejabberd-modules
This module is the successor of Igor Goryachev's mod_presence.
Features for admin
- No need to install an additional web server, database, libraries, or programs: it uses ejabberd's embedded http service and Erlang's internal database.
- Page in Web Admin that lists registered users and their options.
- Page in Web Admin with usage statistics: options, and icon themes. Includes raw number and percentages.
- Customizable port and URL base path.
- Possibility to restrict usage to only some users.
- Easy to add more icon themes: just copy the files to the proper directory.
- Fully translatable both the admin and the user messages.
- Support for virtual hosts and clustering.
- Highly scalable: each registered user is a register in the table. Other solutions based on bots are limited to only a few hundreds or thousands of registered users.
- Published under the GPL license: you can inspect the source code, modify and compile. It's Open Source and Free Sofware.
Features for user
- Easy registration and unregistration with any powerful Jabber client.
- After registration, you receive a message with instructions and example URLs.
- Specify your account using your real Jabber ID or a Random ID.
- Get a reminder of your Random ID if you forget it.
- Request a new Random ID if you don't want to use the old one.
- Publish the avatar that you stored in your vCard.
- Publish an XML that lists resources and their priority, presence, and status text.
- Publish the status text of your presence.
- Publish and image that reflects your current presence.
- Many different icon themes, by different authors and sources.
- You can define the default icon theme you want to use, or specify a specific one in the URL.
- You can publish the image or status text of a specific resource.
- Public page that shows all the existing icon themes.
- You can unregister by disabling the options, and you receive a message.
Screenshots
Go to Screenshots of Web Presence
Additional Icon Themes
TO DO: If not all themes are included in the released version, there will be a zip file with all the themes.
Feature Requests
- User Mood and User tune from PEP output: waiting for PEP to be integrated in ejabberd.
Related Links
- Presentation on the ejabberd mailing list: web-presence module for ejabberd
- Small description on the mailing list
- jquery.jabberpresence.js, a jQuery plugin
Alternative solutions
If this programs doesn't suit your needs, there are other programs and services to publish Jabber presence in the web:
- Edgar
- Elmer
- Elmer NxG
- JabberLand's Status on Web
- JabbIM Status
- Presence Service plugin for Openfire
Invisible?
I've set status to "invisible" and mod_webpresence displays me as "online". How can it be set to display "offline" instead?
> I've set status to
> I've set status to "invisible". How can it be set to display "offline" instead?
Not possible. When you refer to become invisible, your client may be using one of those protocols:
Usable with Apache
Some phpbb forums don't want to shop [img]http://domain.su:5280/presence/jid/xxx/xxx.su/image/mypresence.png[/img], while they show [img]http://xxx.su/mypresence.png[/img].
So I putted "cd ~www; wget 'http://domain.su:5280/presence/jid/xxx/xxx.su/image/mypresence.png'" into cron and use apache's hosted image on forums.
Any other ways?
mod_webpresence jQuery plugin
I've worked up a simple jQuery plugin that can display and dynamically update a webpresence badge using mod_webpresence. It is capable of parsing the XML endpoint, knows about jid/rid stuff, avatars, and image themes. It also provides a hook for doing arbitrary stuff on status changes, if you want something fancier to happen than the default. Full documentation is provided in the script.
direct link
... here's the direct link:
Problem grabbing information from mod_webpresence service
Hello,
another thing I noticed:
webpresence.jabber.hot-chilli.net (jabber.hot-chilli.net is the server I'm maintaining) is shown grey in this list:http://www.jabberes.org/servers/
I had a little chat with the maintainer of that list. He told me that it is grey because the bot cannot grab information from the service. It gets a 403 error.
Is this because the default access rule, which I'm running, is "local" and external users cannot use (and maybe not even access for some information) this service?
He suggests that you open the service for information but disable registration from external users.
Is this maybe also the problem why I don't see a proper webpresence service when pointing to on of our virtual host domains like jabber.hot-chilli.eu with my jabber.hot-chilli.net user, as described here? http://www.ejabberd.im/mod_webpresence#comment-53973
Regards,
Martin
access:
Specify who can register in the webpresence service.
Don't bother to specify 'all' because this module can only show presence of
local users.
Default value: local
Explanation of mod_webpresence in multiple vhosts
I don't see a proper webpresence service when pointing to on of our virtual host domains like jabber.hot-chilli.eu with my jabber.hot-chilli.net user,
What you describe is not a bug or misconfiguration, it is done on purpose.
mod_webpresence provides two things:
mod_webpresence is heavily tied inside ejabberd, so this module is restricted to provide service only to users of the vhost where it runs.
With this setup, mod_webpresence will run for "localhost", and will run for "example.com":
The result is that:
Anybody can access the page
Anybody can access the page
mod_webpresence issue with virtual hosts
Hello,
I set up the latest mod_webpresence for ejabberd 2.0.x from SVN for my ejabberd 2.0.3 server (I run a Debian system and no 2.1.x packages are available for Debian at the moment).
Support for virtual hosts and clustering.
Everything seems to work ok on the primary jabber domain but secondary virtual hosts have a problem with mod_webpresence. First of all the icon shown in Miranda isn't the icon usually show for this service and also the service is shown as faulty.
I did not set the hostname for the service, so the hostname for every domain is webpresence.jabberdomain.tld, which I don't really like because all services just have one hostname (taken from the primary domain name) on my server. When I set the domain name to a fixed value the service seems not to run anyhow.
Does somebody have an idea what the problem might be? Maybe the same like here: http://www.ejabberd.im/node/3074#comment-53967
Regards,
Martin
mod_webpresence and ejabberd 2.0.2
I am testing mod_webpresence with ejabberd 2.0.2 in Centos 5.2 x86_64 and does not working. In the "Web presence" admin page I get "not found".
In ejabberd.log:
=ERROR REPORT==== 2008-10-29 13:45:29 ===
E(<0.755.0>:ejabberd_hooks:205) : {aborted,
{no_exists,
[webpresence,
[{{webpresence,
{'$1',"domain.com"},
'$2','$3','$4','$5','$6','$7','$8'},
[],
['$$']}]]}}
With ejabberd 2.0.1 it works OK.
Does anyone have tried and it works?
Thanks
For ejabberd 2.0.x get mod_webpresence/branches/ejabberd-2.0.x
I am testing mod_webpresence with ejabberd 2.0.2 in Centos 5.2 x86_64 and does not working. In the "Web presence" admin page I get "not found".
Until now you downloaded mod_webpresence/trunk, right? Since October 2008, that version requires ejabberd trunk SVN (which will become ejabberd 2.1 when released).
If you want to use mod_webpresence with any version ejabberd 2.0.x, please get mod_webpresence/branches/ejabberd-2.0.x. I tried this with ejabberd 2.0.2 and the WebAdmin page works correctly.
ejabberd-2.0.3 no success using branches/ejabberd-2.0.x
I've been trying to get mod_webpresence working under ejabberd-2.0.3, with no success.
I do see mnesia tables, but the module doesn't show up in the admin interface, and accessing a presence URL never returns any data, the listener always returns a Not Found result.
It's possible I didn't quite get the configuration file changes into ejabberd.cfg correctly, but I don't receive any errors from ejabberd when I restart
The modules statement is:
<pre>{mod_webpresence,[
{access, webpresence_auto, [{allow, local}]}
]},</pre>
Check documentation about ejabberd's Access rules
You messed how ejabberd's Access rules work. See the ejabberd Guide and ejabberd.cfg for examples.
In your case, it seems what you want to put is:
Thank
Thank you very much badlop, you are right
Issues with priority 'undefined'
I've recently gone about patching this module to query an entire vhost for statuses and found a bug. If a priority for a resource is undefined e.g :
The module will error out and return a 'Not Found'. I suppose if every resource requires a priority by definition then it's not the fault of the module but some exception handling would be nice. Right now my patch gathers the online users by querying the session table so I'll do some scrubbing before passing the data onward.
In regards to my patch I'm not sure if it's worth offering up since it only returns XML and ignores the ACL restrictions so it's somewhat tailored for my needs. I'll make it available to anyone interested though.
Bug in mod_webpresence, try new SVN
If a priority for a resource is undefined ... The module will error out and return a 'Not Found'.
I suppose if every resource requires a priority by definition then it's not the fault of the module but some exception handling would be nice.
I think ejabberd is correct, and the problem is in mod_webpresence, that must handle an undefined priority:
After completing the preconditions described in [XMPP‑CORE] and requesting the roster (RECOMMENDED), a client signals its availability for communication by sending INITIAL PRESENCE to its server...
The initial presence stanza MAY contain the <priority/> element...
So, the priority is only set when sending initial presence. Some Jabber clients may not send initial presence at all, for example bots.
I've updated mod_webpresence in SVN: only sessions that have presence (and priority) set will be returned. I didn't test the change.
Thanks but...
Because it could cause confusion and given that clients are bound to complain, I revised the changes you committed to the SVN to run a case .. of to check for undefined. If true it returns a -1 and false returns the priority. -1 is a valid value but generally the jabber client connecting is one of our own design, which users preset priority values (making it easier to filter for).
Thanks for the clarification though.
another alternative solution
another alternative solutionhttp://jobble.uaznia.net :
Right now, all our efforts are focused on Jabber Users Map - a fully automated, GoogleMaps-based map for every Jabber user.