Template files used in the present version
The template files that the present versions of the engine use are:
"main_html_start"
- this is the main forum HTML header.
"main_html_end"
- this is the main forum HTML footer.
Every visible page in the forum is formed by concatenation of "main_html_start", then one or more from the other templates, described below and then "main_html_end" at the end.
Both templates has no access to the database fields.
"error_html_start"
- the header part of the generated HTML on error pages.
"error_html_end"
- the footer of the generated HTML on error pages (i.e. these for 404, and other HTTP error pages).
Both error header and footer templates has no access to database fields. These templates are very similar to the previous two, but are used for the error page rendering.
"activation_email_subject"
- This is the text of the "subject" field of the activation email, sent to the user during his registration or email change notification.
"activation_email_text"
- The text of the registration (or email change) activation message.
The accessible query fields are the same for the above two templates and are selected from the table WaitingActivation
:
id
- the ID in the table WaitingActivation
nick
- the nickname of the user as registered.
email
- the email address of the user.
secret
- the activation secret token. 32 characters random string.
salt
- 32 characters random string, salt for the password of the user. It is useful because it has some value only on user registration. On email address change, the value is NULL.
host
- the host of the forum, extracted from the table "Params"
Some of these fields can be used for personalizing the email for the particular use. Some simple example for the subject template is:
[case:[salt]|Email change confirmation for http://[host]|Account activation link for http://[host]]
-
"form_login"
- Provides the HTML form for user login.
"form_register"
- Provides the HTML form for new user registration.
"form_setup"
- this form is displayed only when the forum is in setup mode (i.e. empty Users table). It provides dialog for the first admin user registration.
These three forms has no access to the database fields.
-
"del_confirm"
- It provides the confirmation dialog on message deletion.
The accessible fields are: PostID
, ThreadID
, UserName
, UserID
, Content
, cnt_thread
(the total count of the posts in the thread, before deletion), Slug
- mixed fields for the post, thread and the owner of the post.
-
"form_edit"
- the form for editing post.
Has access to the following data fields from the Posts
and Threads
tables:
id
- the ID of the post in the table Posts
caption
- the caption of the thread.
source
- the MiniMag (markdown) formatted text of the post
ticket
- Unique string, serves as a bot protection. Guarantees that the user loads the form from the server and does not try to post using some script. This ticked must be later posted to the forum engine in a hidden input, named "ticket".
-
"userinfo"
- this template displays the user profile information readable for all users, i.e. the content of the page /!userinfo/USERNAME
.
"form_editinfo"
- this template provide the forms for editing user profile information. It will be rendered only for the users that have editing access for the given profile - the owner of the account and the admin users.
The accessible DB fields for both above templates are:
UserID
, UserName
- the ID and UserName of the user which profile is displayed.
AVer
- the version of the user avatar. A number, changed each time the user changes its avatar image.
status
- the user permissions.
user_desc
- The information about the user, formatted in markdown, that to be displayed in the profile.
LastSeen
- The date and time, the user has been last seen in the forum. Formatted as '%d.%m.%Y %H:%M:%S'.
TotalPosts
- The total number of posts in the forum.
The permission flags: CanLogin
, CanPost
, CanStart
, CanEditOwn
, CanEditAll
, IsAdmin
- can have values 0 or 1.
-
"form_new_thread"
- the form for creating new thread. Besides the post text, provides editing of the thread title and the tags, attached to the thread.
"form_new_post"
- the form for answering in already existing thread. It allows editing only of the message, but not of the thread title or thread tags.
"preview"
- provides the preview of the post, when the user presses "Preview" button.
All these 3 templates has access to the following DB fields:
slug
- the short version of the thread caption, used in the URL.
caption
- the thread caption.
source
- the text of the post.
ticket
- the server set ticked for bot protection.
tags
- the tags, attached to this thread.
-
"form_settings"
- the form providing editing of the forum settings. Has access to the following fields from the table "Params" (described above):
host
, smtp_addr
, smtp_port
, smtp_user
, forum_title
, log_events
, page_length
, user_perm0
, user_perm2
, user_perm4
, user_perm5
, user_perm6
, user_perm7
and user_perm31
;
The user_permN
fields are simply the bits from the status
fields.
Also, there are the fields message
and error
which are the error message and error flag from the previous attempt to save the settings.
"form_sqlite_console"
- this is the SQLite console form.
It has access to a single field source
containing the SQL statement(s) that to be executed.
"minimag_suffix"
- this template will be added to the end of every text, formatted by MiniMag (markdown). Can be used for creation of predefined links for the easier access. This way in the forum are defined the smile images.
-
"nav_list"
- The navigation buttons displayed at the top and bottom of the pages, when the thread list is displayed.
"nav_search"
- The navigation buttons when the search result page is displayed.
"nav_thread"
- The navigation buttons when the posts in the thread are displayed.
"post_view"
- this template is rendered for every single post in a thread. Has access to the following DB fields:
ID
, ThreadID
, Slug
- IDs of the post and the thread, the slug of the thread.
PostTime
- Formatted time of the last post edit.
Content
- the text of the post.
UserID
, UserName
, UserPostCount
, AVer
- Information for the user that posted this post.
Unread
- flag, whether the post is unread for the current user
ReadCount
- how many times the post has been rendered until now.
"thread_info"
- This template is rendered for every thread in the thread list. Has access to the following DB fields:
ID
, Slug
, Caption
- the thread attributes.
Pinned
- whether the thread is pinned at the top of all threads in the list.
TimeChanged
- the time thread was latest changed.
PostCount
- the number of the posts in the thread.
Unread
- how many posts from this thread are not read by the current user.
"search_result"
- Rendered for every post found from the forum search engine when the search results are displayed. Has access to the following fields:
UserID
, UserName
, Caption
, Slug
, PostTime
, ReadCount
, Unread
- common information for the post and for the thread.
Content
- this is only short snippet of the original post text, aimed to provide preview to the user. The snippet always contains the keyword that has been searched.