Software /
code /
prosody-modules
Comparison
mod_webpresence/README.markdown @ 5588:f16720087ef2
mod_webpresence: Add opt-in mechanism.
author | Trần H. Trung <work@trung.fun> |
---|---|
date | Tue, 23 May 2023 23:45:00 +0700 |
parent | 2734:f5005d256877 |
comparison
equal
deleted
inserted
replaced
5484:bb083e9f78dd | 5588:f16720087ef2 |
---|---|
1 --- | 1 --- |
2 labels: | 2 labels: |
3 - 'Stage-Stable' | 3 - 'Stage-Stable' |
4 summary: Display your online status in web pages | 4 summary: Display your online status in web pages |
5 rockspec: | |
6 build: | |
7 copy_directories: | |
8 - icons | |
5 ... | 9 ... |
6 | 10 |
7 Introduction | 11 Introduction |
8 ============ | 12 ============ |
9 | 13 |
10 Quite often you may want to publish your Jabber status to your blog or | 14 Quite often you may want to publish your Jabber status to your blog or |
11 website. mod\_webpresence allows you to do exactly this. | 15 website. mod\_webpresence allows you to do exactly this via adhoc control. |
12 | |
13 Details | |
14 ======= | |
15 | |
16 This module uses Prosody's built-in HTTP server (it does not depend on | |
17 mod\_httpserver). It supplies a status icon representative of a user's | |
18 online state. | |
19 | 16 |
20 Installation | 17 Installation |
21 ============ | 18 ============ |
22 | 19 |
23 Simply copy mod\_webpresence.lua to your modules directory, the image | 20 Copy mod\_webpresence.lua to your modules directory then add it to your |
24 files are embedded within it. Then add "webpresence" to your | 21 modules\_enabled list: |
25 modules\_enabled list. | |
26 | 22 |
27 Usage | 23 ``` |
28 ===== | |
29 | 24 |
30 Once loaded you can embed the icon into a page using a simple `<img>` | 25 modules_enabled = { |
31 tag, as follows: | 26 "webpresence"; |
27 }; | |
32 | 28 |
33 <img src="http://prosody.example.com:5280/status/john.smith" /> | 29 ``` |
34 | 30 |
35 Alternatively, it can be used to get status name as plaint text, status | 31 Configuration & Usage |
36 message as plain text or html-code for embedding on web-pages. | 32 ===================== |
37 | 33 |
38 To get status name in plain text you can use something like that link: | 34 There is a set of icons supplied with the module. But you can configure it to |
39 `http://prosody.example.com:5280/status/john.smith/text` | 35 load your own in the config file: |
36 | |
37 ``` | |
38 | |
39 webpresence_icons = "/path/to/your/icons"; | |
40 | |
41 ``` | |
42 | |
43 Beware that the icon files must have the same names as the default files. | |
44 | |
45 This module will always returns offline until you enable it via adhoc. | |
46 | |
47 You can embed the icon into a page using a simple `<img>` tag, as follows: | |
48 | |
49 <img src="http://prosody.example.com:5280/status/john.smith@domain.net" /> | |
50 | |
51 Alternatively, it can be used to get status name as plain text, status message | |
52 as plain text or html-code for embedding on web-pages. | |
53 | |
54 To get status name in plain text you can use something like this link: | |
55 `http://prosody.example.com:5280/status/john.smith@domain.net/text` | |
40 | 56 |
41 To get status message as plain text you can use something like following | 57 To get status message as plain text you can use something like following |
42 link: `http://prosody.example.com:5280/status/john.smith/message` | 58 link: `http://prosody.example.com:5280/status/john.smith@domain.net/message` |
43 | 59 |
44 To get html code, containig status name, status image and status message | 60 To get html code, containing status name, status image and status message |
45 (if set): `http://prosody.example.com:5280/status/john.smith/html` | 61 (if set): `http://prosody.example.com:5280/status/john.smith@domain.net/html` |
46 | |
47 All other | |
48 | 62 |
49 Compatibility | 63 Compatibility |
50 ============= | 64 ============= |
51 | 65 |
52 ----- ------- | 66 ----- ------- |
53 trunk Works | 67 trunk Works |
54 0.10 Works | 68 0.12.3 Works |
55 0.9 Works | 69 0.10 Works |
56 0.8 Works | 70 0.9 Works |
57 0.7 Works | 71 0.8 Works |
58 0.6 Works | 72 0.7 Works |
59 ----- ------- | 73 0.6 Works |
74 ----- ------- | |
60 | 75 |
61 Todo | 76 Todo |
62 ==== | 77 ==== |
63 | 78 |
64 - Display PEP information (maybe a new plugin?) | 79 - Display PEP information (maybe a new plugin?) |
65 - More (free) iconsets | |
66 - Internal/external image generator (GD, ImageMagick) | 80 - Internal/external image generator (GD, ImageMagick) |
81 - Display the correct boolean in the first form. |