##---------------------------------------------------------------------------##
## $Id: mhidxrc.pl,v 2.12 2002/09/04 04:09:30 ehood Exp $
## Earl Hood mhonarc@mhonarc.org
## MHonArc library defining values for various index resources
##---------------------------------------------------------------------------##
## MHonArc -- Internet mail-to-HTML converter
## Copyright (C) 1996-1999 Earl Hood, mhonarc@mhonarc.org
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
##---------------------------------------------------------------------------##
$IdxTypeStr = $NOSORT ?
'Message' :
$IDXLABEL = $IdxTypeStr . ' Index';
$IsDefault{'IDXLABEL'} = 1;
## Beginning of main index page
<!doctype html public "-//W3C//DTD HTML//EN">
<title>$IDXTITLE$</title>
$IsDefault{'IDXPGBEG'} = 1;
## End of main index page
$IDXPGEND = "</body>\n</html>\n";
$IsDefault{'IDXPGEND'} = 1;
## Beginning of main index list
'<li><a href="$TIDXFNAME$">$TIDXLABEL$</a></li>' .
$LIBEG .= '$PGLINK(PREV)$$PGLINK(NEXT)$' . "\n" if $MULTIIDX;
$LIBEG .= "<hr>\n<ul>\n";
## End of main index list
## Main index entry (start, content, and end)
$LITMPL = qq|<li
><strong
>\
$SUBJECT\
$</strong
>\n| .
qq|<ul
><li
><em
>From
</em
>: |;
$LITMPL .= q
|$FROMNAME$|;
$LITMPL .= qq|</li></ul>\n</li
>\n|;
$IsDefault{'LITMPL'} = 1;
## Main list group resources
$AUTHBEG = ''; $IsDefault{'AUTHBEG'} = 1;
$AUTHEND = ''; $IsDefault{'AUTHEND'} = 1;
$DAYBEG = ''; $IsDefault{'DAYBEG'} = 1;
$DAYEND = ''; $IsDefault{'DAYEND'} = 1;
$SUBJECTBEG = ''; $IsDefault{'SUBJECTBEG'} = 1;
$SUBJECTEND = ''; $IsDefault{'SUBJECTEND'} = 1;
## THREAD index resources
## Label for thread index
$TIDXLABEL = 'Thread Index';
$IsDefault{'TIDXLABEL'} = 1;
## Beginning of thread index page
$TIDXPGBEG =<<'EndOfStr';
<!doctype html public "-//W3C//DTD HTML//EN">
<title>$TIDXTITLE$</title>
$IsDefault{'TIDXPGBEG'} = 1;
## End of thread index page
$TIDXPGEND = "</body>\n</html>\n";
$IsDefault{'TIDXPGEND'} = 1;
## Head of thread index page (also contains list start markup)
'<li><a href="$IDXFNAME$">$IDXLABEL$</a></li>' .
$THEAD .= '$PGLINK(TPREV)$$PGLINK(TNEXT)$' . "\n" if $MULTIIDX;
$THEAD .= "<hr>\n<ul>\n";
## Foot of thread index page (also contains list end markup)
## Template for thread entry with no follow-ups
$TSINGLETXT =<<'EndOfStr';
<li><strong>$SUBJECT$</strong>,
$IsDefault{'TSINGLETXT'} = 1;
## Template for thread entry that is the start of a thread
<li><strong>$SUBJECT$</strong>,
$IsDefault{'TTOPBEG'} = 1;
## Template for end of a thread
$IsDefault{'TTOPEND'} = 1;
## Template for the start of a sub-thread
$IsDefault{'TSUBLISTBEG'} = 1;
## Template for the end of a sub-thread
$TSUBLISTEND = "</ul>\n";
$IsDefault{'TSUBLISTEND'} = 1;
## Template for the start and content of a regular thread entry
<li><strong>$SUBJECT$</strong>,
$IsDefault{'TLITXT'} = 1;
## Template for end of a regular thread entry
$IsDefault{'TLIEND'} = 1;
## Template for the start of subject based section
$TSUBJECTBEG = "<li><Possible follow-ups></li>\n";
$IsDefault{'TSUBJECTBEG'} = 1;
## Template for the end of subject based section
$IsDefault{'TSUBJECTEND'} = 1;
## Template for start and content of missing message in thread
$TLINONE = "<li><em>Message not available</em>";
$IsDefault{'TLINONE'} = 1;
## Template for end of missing message in thread
$IsDefault{'TLINONEEND'} = 1;
## Template for opening an indent (for cross-page threads)
$IsDefault{'TINDENTBEG'} = 1;
## Template for closing an indent (for cross-page threads)
$IsDefault{'TINDENTEND'} = 1;
## Template for start of a continued thread (for cross-page threads)
$TCONTBEG = '<li><strong>$SUBJECTNA$</strong>, ' .
"<em>(continued)</em>\n";
$IsDefault{'TCONTBEG'} = 1;
## Template for end of a continued thread (for cross-page threads)
$IsDefault{'TCONTEND'} = 1;
$DoMissingMsgs = $TLINONE =~ /\S/;
## Thread Slice Resources
$TSLICEBEG = "<blockquote><ul>\n";
$IsDefault{'TSLICEBEG'} = 1;
$TSLICEEND = "</ul></blockquote>\n";
$IsDefault{'TSLICEEND'} = 1;
$TSLICELEVELS = $TLEVELS;
$IsDefault{'TSLICELEVELS'} = 1;
unless ($TSLICESINGLETXT) {
$TSLICESINGLETXT = $TSINGLETXT;
$IsDefault{'TSLICESINGLETXT'} = 1;
$TSLICETOPBEG = $TTOPBEG;
$IsDefault{'TSLICETOPBEG'} = 1;
$TSLICETOPEND = $TTOPEND;
$IsDefault{'TSLICETOPEND'} = 1;
unless ($TSLICESUBLISTBEG) {
$TSLICESUBLISTBEG = $TSUBLISTBEG;
$IsDefault{'TSLICESUBLISTBEG'} = 1;
unless ($TSLICESUBLISTEND) {
$TSLICESUBLISTEND = $TSUBLISTEND;
$IsDefault{'TSLICESUBLISTEND'} = 1;
$IsDefault{'TSLICELITXT'} = 1;
$IsDefault{'TSLICELIEND'} = 1;
$TSLICELINONE = $TLINONE;
$IsDefault{'TSLICELINONE'} = 1;
unless ($TSLICELINONEEND) {
$TSLICELINONEEND = $TLINONEEND;
$IsDefault{'TSLICELINONEEND'} = 1;
unless ($TSLICESUBJECTBEG) {
$TSLICESUBJECTBEG = $TSUBJECTBEG;
$IsDefault{'TSLICESUBJECTBEG'} = 1;
unless ($TSLICESUBJECTEND) {
$TSLICESUBJECTEND = $TSUBJECTEND;
$IsDefault{'TSLICESUBJECTEND'} = 1;
unless ($TSLICEINDENTBEG) {
$TSLICEINDENTBEG = $TINDENTBEG;
$IsDefault{'TSLICEINDENTBEG'} = 1;
unless ($TSLICEINDENTEND) {
$TSLICEINDENTEND = $TINDENTEND;
$IsDefault{'TSLICEINDENTEND'} = 1;
unless ($TSLICECONTBEG) {
$TSLICECONTBEG = $TCONTBEG;
$IsDefault{'TSLICECONTBEG'} = 1;
unless ($TSLICECONTEND) {
$TSLICECONTEND = $TCONTEND;
$IsDefault{'TSLICECONTEND'} = 1;
unless ($TSLICESINGLETXTCUR) {
$TSLICESINGLETXTCUR = $TSLICESINGLETXT;
$IsDefault{'TSLICESINGLETXTCUR'} = 1;
unless ($TSLICETOPBEGCUR) {
$TSLICETOPBEGCUR = $TSLICETOPBEG;
$IsDefault{'TSLICETOPBEGCUR'} = 1;
unless ($TSLICETOPENDCUR) {
$TSLICETOPENDCUR = $TSLICETOPEND;
$IsDefault{'TSLICETOPENDCUR'} = 1;
unless ($TSLICELITXTCUR) {
$TSLICELITXTCUR = $TSLICELITXT;
$IsDefault{'TSLICELITXTCUR'} = 1;
unless ($TSLICELIENDCUR) {
$TSLICELIENDCUR = $TSLICELIEND;
$IsDefault{'TSLICELIENDCUR'} = 1;
@DateFields = ('received', 'date');
@_DateFields = ( ['received',0], ['date',0] );
$IsDefault{'DATEFIELDS'} = 1;
if ($f =~ s/\[(\d+)\]//) {
push(@_DateFields, [ $f, $1 ]);
push(@_DateFields, [ $f, 0 ]);
@FromFields = ('from', 'mail-reply-to', 'reply-to', 'return-path',
'apparently-from', 'sender', 'resent-sender');
$IsDefault{'FROMFIELDS'} = 1;
## Beginning of message page
<!doctype html public "-//W3C//DTD HTML//EN">
<title>$SUBJECTNA$</title>
$MSGPGBEG .= qq|<link rev
="made" href
="mailto:\$FROMADDR\$">\n|
$MSGPGBEG .= "</head>\n<body>\n";
$IsDefault{'MSGPGBEG'} = 1;
$MSGPGEND = "</body>\n</html>\n";
$IsDefault{'MSGPGEND'} = 1;
unless ($SUBJECTHEADER) {
$SUBJECTHEADER = '<h1>$SUBJECTNA$</h1>' . "\n<hr>\n";
$IsDefault{'SUBJECTHEADER'} = 1;
## Separator between message data head and message data body
$IsDefault{'HEADBODYSEP'} = 1;
## Separator between end of message data and rest of page
$IsDefault{'MSGBODYEND'} = 1;
##---------------------------------##
## Mail header formating resources ##
##---------------------------------##
$FIELDSBEG = "<ul>\n", $IsDefault{'FIELDSBEG'} = 1 unless $FIELDSBEG;
$FIELDSEND = "</ul>\n", $IsDefault{'FIELDSEND'} = 1 unless $FIELDSEND;
$LABELBEG = "<li>", $IsDefault{'LABELBEG'} = 1 unless $LABELBEG;
$LABELEND = ":", $IsDefault{'LABELEND'} = 1 unless $LABELEND;
$FLDBEG = " ", $IsDefault{'FLDBEG'} = 1 unless $FLDBEG;
$FLDEND = "</li>", $IsDefault{'FLDEND'} = 1 unless $FLDEND;
##-----------------------------------##
## Next/prev message link resources ##
##-----------------------------------##
$NEXTBUTTON = '[<a href="$MSG(NEXT)$">'.$IdxTypeStr.' Next</a>]',
$IsDefault{'NEXTBUTTON'} = 1 unless $NEXTBUTTON;
$PREVBUTTON = '[<a href="$MSG(PREV)$">'.$IdxTypeStr.' Prev</a>]',
$IsDefault{'PREVBUTTON'} = 1 unless $PREVBUTTON;
$NEXTBUTTONIA = "[$IdxTypeStr Next]",
$IsDefault{'NEXTBUTTONIA'} = 1 unless $NEXTBUTTONIA;
$PREVBUTTONIA = "[$IdxTypeStr Prev]",
$IsDefault{'PREVBUTTONIA'} = 1 unless $PREVBUTTONIA;
<strong><a href="\$MSG(NEXT)\$">\$SUBJECT(NEXT)\$</a></strong>
$IsDefault{'NEXTLINK'} = 1;
## Inactive next message link
$NEXTLINKIA = '', $IsDefault{'NEXTLINKIA'} = 1 unless $NEXTLINKIA;
<strong><a href="\$MSG(PREV)\$">\$SUBJECT(PREV)\$</a></strong>
$IsDefault{'PREVLINK'} = 1;
## Inactive previous message link
$PREVLINKIA = '', $IsDefault{'PREVLINKIA'} = 1 unless $PREVLINKIA;
## Thread next/previous buttons
$TNEXTBUTTON = '[<a href="$MSG(TNEXT)$">Thread Next</a>]',
$IsDefault{'TNEXTBUTTON'} = 1 unless $TNEXTBUTTON;
$TPREVBUTTON = '[<a href="$MSG(TPREV)$">Thread Prev</a>]',
$IsDefault{'TPREVBUTTON'} = 1 unless $TPREVBUTTON;
$TNEXTBUTTONIA = '[Thread Next]',
$IsDefault{'TNEXTBUTTONIA'} = 1 unless $TNEXTBUTTONIA;
$TPREVBUTTONIA = '[Thread Prev]',
$IsDefault{'TPREVBUTTONIA'} = 1 unless $TPREVBUTTONIA;
$TNEXTINBUTTON = '[<a href="$MSG(TNEXTIN)$">Next in Thread</a>]',
$IsDefault{'TNEXTINBUTTON'} = 1 unless $TNEXTINBUTTON;
$TNEXTINBUTTONIA = '[Next in Thread]',
$IsDefault{'TNEXTINBUTTONIA'} = 1 unless $TNEXTINBUTTONIA;
$TPREVINBUTTON = '[<a href="$MSG(TPREVIN)$">Prev in Thread</a>]',
$IsDefault{'TPREVINBUTTON'} = 1 unless $TPREVINBUTTON;
$TPREVINBUTTONIA = '[Prev in Thread]',
$IsDefault{'TPREVINBUTTONIA'} = 1 unless $TPREVINBUTTONIA;
$TNEXTTOPBUTTON = '[<a href="$MSG(TNEXTTOP)$">Next Thread</a>]',
$IsDefault{'TNEXTTOPBUTTON'} = 1 unless $TNEXTTOPBUTTON;
$TNEXTTOPBUTTONIA = '[Next Thread]',
$IsDefault{'TNEXTTOPBUTTONIA'} = 1 unless $TNEXTTOPBUTTONIA;
$TPREVTOPBUTTON = '[<a href="$MSG(TPREVTOP)$">Prev Thread</a>]',
$IsDefault{'TPREVTOPBUTTON'} = 1 unless $TPREVTOPBUTTON;
$TPREVTOPBUTTONIA = '[Prev Thread]',
$IsDefault{'TPREVTOPBUTTONIA'} = 1 unless $TPREVTOPBUTTONIA;
## Next message by thread link
$TNEXTLINK =<<'EndOfStr';
<strong><a href="$MSG(TNEXT)$">$SUBJECT(TNEXT)$</a></strong>
$IsDefault{'TNEXTLINK'} = 1;
## Inactive next message in thread link
$TNEXTLINKIA = '', $IsDefault{'TNEXTLINKIA'} = 1 unless $TNEXTLINKIA;
## Previous message by thread link
$TPREVLINK =<<'EndOfStr';
<strong><a href="$MSG(TPREV)$">$SUBJECT(TPREV)$</a></strong>
$IsDefault{'TPREVLINK'} = 1;
## Inactive previous message in thread link
$TPREVLINKIA = '', $IsDefault{'TPREVLINKIA'} = 1 unless $TPREVLINKIA;
## Next message within thread link
$TNEXTINLINK =<<'EndOfStr';
<strong><a href="$MSG(TNEXTIN)$">$SUBJECT(TNEXTIN)$</a></strong>
$IsDefault{'TNEXTINLINK'} = 1;
## Inactive next message within thread link
$TNEXTINLINKIA = '', $IsDefault{'TNEXTINLINKIA'} = 1 unless $TNEXTINLINKIA;
## Previous message within thread link
$TPREVINLINK =<<'EndOfStr';
<strong><a href="$MSG(TPREVIN)$">$SUBJECT(TPREVIN)$</a></strong>
$IsDefault{'TPREVINLINK'} = 1;
## Inactive previous message within thread link
$TPREVINLINKIA = '', $IsDefault{'TPREVINLINKIA'} = 1 unless $TPREVINLINKIA;
$TNEXTTOPLINK =<<'EndOfStr';
<strong><a href="$MSG(TNEXTTOP)$">$SUBJECT(TNEXTTOP)$</a></strong>
$IsDefault{'TNEXTTOPLINK'} = 1;
$TNEXTTOPLINKIA = '', $IsDefault{'TNEXTTOPLINKIA'} = 1 unless $TNEXTTOPLINKIA;
$TPREVTOPLINK =<<'EndOfStr';
<strong><a href="$MSG(TPREVTOP)$">$SUBJECT(TPREVTOP)$</a></strong>
$IsDefault{'TPREVTOPLINK'} = 1;
$TPREVTOPLINKIA = '', $IsDefault{'TPREVTOPLINKIA'} = 1 unless $TPREVTOPLINKIA;
$TOPLINKS .= '$BUTTON(PREV)$$BUTTON(NEXT)$'
$TOPLINKS .= '$BUTTON(TPREV)$$BUTTON(TNEXT)$'
$TOPLINKS .= '[<a href="$IDXFNAME$#$MSGNUM$">$IDXLABEL$</a>]'
$TOPLINKS .= '[<a href="$TIDXFNAME$#$MSGNUM$">$TIDXLABEL$</a>]'
$IsDefault{'TOPLINKS'} = 1;
## Bottom links in message
$BOTLINKS .= '$LINK(PREV)$$LINK(NEXT)$' if $MAIN;
$BOTLINKS .= '$LINK(TPREV)$$LINK(TNEXT)$' if $THREAD;
$BOTLINKS .= "<li>Index(es):\n<ul>\n";
$BOTLINKS .= '<li><a href="$IDXFNAME$#$MSGNUM$">' .
"<strong>$IdxTypeStr</strong></a></li>\n" if $MAIN;
$BOTLINKS .= '<li><a href="$TIDXFNAME$#$MSGNUM$">' .
"<strong>Thread</strong></a></li>\n" if $THREAD;
$BOTLINKS .= "</ul>\n</li>\n</ul>\n";
$IsDefault{'BOTLINKS'} = 1;
## Follow-up and References resources
$FOLUPBEGIN =<<'EndOfVar';
<ul><li><strong>Follow-Ups</strong>:
$IsDefault{'FOLUPBEGIN'} = 1;
$FOLUPLITXT =<<'EndOfVar';
<li><strong>$SUBJECT$</strong>
<ul><li><em>From:</em> $FROMNAME$</li></ul></li>
$FOLUPLITXT =<<'EndOfVar';
<li><strong>$SUBJECT$</strong>
<ul><li><em>From:</em> $FROM$</li></ul></li>
$IsDefault{'FOLUPLITXT'} = 1;
$IsDefault{'FOLUPEND'} = 1;
$REFSBEGIN =<<'EndOfVar';
<ul><li><strong>References</strong>:
$IsDefault{'REFSBEGIN'} = 1;
$REFSLITXT =<<'EndOfVar';
<li><strong>$SUBJECT$</strong>
<ul><li><em>From:</em> $FROMNAME$</li></ul></li>
$REFSLITXT =<<'EndOfVar';
<li><strong>$SUBJECT$</strong>
<ul><li><em>From:</em> $FROM$</li></ul></li>
$IsDefault{'REFSLITXT'} = 1;
$IsDefault{'REFSEND'} = 1;
##--------------------------------------------##
## Next/previous main/thread index page links ##
##--------------------------------------------##
$FIRSTPGLINK = '[<a href="$PG(FIRST)$">First Page</a>]',
$IsDefault{'FIRSTPGLINK'} = 1 unless $FIRSTPGLINK;
$LASTPGLINK = '[<a href="$PG(LAST)$">Last Page</a>]',
$IsDefault{'LASTPGLINK'} = 1 unless $LASTPGLINK;
$NEXTPGLINK = '[<a href="$PG(NEXT)$">Next Page</a>]',
$IsDefault{'NEXTPGLINK'} = 1 unless $NEXTPGLINK;
$PREVPGLINK = '[<a href="$PG(PREV)$">Prev Page</a>]',
$IsDefault{'PREVPGLINK'} = 1 unless $PREVPGLINK;
$TFIRSTPGLINK = '[<a href="$PG(TFIRST)$">First Page</a>]',
$IsDefault{'TFIRSTPGLINK'} = 1 unless $TFIRSTPGLINK;
$TLASTPGLINK = '[<a href="$PG(TLAST)$">Last Page</a>]',
$IsDefault{'TLASTPGLINK'} = 1 unless $TLASTPGLINK;
$TNEXTPGLINK = '[<a href="$PG(TNEXT)$">Next Page</a>]',
$IsDefault{'TNEXTPGLINK'} = 1 unless $TNEXTPGLINK;
$TPREVPGLINK = '[<a href="$PG(TPREV)$">Prev Page</a>]',
$IsDefault{'TPREVPGLINK'} = 1 unless $TPREVPGLINK;
$NEXTPGLINKIA = '[Next Page]',
$IsDefault{'NEXTPGLINKIA'} = 1 unless $NEXTPGLINKIA;
$PREVPGLINKIA = '[Prev Page]',
$IsDefault{'PREVPGLINKIA'} = 1 unless $PREVPGLINKIA;
$TNEXTPGLINKIA = '[Next Page]',
$IsDefault{'TNEXTPGLINKIA'} = 1 unless $TNEXTPGLINKIA;
$TPREVPGLINKIA = '[Prev Page]',
$IsDefault{'TPREVPGLINKIA'} = 1 unless $TPREVPGLINKIA;
$MSGIDLINK = '<a $A_HREF$>$MSGID$</a>',
$IsDefault{'MSGIDLINK'} = 1 unless $MSGIDLINK;
$IsDefault{'NOTE'} = 1 unless $NOTE;
$IsDefault{'NOTEIA'} = 1 unless $NOTEIA;
$IsDefault{'NOTEICON'} = 1 unless $NOTEICON;
$IsDefault{'NOTEICONIA'} = 1 unless $NOTEICONIA;
$Icons{'unknown'} = $Icons{'text/plain'} unless $Icons{'unknown'};
if ($AddressModify eq "") {
q{s|([\!\%\w\.\-+=/]+@)([\w\.\-]+)|$1.('x' x length($2))|ge}
$IsDefault{'AddressModify'} = 1;
$MAILTOURL = 'mailto:$TOADDRNAME$@DOMAIN.HIDDEN';
$MAILTOURL = 'mailto:$TO$';
$IsDefault{'MAILTOURL'} = 1;
##---------------------------------------------------------------------------##