The thread index compliments the main index. If a thread index is created, each message in the archive will contain an extra link to the thread index.
Customizing the thread index is very similiar to customizing the main index.
By default, the filename of the index page is "threads.html
". However, a
different name may be specified with the M2H_TIDXFNAME
environment variable,
the TIDXFNAME
resource element, or the -tidxfname
command-line option.
MHonArc allows you to completely override the begining markup of the thread
index page. I.e. You can control the opening <HTML> tag, the HEAD element
contents, the opening <BODY> tag, etc. Therefore, if you are not satisfied with the
default behavior of how the TTITLE resource is used, or have other needs that
require control on the beginning markup, you can set the TIDXPGBEGIN
resource
file element.
TIDXPGBEGIN
The best way to show how the TIDXPGBEGIN
works, the following represents the
default setting MHonArc uses:
<TIDXPGBEGIN> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE>$TIDXTITLE$</TITLE> </HEAD> <BODY> <H1>$TIDXTITLE$</H1> </TIDXPGBEGIN>
Technically, setting the TTITLE resource, via the M2H_TTITLE
environment variable, the TTITLE
resource file element, or the -ttitle
command-line option, sets the $TIDXTITLE$
resource file variable.
The resource variables allowed in the TIDXPGBEGIN
element are the following:
$DOCURL$
-- URL to documentation
$GMTDATE$
-- Current GMT date.
$IDXFNAME$
-- Filename of main index page.
$IDXSIZE$
-- Max number of messages that may be listed in the index.
$IDXTITLE$
-- The title of the index page.
$LOCALDATE$
-- Current local date.
$NUMOFIDXMSG$
-- Number of message listed.
$NUMOFMSG$
-- Number of messages in the archive.
$OUTDIR$
-- Pathname of archive.
$PROG$
-- Program name.
$TIDXFNAME$
-- Filename of thread index page.
$TIDXTITLE$
-- Title of thread index page.
$VERSION$
-- Program version.
See Resource Variables for more information on the usage of variables.
Along with controlling the beginning markup, you can control the ending markup.
TIDXPGEND
The TIDXPGEND
resource element may be used to define the ending markup of the
index page. The default value is the following:
<TIDXPGEND> </BODY> </HTML> </TIDXPGEND>
The resource variables allowed are the same as for TIDXPGBEGIN
.
By default, MHonArc lists the threads in chronological order. The thread with the oldest initital messsage is listed first, and the thread with the newest initital message is listed last. The TREVERSE resource may be set to have the thread listing from newest thread to oldest thread. If the TSUBSORT resource is set, then threads are sorted by subject.
HTML markup can be added to the thread index page by defining the THEAD
and
TFOOT
resource file elements. Usage of THEAD
and TFOOT
is discussed later in this
section.
MHonArc uses HTML unorder lists for formatting the thread index list. Nested list markup is used to show the threads. Since threads can become very large, the TLEVELS resource can be used to limit the number of nested lists allowed. The default nesting level is 3.
Customization over the thread index list format is more restrictive than the main
index. All thread index entries are contained in the HTML LI
element, which is
contained in an UL
element. The entry text itself can be customized via the TLITXT
resource file element. Usage of TLITXT
is discussed later in this section.
THEAD
The THEAD
resource element specifies text to be inserted before the thread index
listing. The text can be any valid HTML markup. Plus, MHonArc defines the
following variables you may use which get expanded at run-time:
$DOCURL$
-- URL to documentation
$GMTDATE$
-- Current GMT date.
$IDXFNAME$
-- Filename of main index page.
$IDXSIZE$
-- Max number of messages that may be listed in the index.
$IDXTITLE$
-- The title of the index page.
$LOCALDATE$
-- Current local date.
$NUMOFIDXMSG$
-- Number of message listed.
$NUMOFMSG$
-- Number of messages in the archive.
$OUTDIR$
-- Pathname of archive.
$PROG$
-- Program name.
$TIDXFNAME$
-- Filename of thread index page.
$TIDXTITLE$
-- Title of thread index page.
$VERSION$
-- Program version.
MHonArc's THEAD
default value is the following:
<THEAD> <UL> <LI><A HREF="$IDXFNAME$">Main Index</A></LI> </UL> <HR> </THEAD>
TLITXT
The TLITXT
specifies the markup to use for each entry in the thread index. Only
markup that is legal within the HTML LI
element should be used. When you
define the contents for the TLITXT
resource element, you may use the following
variables defined by MHonArc (see Resource Variables on the usage of variables):
$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.
$DDMMYY$
-- Message date in dd/mm/yy format.
$ICON$
-- The context-type sensistive icon. See Icons for information.
$ICONURL$
-- The URL to the context-type sensistive icon. See Icons for
information.
$MMDDYY$
-- Message date in mm/dd/yy format.
$NUMFOLUP$
-- Number of follow-ups for the given message.
$FROM$
-- The complete text in the From:
field of the message.
$FROMADDR$
-- The 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.
$YYMMDD$
-- Message date in yy/mm/dd format.
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.
TLITXT
's default value is the following:
<TLITXT> ($NUMFOLUP$) <STRONG>$SUBJECT:40$</STRONG>, <EM>$FROMNAME$</EM> </TLITXT>
TFOOT
The TFOOT
resource element specifies the text to use after the end the thread index
list. The text can be any valid HTML markup. TFOOT
may contain the same
variables as THEAD
.
TFOOT
's default value is nil.