Working in the templates
Template sets
Eternizer can handle several template sets by a parameter "tpl=NAME" in the URL. The naming of the Templates is Eternizer_user_NAME_TEMPLATE. The template set without the name information (Eternizer_user_TEMPLATE) is the default.
Each template set contains three templates.
Exclude formula from main page
In the default design, the formula is at top of the page. But there is also an easy way to bring it to an extra page. Therefor just link to the user function "new"
<a href="<!--[pnmodurl modname=Eternizer func=new]-->"><!--[pnml name=_NEW]--></a>
Main template
- startnum (int)
- Page's start number (first entry)
- count (int)
- Sum of all entries
- config (array)
- Eternizer's configuration, see Config array
- entries (array)
- Array with the html code of all entries, generated by the Entry template
- form (string)
- HTML of the "new" formula generated by the Formula template
Entry template
Each entry is generated with the Eternizer_user_entry.tpl template. Within that the following data is available
- startnum (int)
- Page's start number (first entry)
- count (int)
- Sum of all entries
- config (array)
- Eternizer's configuration, see Config array
- id (int)
- The entry's ID
- ip (string)
- IP of the poster
- text (string)
- The text of the entry
- comment (string)
- The comment of the entry
- obj_status (char)
- The status of the entry. "A" for active, "M" for moderated
- cr_date (timestamp)
- Creation date as timestamp YYYY-DD-MM HH:mm:SS
- cr_uid (int)
- Creator's UID
- lu_date (timestamp)
- Last update date as timestamp YYYY-DD-MM HH:mm:SS
- lu_uid (int)
- Last updater's UID
- profile (array)
- Profile data, key is the ID of the field.
- right_moderate (bool)
- Whether the actual user has moderate rights or not
- right_edit (bool)
- Whether the actual user has edit rights or not
- right_delete (bool)
- Whether the actual user has delete rights or not
Formula template
In the Eternizer_user_form.tpl template are following variables available.
- profile (array)
-
The Profile array with two additional variables:
- readonly (bool) for registered users whether the field is read only or read/write
- value (string) the value of the field
- logedin (bool)
- Whether the user is logged in or not
- profileReadonly (bool)
- True if the user is logged in and "enforce usage of profile data" is set.
- bbcode (bool)
- Whether the bbcode hook is available for use or not
- bbsmile (bool)
- Whether the bbsmile hook is available for use or not
Config array
This array contains the full configuration of Eternizer.
- moderate (int)
- Moderate. 0: None, 1: Guests only, 2: All
- order (string)
- Sort order. "desc": descending, "asc": ascending
- perpage (int)
- Items per page
- profile (array)
- Profile settings, see Profile array
- spammode (int)
- Spam check. 0: No, 1: Guests only, Moderate, 2: Guests only, Reject, 3: All users, Moderate, 4: All users, Reject
- titlefield (int)
- Title profile field's ID
- useuserprofile (bool)
- Enforce usage of Profile's user data
- wwaction (string)
- Long word processing action. "wrap"/"truncate"
- wwlimit (int)
- Long word processing, maximal length
- wwshortto (int)
- Long word processing, length after processing
Profile array
The profile array is an array of all profile fields. Each field is an array with the following data. The key is the ID of the field.
- pos (int)
- Position of the field. Lowest number first.
- title (string)
- Field's title
- type (string)
- Field's type (name, mail, url, text)
- mandatory (int)
- Mandatory setting. 0: Optional, 1: Guests only, 2: All users
- profile (int)
- Name (Language define) of the pendant in the Profile module
