[Previous][Next][Contents][FAQ][Bugs][Home]

Thread Index Customization

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.


Filename

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.


Beginning Markup

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>

NOTE

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:

See Resource Variables for more information on the usage of variables.


End Markup

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.


Listing Layout

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:

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):

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.

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.


[Previous][Next][Contents][FAQ][Bugs][Home]