mod_muc_badge/README.markdown
author Kim Alvefur <zash@zash.se>
Sat, 23 Jun 2018 18:08:34 +0200
changeset 3145 774845606d73
child 3146 feefc29a1ef4
permissions -rw-r--r--
mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3145
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     1
---
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     2
depends:
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     3
- 'mod\_http'
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     4
- 'mod\_muc'
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     5
provides:
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     6
- http
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     7
title: 'mod\_muc\_badge'
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     8
---
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     9
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    10
# Introduction
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    11
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    12
This module generates a badge, similar the one
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    13
<https://opkode.com/blog/xmpp-chat-badge/>
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    14
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    15
# Configuration
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    16
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    17
  Option             Type     Default
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    18
  ------------------ -------- --------------------------
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    19
  `badge_label`      string   `"Chatroom"`
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    20
  `badge_count`      string   `"%d online"`
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    21
  `badge_template`   string   A SVG image (see source)
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    22
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    23
The template must be valid XML. If it contains `{label}` then this is
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    24
replaced by `badge_label`, similarly, `{count}` is substituted by
774845606d73 mod_muc_badge: Generates a SVG badge with the number of occupants in rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    25
`badge_count` with `%d` changed to the number of occupants.