Software / code / prosody-modules
Diff
mod_invites_register_web/README.md @ 6273:8ceedc336d0d
Merge update
| author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
|---|---|
| date | Sun, 01 Jun 2025 13:51:38 +0700 |
| parent | 6262:a72388da5cd4 |
| parent | 6265:22b5b744fc78 |
line wrap: on
line diff
--- a/mod_invites_register_web/README.md Sun Jun 01 11:43:16 2025 +0700 +++ b/mod_invites_register_web/README.md Sun Jun 01 13:51:38 2025 +0700 @@ -34,8 +34,8 @@ validates invite tokens. It also supports guiding the user through client download and configuration via mod_register_apps. -This module depends on mod_invites_page solely for the case where an invalid -invite token is received - it will redirect to mod_invites_page so that an +This module depends on [mod_invites_page] solely for the case where an invalid +invite token is received - it will redirect to [mod_invites_page] so that an appropriate error can be served to the user. The module also depends on [mod_password_policy] (which will be automatically @@ -46,36 +46,43 @@ Configuration ============= -It uses the optional `site_name` to override the displayed site name. +The optional `site_name` setting can be used to override the displayed site name. + +```lua +site_name = "My Chat Service" +``` You can set `webchat_url` to the URL of a web chat that will be linked -to after successful registration. If not specified but mod_conversejs is loaded +to after successful registration. If not specified but [mod_conversejs] is loaded on the current host, it will default to the URL of that module. -You can use your own html templates with `invites_template_html`. Names of the -files MUST match the default. More over, you can offer multiple (human) +HTML templates can be overridden by using `invites_register_template_path`, see +the `html/` directory in the sources for the files needed. + +```lua +invites_register_template_path = "/path/to/templates/html" +``` + +Names of the files MUST match the default. More over, you can offer multiple (human) languages by adding the `&l=` to the URL. Meaning this module will serve `register.html` for your default URL: -``` - https://prosody.example.net/register?t=aowiefjoaij - +```lua +https://prosody.example.net/register?t=aowiefjoaij ``` And if you have a `register.en.html` in the directory you have specified in your config file, it will be served at: -``` - https://prosody.example.net/register?t=aowiefjoaij&l=en - +```lua +https://prosody.example.net/register?t=aowiefjoaij&l=en ``` So in your `register.html`, you can point to the English version by using an `<a>` tag like this: -``` - <a href="/register?t={token}&l=en">English</a> - +```lua +<a href="/register?t={token}&l=en">English</a> ``` You can further customize your URL with [mod_invites_page] too.