Refactor mod_webpresence to work with binary plus icons
This commit is contained in:
parent
09775d41db
commit
1a17e97873
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
mod_webpresence - Presence on the Web
|
mod_webpresence - Presence on the Web
|
||||||
|
|
||||||
Authors: Igor Goryachev, Badlop
|
Authors: Igor Goryachev, Badlop, runcom
|
||||||
Requires: ejabberd SVN (not possible with 1.1.x)
|
|
||||||
http://www.ejabberd.im/mod_webpresence
|
http://www.ejabberd.im/mod_webpresence
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,23 +33,19 @@ No web server, database, additional libraries or programs are required.
|
||||||
3. Copy the directory data/pixmaps to a directory you prefer.
|
3. Copy the directory data/pixmaps to a directory you prefer.
|
||||||
|
|
||||||
4. Edit ejabberd.cfg and add the HTTP and module definitions:
|
4. Edit ejabberd.cfg and add the HTTP and module definitions:
|
||||||
{listen, [
|
|
||||||
...
|
|
||||||
{5280, ejabberd_http, [
|
|
||||||
...
|
|
||||||
{request_handlers, [
|
|
||||||
...
|
|
||||||
{["presence"], mod_webpresence}
|
|
||||||
]}
|
|
||||||
]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{modules, [
|
listen:
|
||||||
...
|
-
|
||||||
{mod_webpresence, [
|
port: 5280
|
||||||
{pixmaps_path, "/path/to/pixmaps"}
|
module: ejabberd_http
|
||||||
]}
|
[...]
|
||||||
]}.
|
request_handlers:
|
||||||
|
"presence": mod_webpresence
|
||||||
|
|
||||||
|
modules:
|
||||||
|
[...]
|
||||||
|
mod_webpresence:
|
||||||
|
pixmaps_path: "/path/to/pixmaps"
|
||||||
|
|
||||||
5. Restart ejabberd.
|
5. Restart ejabberd.
|
||||||
If problems appear, remember to always look first the ejabberd log files
|
If problems appear, remember to always look first the ejabberd log files
|
||||||
|
@ -102,10 +96,14 @@ In that case, all the output methods are enabled, the icon theme is
|
||||||
'jsf-jabber-text' and RandomID is disabled.
|
'jsf-jabber-text' and RandomID is disabled.
|
||||||
|
|
||||||
The default behaviour is to not have automatic webpresence:
|
The default behaviour is to not have automatic webpresence:
|
||||||
{access, webpresence_auto, [{deny, all}]}.
|
access:
|
||||||
|
webpresence_auto:
|
||||||
|
all: deny
|
||||||
|
|
||||||
For example, if you want all the local users to be automatically enabled in the service:
|
For example, if you want all the local users to be automatically enabled in the service:
|
||||||
{access, webpresence_auto, [{allow, local}]}.
|
access:
|
||||||
|
webpresence_auto:
|
||||||
|
local: allow
|
||||||
|
|
||||||
Note that this ACCESS rule is only checked if the user is not registered.
|
Note that this ACCESS rule is only checked if the user is not registered.
|
||||||
So, if the user registers and disables all output methods,
|
So, if the user registers and disables all output methods,
|
||||||
|
@ -119,50 +117,40 @@ register and disable output methods, you can use the Access configurable paramet
|
||||||
Example 1
|
Example 1
|
||||||
---------
|
---------
|
||||||
|
|
||||||
{listen, [
|
listen:
|
||||||
...
|
-
|
||||||
{5280, ejabberd_http, [
|
port: 5280
|
||||||
...
|
module: ejabberd_http
|
||||||
{request_handlers, [
|
[...]
|
||||||
...
|
request_handlers:
|
||||||
{["presence"], mod_webpresence}
|
"presence": mod_webpresence
|
||||||
]}
|
|
||||||
]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{modules, [
|
modules:
|
||||||
...
|
[...]
|
||||||
{mod_webpresence, [
|
mod_webpresence:
|
||||||
{pixmaps_path, "/path/to/pixmaps"}
|
pixmaps_path: "/path/to/pixmaps"
|
||||||
]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
|
|
||||||
Example 2
|
Example 2
|
||||||
---------
|
---------
|
||||||
|
|
||||||
{listen, [
|
listen:
|
||||||
...
|
-
|
||||||
{80, ejabberd_http, [
|
port: 80
|
||||||
...
|
module: ejabberd_http
|
||||||
{request_handlers, [
|
[...]
|
||||||
...
|
request_handlers:
|
||||||
{["status"], mod_webpresence}
|
"status": mod_webpresence
|
||||||
]}
|
|
||||||
]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{modules, [
|
modules:
|
||||||
...
|
[...]
|
||||||
{mod_webpresence, [
|
mod_webpresence:
|
||||||
{host, "webstatus.@HOST@"},
|
host: "webstatus.@HOST@"
|
||||||
{access, local},
|
access: local
|
||||||
{pixmaps_path, "/path/to/pixmaps"},
|
pixmaps_path: "/path/to/pixmaps"
|
||||||
{port, 80},
|
port: 80
|
||||||
{path, "status"},
|
path: "status"
|
||||||
{baseurl, "http://www.example.org/status/"}
|
baseurl: "http://www.example.org/status/"
|
||||||
]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
erl -pa ../../ejabberd-dev/trunk/ebin -pa ebin -make
|
erl -pa ../../ejabberd-dev/ebin -pa ebin -make
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 785 B |
Binary file not shown.
After Width: | Height: | Size: 837 B |
Binary file not shown.
After Width: | Height: | Size: 854 B |
Binary file not shown.
After Width: | Height: | Size: 824 B |
Binary file not shown.
After Width: | Height: | Size: 681 B |
Binary file not shown.
After Width: | Height: | Size: 830 B |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue