Changeset

6275:274784e262db

mod_invites_webgen: update doc
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Sun, 01 Jun 2025 15:12:27 +0700
parents 6274:6cf1f47f24b4
children 6276:4db79f3d9e16
files mod_invites_webgen/README.markdown
diffstat 1 files changed, 30 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites_webgen/README.markdown	Sun Jun 01 14:39:31 2025 +0700
+++ b/mod_invites_webgen/README.markdown	Sun Jun 01 15:12:27 2025 +0700
@@ -7,8 +7,9 @@
 Introduction
 ============
 
-Not every client would implement the create invitation feature. Thus, this
-module allows users to create new invites from the server's website.
+This module allows users to create new invites from the server's website.
+It is quite handy when you don't have a phone with you but still want to
+invite the person in front of you to chat.
 
 Details
 =======
@@ -33,47 +34,43 @@
 If you specify a `site_name`, it will uses that else it will fallback to the
 `VirtualHost` that it was loaded onto.
 
-After successfully enabling this module, it should be available at the default
+After successfully enabling this module, it should be available via the default
 URL:
+
+```lua
+    https://prosody.example.tld/webgen
 ```
 
-    https://prosody.example.tld/webgen
+HTML templates can be overridden by using `invites_register_template_path`,
+see the `html/` directory in the sources for the files needed.
+
+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 `webgen.html` for your default URL:
 
+```lua
+    https://prosody.example.net/webgen?t=aowiefjoaij
+``` 
+
+And the `webgen.en.html` in the directory you have specified in
+your config file, it will be served at:
+
+```lua
+    https://prosody.example.net/webgen?t=aowiefjoaij&l=en
 ```
 
-You can modify the URL in your config under `http_path` with `invites_webgen`
-for example:
+So in your `webgen.html`, you can point to the English version by using an
+`<a>` tag like this:
+
+```lua
+    <a href="/webgen?t={token}&l=en">English</a>
 ```
 
+You can modify the URL in your config under `http_path` with `invites_webgen`:
+
+```lua
 http_path = {
     invites_webgen = "/registration"
 }
-
-```
-
-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)
-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>
-
-```
-