Software /
code /
prosody-modules
Changeset
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 |
parents | 5589:c362833be557 |
children | 5591:680fb3344357 |
files | mod_invites_register_web/README.markdown |
diffstat | 1 files changed, 38 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_invites_register_web/README.markdown Fri May 26 01:37:08 2023 +0700 +++ b/mod_invites_register_web/README.markdown Fri May 26 02:08:29 2023 +0700 @@ -34,13 +34,6 @@ validates invite tokens. It also supports guiding the user through client download and configuration via mod_register_apps. -There is no specific configuration for this module (though it uses the -optional `site_name` to override the displayed site name. - -You may also 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 -on the current host, it will default to the URL of that module. - 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. @@ -49,3 +42,41 @@ loaded). As a consequence of this module being loaded, the default password policies will be enforced for all registrations on the server if not explicitly loaded or configured. + +Configuration +============= + +It uses the optional `site_name` to override the displayed site name. + +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 +on the current host, it will default to the URL of that module. + +You can use your own html templates with `invites_html_template`. 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/?=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/?=aowiefjoaij&l=en + +``` + +So in your `register.html`, you can point to the English version by using an +`<a>` tag like this: +``` + + <a href="/?={token}&l=en">English</a> + +``` + +You can further customize your URL with [mod_invites_page] too. +