Index Page Customization

MHonArc creates an index page with links to all mail messages filtered (unless processing a single message with the -single option). MHonArc allows you to have complete customization over the appearance of the index page.

       

Filename

By default, the filename of the index page is "maillist.html". However, a different name may be specified with the M2H_IDXFNAME environment variable, the IDXFNAME resource element, or the -idxfname command-line option.

       

Title

The title of the index page is controlled by the M2H_TITLE environment variable, the IDXFNAME resource element, or the -title command-line option. The text for the title is placed in the HTML TITLE element of the index page, and the text also occurs at the very top of the body in a H1 element.

       

Include Files

MHonArc allows you to include the contents of files into the index page via the header and footer resources.

The header file is specified via the M2H_HEADER environment variable, the HEADER resource element, or the -header command-line option. The contents of the header file are inserted above the message listing, and right after the H1 title element. NOTE: filename should not contain the <HTML>, <HEAD>, and <BODY> tags; these tags are automatically provided by MHonArc.

The footer file is specified via the M2H_FOOTER environment variable, the FOOTER resource element, or the -footer command-line option. The contents of the footer file are inserted after the message listing. NOTE: filename should not contain the </BODY>, and </HTML> tags; these tags are automatically provided by MHonArc.

The header and footer files allow you to incorporate search-forms, hyperlinks to other pages, or any other HTML markup you like.

It is only necessary to specify the header and/or footer files the first time you create an archive. The contents included from the header and/or footer files are preserved in any subsequent additions to the archive. Only respecify the header and/or footer files if you need to make changes to the header/footer contents.

       

Listing Layout

MHonArc lists messages in the order specified by the various sort options. However, you have complete control on how the message listing are formatted via the LISTBEGIN, LITEMPLATE, and LISTEND resource elements in the Resource File. These elements allow you to specify the HTML markup to use in the index page. When you define the contents for the LISTBEGIN, LITEMPLATE, and LISTEND resource elements, you may use special variables defined by MHonArc which are expanded to strings during run-time.

Variable Syntax

The syntax of the variables to use in the LISTBEGIN, LITEMPLATE, and LISTEND resource elements is as follows:

$VARIABLE[:N]$

The items in []'s are optional. Definition of each part:

$
The $ character represents the beginning, and ending, of the variable.
VARIABLE
This is the the actual name of the variable. All variable names must be uppercase.
:N
This defines a maximum length of the replacement string for the variable. The length specifier is optional.
No whitespace is allowed between the opening $ and closing $.

Here are some examples of legal variable usage:

       

LISTBEGIN

The LISTBEGIN resource element specifies the text to begin the message list. The text can be any valid HTML markup. Plus, MHonArc defines the following variables you may use which get expanded at run-time:

$GMTDATE$
Expands to the current UTC/GMT date and time.
$LOCALDATE$
Expands to the current local date and time.
$NUMOFMSG$
The number of messages in the archive.
MHonArc's LISTBEGIN default value is the following:

<LISTBEGIN>
<UL>
</LISTBEGIN>

       

LITEMPLATE

The LITEMPLATE resoure element defines the HTML text to represent each message list item. You may use the following variables which are expanded at runtime:

$A_ATTR$
The NAME and HREF attributes to use in an anchor to link to the archived message. The NAME attribute links the messages to the index page.
$A_HREF$
The HREF attribute to use in an anchor to link to the archived message.
$A_NAME$
The NAME attributes to use in an anchor for messages to link to the index page.
$DATE$
The date of the message.
$ICON$
The context-type sensistive icon. See Icons for information.
$ICONURL$
The URL to the context-type sensistive icon. See Icons for information.
$NUMFOLUP$
Number of follow-up messages for the given message.
$FROM$
The complete text in the From field of the message.
$FROMADDR$
Just the actual e-mail address in the From field of the message.
$FROMNAME$
The English name of the person in the From field of the message. If no English name is found, the username specified in the e-mail address is used.
$MSGNUM$
The message numbers assigned to the message by MHonArc.
$ORDNUM$
The current listing number of the message.
$SUBJECT$
The subject text of the message wrapped in an anchor element that hyperlinks to the message.
$SUBJECTNA$
The subject text of the message without the anchor element.
       
NOTE:
Do not specify $A_ATTR$, $A_NAME, and $SUBJECT$ together in the LITEMPLATE element. Since all of these variables contain the NAME atrribute, invalid HTML will be created since multiple anchors will have the same NAME identifier.
LITEMPLATE's default value is the following:

<LITEMPLATE>
<LI><STRONG>$SUBJECT$</STRONG>
<UL><LI><EM>From</EM>: $FROM$</LI></UL>
</LI>
</LITEMPLATE>

       

LISTEND

The LISTEND resource element specifies the text to use to end the message list. The text can be any valid HTML markup. Plus, MHonArc defines the following variables you may use which are expanded at run-time:

$CURDATE$
Expands to the current date and time.
$NUMOFMSG$
The number of messages in the archive.
LISTEND's default value is the following:

<LISTEND>
</UL>
</LISTEND>

       

Examples

Example 1

It may be easier to see how the LISTBEGIN, LITEMPLATE, LISTEND resource elements work when declared together:

<!-- This represents the default values used by MHonArc -->
<LISTBEGIN> 
<UL> 
</LISTBEGIN> 

<LITEMPLATE> 
<LI><STRONG>$SUBJECT$</STRONG> 
<UL><LI><EM>From</EM>: $FROM$</LI></UL> 
</LI> 
</LITEMPLATE> 

<LISTEND> 
</UL> 
</LISTEND> 

Example 2

Here's another example that changes the layout into a more compact listing, adds Icons usage, and adds a time stamp information on when the index page was last updated:

<listbegin>
<address>
Last update: $CURDATE$<br>
$NUMOFMSG$ messages<br>
</address>
<p>
Messages listed in chronological order.  Listing format is the following:
<blockquote>
<img src="http://foo.org/gifs/gletter.gif" alt="* ">
<strong>Subject</strong><code>  </code>
(# of follow-ups)<code>  </code>
<em>From</em>.
</blockquote>
<p>
<hr>
</listbegin>

<litemplate>
<img src="$ICONURL$" alt="* "><strong>$SUBJECT:40$</strong>
($NUMFOLUP$) <em>$FROMNAME$</em><br>
</litemplate>

<listend>
</listend>

       

[Prev:MIME]
[Next:Icons]
[ToC]


MHonArc 1.0.0 -- Index Page Customization