Software / code / prosody-modules
Comparison
mod_invites_register_web/README.markdown @ 5590:d5a31a13c357
mod_invites_register_web: Update doc on how to use `invites_html_template`.
| author | Trần H. Trung <work@trung.fun> |
|---|---|
| date | Fri, 26 May 2023 02:08:29 +0700 |
| parent | 5141:027fb71ad509 |
| child | 5661:e76ec7ad941e |
comparison
equal
deleted
inserted
replaced
| 5589:c362833be557 | 5590:d5a31a13c357 |
|---|---|
| 32 | 32 |
| 33 mod_invites_register_web implements a web-based registration form that | 33 mod_invites_register_web implements a web-based registration form that |
| 34 validates invite tokens. It also supports guiding the user through client | 34 validates invite tokens. It also supports guiding the user through client |
| 35 download and configuration via mod_register_apps. | 35 download and configuration via mod_register_apps. |
| 36 | 36 |
| 37 There is no specific configuration for this module (though it uses the | |
| 38 optional `site_name` to override the displayed site name. | |
| 39 | |
| 40 You may also set `webchat_url` to the URL of a web chat that will be linked | |
| 41 to after successful registration. If not specified but mod_conversejs is loaded | |
| 42 on the current host, it will default to the URL of that module. | |
| 43 | |
| 44 This module depends on mod_invites_page solely for the case where an invalid | 37 This module depends on mod_invites_page solely for the case where an invalid |
| 45 invite token is received - it will redirect to mod_invites_page so that an | 38 invite token is received - it will redirect to mod_invites_page so that an |
| 46 appropriate error can be served to the user. | 39 appropriate error can be served to the user. |
| 47 | 40 |
| 48 The module also depends on [mod_password_policy] (which will be automatically | 41 The module also depends on [mod_password_policy] (which will be automatically |
| 49 loaded). As a consequence of this module being loaded, the default password | 42 loaded). As a consequence of this module being loaded, the default password |
| 50 policies will be enforced for all registrations on the server if not | 43 policies will be enforced for all registrations on the server if not |
| 51 explicitly loaded or configured. | 44 explicitly loaded or configured. |
| 45 | |
| 46 Configuration | |
| 47 ============= | |
| 48 | |
| 49 It uses the optional `site_name` to override the displayed site name. | |
| 50 | |
| 51 You can set `webchat_url` to the URL of a web chat that will be linked | |
| 52 to after successful registration. If not specified but mod_conversejs is loaded | |
| 53 on the current host, it will default to the URL of that module. | |
| 54 | |
| 55 You can use your own html templates with `invites_html_template`. Names of the | |
| 56 files MUST match the default. More over, you can offer multiple (human) | |
| 57 languages by adding the `&l=` to the URL. Meaning this module will serve | |
| 58 `register.html` for your default URL: | |
| 59 ``` | |
| 60 | |
| 61 https://prosody.example.net/?=aowiefjoaij | |
| 62 | |
| 63 ``` | |
| 64 | |
| 65 And if you have a `register.en.html` in the directory you have specified in | |
| 66 your config file, it will be served at: | |
| 67 ``` | |
| 68 | |
| 69 https://prosody.example.net/?=aowiefjoaij&l=en | |
| 70 | |
| 71 ``` | |
| 72 | |
| 73 So in your `register.html`, you can point to the English version by using an | |
| 74 `<a>` tag like this: | |
| 75 ``` | |
| 76 | |
| 77 <a href="/?={token}&l=en">English</a> | |
| 78 | |
| 79 ``` | |
| 80 | |
| 81 You can further customize your URL with [mod_invites_page] too. | |
| 82 |