Table of Contents Previous Next Index

Section 9 Customizing Mail and Web Templates Using the Web Interface

Section 9 Customizing Mail and Web Templates
Using the Web Interface
The majority of Web Interface pages and administrative messages sent to subscribers can be customized. Customizing your list’s Web pages and administrative messages creates an individual look and tone for your list. Subscribers will see Web pages and read administrative messages that are specific to your list, containing pertinent information and instructions rather than just generic pages and messages.
The template editor allows the site administrator and list owner to customize the majority of the Web Interface Pages and Administrative Messages sent out by LISTSERV. There are two types of templates you can customize – Web and Mail.
Web Templates (also referred to as Dynamic Web Templates) control the pages produced by the Web Interface. These pages are produced dynamically when they are accessed. What gets displayed by the browser depends on the circumstances and may change depending on who is accessing the Interface, which list they are accessing, the settings of that list, and so on.
Commands in Web Templates begin with a plus sign "+" and variables begin with an ampersand followed by a plus sign "&+".
Mail Templates control text produced by LISTSERV itself. Although generally categorized as mail templates, they actually fall into three different types:
Mail Templates control the contents of email messages sent by LISTSERV. A mail template is a complete email message. Formatting commands are available, substitutions that make sense in the context of the specific message are available, and while other templates may be imbedded with the .IM command, the message is in and of itself ready for LISTSERV to send.
Message Templates supply text that will ultimately be shown to the user. These messages may be included in a mail template; or they may be included in an email sent by LISTSERV in response to LISTSERV commands sent by email to the LISTSERV command address; or they may be returned to the Web Interface in response to commands sent through the Web Interface. Limited formatting is available.
Message Fragments templates are the lowest level of mail templates. Fragments are pieces of text produced by LISTSERV as parts of other messages or emails. For example, list digests must follow a certain format dictated by the Internet RFCs. Therefore, it is not possible to provide a complete mail template for digests. However, some of the text within the digest is not mandated by the RFCs, and so LISTSERV provides some fragment templates to control these parts, for example MSG_DIGEST_FRAGMENT_DATERANGE1 to control the date range and MSG_DIGEST_FRAGMENT_PREAMBLE1 to control the text preceding the table of contents. Formatting commands are generally not available in fragments.
Notes: Mail-merge fields are now allowed in Mail templates.
When editing mail templates, LISTSERV will tag each mail template with the character set that was in use when the changes were made. Unedited mail templates will have ISO-8859-1 as the default character set.
Commands in Mail Templates begin with a period "." and variables begin with an ampersand "&".
To access the template editor, click on the List Management or Server Administration menu, select Customization, and then select either Web Templates or Mail Templates.
Once the template editor has opened, simply select the list and template you want to work with. The template editor also lets you create new template.
For more information about customization templates, see the Customization Manual for LISTSERV 16.0 or click on the link(s) located in the Tips section at the bottom of the editor.
Many list owners prefer to customize some of the administrative messages sent to subscribers and the main Web page for the list archives. However, it is not necessary to customize any of the templates. Customizing templates can be complex for new users, so it is not covered in depth in this manual. The table below lists some of the templates you will most likely to want to customize.
Table 9-1 Templates to Customize
A template for a message sent to new subscribers, in addition to the standard “signup” message. By default, no welcome message is sent.
A standard message sent to all new subscribers, usually with list
instructions. By default, this template is included in both the SIGNUP1 and ADD1 templates.
A message sent to new subscribers who have been added to the list by the owner. By default, includes the $SIGNUP template.
A message sent to users who are trying to sign off a list they are not signed on to or from an address that was not the one used to subscribe with.
A message sent to a user when their post has been forwarded to a moderator (Send= Editor or subscription is set to REVIEW).
A message containing information about the list. Sent to anyone sending the “REVIEW listname” command to LISTSERV. By default includes the non-hidden parts of the list header.
Adds a text message to the bottom of each message posted to the list. Usually used for disclaimers, tips, and/or signoff or other instructions. If you plan to send HTML messages through the list, you should also define a BOTTOM_BANNER_HTML template containing the HTML version of the BOTTOM_BANNER.
Adds a text message to the top of each message posted to the list.
Usually used for a copyright or short legal warning which absolutely has to be seen by each and every reader. If you plan to send HTML messages through the list, you should also define a TOP_BANNER_HTML template.
This message is sent to users who are automatically deleted from the list when delivery errors (bounces) to that address exceed the threshold set by the Auto-Delete= keyword (or its default setting).
The main web page for the list archives. This template creates the listname.html file. This is a “static” web template. Requires knowledge of HTML to customize (see below).
Things to consider when editing templates:
Deleting a template in the Web Interface template editor or removing it from the listname.mailtpl file (when customizing by email) will not prevent a message from being sent. It merely deletes the customizations and results in the default message being sent. The way to prevent a message from being sent is to customize the template by inserting the directive “.QQ” on a line by itself. Be careful, if you add “.QQ” to a template that is included in other templates, you will be canceling those templates as well.
Variables begin with an ampersand (“&”) and may end with a semicolon. You may remove variables from the text if you do not wish to customize that part of the text. For example, the ADD1 template contains the text “You have been added to the &LISTNAME mailing list (&TITLE) by &MBX(&INVOKER)”. The “&LISTNAME”, “&TITLE”, and “&MBX(&INVOKER)” will be replaced by the list name, title, and the name and email address of the owner that added the subscription. This is easily changed to “You have been added to the &LISTNAME mailing list (&TITLE) by the list owner” if you do not wish to reveal the name and address of the owner.
If an ampersand (“&”) appears in the template text (this includes any URLs with ampersands) it must be doubled (“&&”) in order to keep LISTSERV from treating it like a variable.
Changing the Web templates requires knowledge of HTML. You cannot edit the Web templates using an HTML editor – the templates contain variables and template directives of which HTML editors are ignorant.
9.1 Forcing the Browser to Use a Specific Character Set
The Global Skins (SKIN) template now contains an option to force the browser to use a specific character set for cases where the browser’s auto-detect feature fails to use the correct character set. This variable, DEFAULTCHARSET, can be defined for the site as a whole or for particular lists that are known to use a specific character set. To set, simply change the default setting of 0 to the appropriate charset, such as ISO-8859-5.
To change this variable for all of your lists, click on the Server Administration menu, select Customization, and then select Web Templates. Search for the Global Skins template by entering either Global Skins or SKIN in the Search Template field, and then click [Search]. Edit the template by changing DEFAULTCHARSET to the desired character set.
To change this variable for a specific list, click on the List Management menu, select Customization, and then select Web Templates. Select the list you’d like to work with, and then search for the Global Skins template by entering either Global Skins or SKIN in the Search Template field and click [Search]. Edit the template by changing DEFAULTCHARSET to the desired character set.
9.2 Using the HTML Mail Template Gallery
The HTML Mail Template Gallery allows the list owner or the site administrator to select a template style for the list or the site as a whole.
To select a side-wide default template, click on the Server Administration menu, select Customization, and then select Mail Templates. The Mail Template Editor opens.
To select a default template for a list, click on the List Management menu, select Customization, and then select Mail Templates. The Mail Template Editor opens. Click the Select List drop-down menu, and then select the list to define the default template for. The Mail Template Editor refreshes with the HTML Mail Template Gallery displayed.
In the HTML Mail Template Gallery, select an HTML mail template by clicking the [Select] button associated with the template you want to use. The screen will refresh with the selected template displayed in the Mail Template Style box.
To edit a template, click the Easel icon. The Edit HTML Mail Template screen opens, which is where you can make any changes necessary. If you have made changes to a default template and would like to undo those changes, click the Revert icon associated with that template.
To create a new template based on a default template, simply edit that template and change the template name before clicking the [Save] button. The template will now be saved with the new name.
To create a new template from scratch, click on the Create HTML Mail Template option. The Create HTML Mail Template screen opens, which is where you will enter the content for the new template. See the special documentation on that screen to learn more about the format of the HTML mail templates.
Tips: When creating new templates, make sure that the template name starts with HTMLMAIL- and it will be automatically included in the list of available HTML mail templates within the editor.
If you are creating a newsletter template, you are required to have both an HTMLMAIL- and a TEXTMAIL- template (for the alternative text part). If you do not want the alternative text to be part of your newsletter you can always leave the TEXTMAIL- template blank and delete it on the Fine Tune tab when using the Newsletter Templates wizard.
To delete a template, click on the Recycling Bin icon associated with that template.
To refresh the mail template gallery, click the Refresh Gallery option.
9.3 Using a Conditional Expression Evaluator
The web interface CGI now supports LISTSERV's conditional expression evaluator for templates, made available as +IF. For instance, it is now possible to code the following in a template:
For wildcard string matches:
+IF HELLO =* HE*
*do something here*
+ENDIF
For comparing numbers, etc.:
+IF (5 > 6)
*do something here*
+ENDIF
(+ENDIF is an alias for +EB; you can use either.)
 
 

L-Soft international, Inc.
1-800-399-5449