Private messages, feedback and «Suggest a post» on tags
Which theme files replace the pages of correspondence, the feedback form and the post suggestion, and which tags work in them.
Private messages (the Messages module)
Theme files: views/messages/index.tpl.html (the list of conversations) and views/messages/thread.tpl.html (the correspondence). No file — the page stays as before. Starters are in modules/messages/starters. The forms (to whom, search, reply, edit, report, bulk actions) are written by the engine: the protection key and fields cannot be lost, the theme only arranges ready pieces.
The list of conversations
| Tag | What it is |
|---|---|
{total} {unread_total} {mode} {query} {to_query} {messages_url} | how many conversations and unread ones; the tab (all / unread); the search string; the list address |
[if:closed] | private messages are closed by the person themselves |
[if:mailbox] {mailbox_used} {mailbox_limit} [if:mailbox_full] [if:mailbox_near] {mailbox} | the role's «keep letters» limit: used, limit, «full», «nearly full»; {mailbox} is a ready «Filled N of M» indicator with a bar (empty for a role without a limit) |
{to_form} {tabs} {search_form} {receiving_form} | ready engine forms and tabs |
{bulk_open} … {bulk_close} | bulk actions on ticked conversations (the checkbox is {item.pick}) |
[each:threads] | conversations: {item.name} {item.username} {item.url} {item.user_url} {item.avatar} {item.initials} {item.hue} {item.unread} {item.unread_label} {item.subject} {item.excerpt} {item.mine} {item.when} {item.pick} |
[if:nothing] {nothing_text} | there are no conversations and why |
The correspondence
| Tag | What it is |
|---|---|
{name} {username} {profile_url} {back_url} {avatar} {initials} {hue} | the other person |
{role} {role_key} {role_color} {role_badge} | the other person's role: name, machine name (for conditions), colour, a ready badge |
[if:online] | the other person is «on the site»: they did something in the last five minutes and allowed showing their activity |
{registered} | the date they joined — only if the person allowed «Show registration date» |
[if:can_reply] {denied} {reply_form} {tools} | whether writing is allowed (otherwise the reason in words); the reply form; conversation tools |
[each:letters] | letters: {item.id} {item.body} (text, quotes as blocks) {item.files} (attachments) {item.subject} {item.when} {item.edited} {item.edited_when} {item.read} {item.read_when} {item.mine} (your own letter) {item.quote} («Quote» button) {item.own} (edit and delete your own unread one) {item.report} (report someone else's) |
Only the person's own letters: the engine selects conversations by the signed-in person, and the text is escaped.
Feedback (the Feedback module)
Theme file: views/feedback/form.tpl.html (the starter is modules/feedback/starters/form.tpl.html). No file — the page stays as before. The form is written by the engine (protection key, a robot trap field, checks): whole with {form}, or in parts.
| Tag | What it is |
|---|---|
{form_open} … {form_close} {submit} | opening and closing of the form (with the protection key and hidden fields) and the button |
{field:name} {field:email} {field:subject} {field:message} | main fields; name, email and text are required — without them the form fails the check |
{field:phone} | phone: appears if «Settings → Feedback → Phone in the form» is on («optional» or «required»); off — the field is not in the form |
{intro} [if:intro] | the owner's own introduction |
{agreement} [if:agreement] | consent to data processing |
[if:user.logged] … [else] … [/if] | whether the person is signed in (name and email are filled in); [else] is for a guest |
{t.title} {t.lead} {t.submit} | page words in the visitor's language |
Robot protection (trap field, pause, frequency) is part of the engine form: it comes with {form_open}, no separate tag is needed.
Suggest a post (the News module)
Theme files: views/news/suggest.tpl.html (the form for a signed-in person) and views/news/suggest-login.tpl.html (for a guest: an explanation and sign-in buttons). No file — the page stays as before.
The form is written by the engine (protection key, robot trap, checks): whole with {form}, or in parts {form_open} … {form_close}:
| Tag | What it is |
|---|---|
{field:title} {field:excerpt} {field:category} {field:tags} {field:body} | main fields; a field missing from the template will not be in the form (title and text are required — without them the form fails) |
{field:f_name} | your own extra field: only one the owner ticked in «Extra fields» with «in the site form» and «filled by the visitor»; one tied to a category shows when it is chosen; pictures, files and video are not given to visitors |
{submit} | the send button |
{t.title} {t.lead} {t.note} {t.send} {t.mine} {t.too_many} | page words in the visitor's language |
{left}, [if:can_send] | how many suggestions are left for the day; whether more can be sent |
{mine_url} | the «My suggestions» address |
[each:categories] | categories to choose from: {item.id} {item.title} |
The guest page: {login_url}, {register_url}, [if:can_register], words {t.guest_title} {t.guest_text} {t.guest_login} {t.guest_register}.