File

mod_invites_webgen/README.markdown @ 5943:05125c29fd67

mod_invites_webgen: initial release
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Wed, 26 Feb 2025 17:36:14 +0700
child 5945:805515dd2960
line wrap: on
line source

---
labels:
- 'Stage-Alpha'
summary: 'Enable create invitations via the web'
...

Introduction
============

Not every client would implement the create invitation feature. Thus, this
module allows users to create new invites from the server's website.

Details
=======

The invitation will create account-and-contact invites (the "add to roster"
kind of invite). Once user have sucessfully enter their credential, the module
redirect them to the invite page.

It depends on these module and their purpose:

- [mod_http]: for obvious reason :).
- [mod_invites][doc:modules:mod_invites]: generate the actual invite.
- [mod_invites_register_web][doc:modules:mod_invites_register]: serve the
  invite page.

Configuration
=============

The configuration utilizes the same `allow_user_invites` and
`allow_contact_invites` as [mod_invites_adhoc]. 

If you specify a `site_name`, it will uses that else it will fallback to the
`VirtualHost` that it was loaded onto.

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>

```