##---------------------------------------------------------------------------## ## File: ## @(#) mhidxrc.pl 2.6 99/08/08 20:01:19 ## Author: ## Earl Hood mhonarc@pobox.com ## Description: ## MHonArc library defining values for various index resources ##---------------------------------------------------------------------------## ## MHonArc -- Internet mail-to-HTML converter ## Copyright (C) 1996-1999 Earl Hood, mhonarc@pobox.com ## ## 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 ## 02111-1307, USA ##---------------------------------------------------------------------------## package mhonarc; sub mhidxrc_set_vars { ##-----------------## ## Index resources ## ##-----------------## $IdxTypeStr = $NOSORT ? 'Message' : $SUBSORT ? 'Subject' : $AUTHSORT ? 'Author' : 'Date'; ## MAIN index resources ## if ($MAIN) { ## Label for main index unless ($IDXLABEL) { $IDXLABEL = $IdxTypeStr . ' Index'; $IsDefault{'IDXLABEL'} = 1; } ## Beginning of main index page unless ($IDXPGBEG) { $IDXPGBEG =<<'EndOfStr'; $IDXTITLE$

$IDXTITLE$

EndOfStr $IsDefault{'IDXPGBEG'} = 1; } ## End of main index page unless ($IDXPGEND) { $IDXPGEND = "\n\n"; $IsDefault{'IDXPGEND'} = 1; } ## Beginning of main index list unless ($LIBEG) { $LIBEG = ''; $LIBEG .= "\n" if $THREAD; $LIBEG .= '$PGLINK(PREV)$$PGLINK(NEXT)$' . "\n" if $MULTIIDX; $LIBEG .= "
\n\n"; $IsDefault{'LIEND'} = 1; } ## Main index entry (start, content, and end) unless ($LITMPL) { $LITMPL = qq|
  • \$SUBJECT\$\n| . qq|\n
  • \n|; $IsDefault{'LITMPL'} = 1; } ## Main list group resources unless ($AUTHBEG) { $AUTHBEG = ''; $IsDefault{'AUTHBEG'} = 1; } unless ($AUTHEND) { $AUTHEND = ''; $IsDefault{'AUTHEND'} = 1; } unless ($DAYBEG) { $DAYBEG = ''; $IsDefault{'DAYBEG'} = 1; } unless ($DAYEND) { $DAYEND = ''; $IsDefault{'DAYEND'} = 1; } unless ($SUBJECTBEG) { $SUBJECTBEG = ''; $IsDefault{'SUBJECTBEG'} = 1; } unless ($SUBJECTEND) { $SUBJECTEND = ''; $IsDefault{'SUBJECTEND'} = 1; } ## } ## THREAD index resources ## if ($THREAD) { ## Label for thread index unless ($TIDXLABEL) { $TIDXLABEL = 'Thread Index'; $IsDefault{'TIDXLABEL'} = 1; } ## Beginning of thread index page unless ($TIDXPGBEG) { $TIDXPGBEG =<<'EndOfStr'; $TIDXTITLE$

    $TIDXTITLE$

    EndOfStr $IsDefault{'TIDXPGBEG'} = 1; } ## End of thread index page unless ($TIDXPGEND) { $TIDXPGEND = "\n\n"; $IsDefault{'TIDXPGEND'} = 1; } ## Head of thread index page (also contains list start markup) unless ($THEAD) { $THEAD = ''; $THEAD .= "\n" if $MAIN; $THEAD .= '$PGLINK(TPREV)$$PGLINK(TNEXT)$' . "\n" if $MULTIIDX; $THEAD .= "
    \n\n"; $IsDefault{'TFOOT'} = 1; } ## Template for thread entry with no follow-ups unless ($TSINGLETXT) { $TSINGLETXT =<<'EndOfStr';
  • $SUBJECT$, $FROMNAME$
  • EndOfStr $IsDefault{'TSINGLETXT'} = 1; } ## Template for thread entry that is the start of a thread unless ($TTOPBEG) { $TTOPBEG =<<'EndOfStr';
  • $SUBJECT$, $FROMNAME$ EndOfStr $IsDefault{'TTOPBEG'} = 1; } ## Template for end of a thread unless ($TTOPEND) { $TTOPEND = "
  • \n"; $IsDefault{'TTOPEND'} = 1; } ## Template for the start of a sub-thread unless ($TSUBLISTBEG) { $TSUBLISTBEG = "\n"; $IsDefault{'TSUBLISTEND'} = 1; } ## Template for the start and content of a regular thread entry unless ($TLITXT) { $TLITXT =<<'EndOfStr';
  • $SUBJECT$, $FROMNAME$ EndOfStr $IsDefault{'TLITXT'} = 1; } ## Template for end of a regular thread entry unless ($TLIEND) { $TLIEND = "
  • \n"; $IsDefault{'TLIEND'} = 1; } ## Template for the start of subject based section unless ($TSUBJECTBEG) { $TSUBJECTBEG = "
  • <Possible follow-up(s)>
  • \n"; $IsDefault{'TSUBJECTBEG'} = 1; } ## Template for the end of subject based section unless ($TSUBJECTEND) { $TSUBJECTEND = ""; $IsDefault{'TSUBJECTEND'} = 1; } ## Template for start and content of missing message in thread unless ($TLINONE) { $TLINONE = "
  • Message not available"; $IsDefault{'TLINONE'} = 1; } ## Template for end of missing message in thread unless ($TLINONEEND) { $TLINONEEND = "
  • \n"; $IsDefault{'TLINONEEND'} = 1; } ## Template for opening an indent (for cross-page threads) unless ($TINDENTBEG) { $TINDENTBEG = "\n"; $IsDefault{'TINDENTEND'} = 1; } ## Template for start of a continued thread (for cross-page threads) unless ($TCONTBEG) { $TCONTBEG = '
  • $SUBJECTNA$, ' . "(continued)\n"; $IsDefault{'TCONTBEG'} = 1; } ## Template for end of a continued thread (for cross-page threads) unless ($TCONTEND) { $TCONTEND = "
  • \n"; $IsDefault{'TCONTEND'} = 1; } $DoMissingMsgs = $TLINONE =~ /\S/; ## } unless ($TSLICEBEG) { $TSLICEBEG = "
    \n"; $IsDefault{'TSLICEEND'} = 1; } ##-------------------## ## Message resources ## ##-------------------## unless (@DateFields) { @DateFields = ('received', 'date'); $IsDefault{'DATEFIELDS'} = 1; } unless (@FromFields) { @FromFields = ('from', 'reply-to', 'return-path', 'apparently-from', 'sender', 'resent-sender'); $IsDefault{'FROMFIELDS'} = 1; } ## Beginning of message page unless ($MSGPGBEG) { $MSGPGBEG =<<'EndOfStr'; $SUBJECTNA:72$ EndOfStr $MSGPGBEG .= qq|\n| unless $SpamMode; $MSGPGBEG .= "\n\n"; $IsDefault{'MSGPGBEG'} = 1; } ## End of message page unless ($MSGPGEND) { $MSGPGEND = "\n\n"; $IsDefault{'MSGPGEND'} = 1; } ## Subject header unless ($SUBJECTHEADER) { $SUBJECTHEADER = '

    $SUBJECTNA$

    ' . "\n
    \n"; $IsDefault{'SUBJECTHEADER'} = 1; } ## Separator between message data head and message data body unless ($HEADBODYSEP) { $HEADBODYSEP = "
    \n"; $IsDefault{'HEADBODYSEP'} = 1; } ## Separator between end of message data and rest of page unless ($MSGBODYEND) { $MSGBODYEND = "
    \n"; $IsDefault{'MSGBODYEND'} = 1; } ##---------------------------------## ## Mail header formating resources ## ##---------------------------------## $FIELDSBEG = "\n", $IsDefault{'FIELDSEND'} = 1 unless $FIELDSEND; $LABELBEG = "
  • ", $IsDefault{'LABELBEG'} = 1 unless $LABELBEG; $LABELEND = ":", $IsDefault{'LABELEND'} = 1 unless $LABELEND; $FLDBEG = " ", $IsDefault{'FLDBEG'} = 1 unless $FLDBEG; $FLDEND = "
  • ", $IsDefault{'FLDEND'} = 1 unless $FLDEND; ##-----------------------------------## ## Next/prev message link resources ## ##-----------------------------------## ## Next/prev buttons $NEXTBUTTON = '['.$IdxTypeStr.' Next]', $IsDefault{'NEXTBUTTON'} = 1 unless $NEXTBUTTON; $PREVBUTTON = '['.$IdxTypeStr.' Prev]', $IsDefault{'PREVBUTTON'} = 1 unless $PREVBUTTON; $NEXTBUTTONIA = "[$IdxTypeStr Next]", $IsDefault{'NEXTBUTTONIA'} = 1 unless $NEXTBUTTONIA; $PREVBUTTONIA = "[$IdxTypeStr Prev]", $IsDefault{'PREVBUTTONIA'} = 1 unless $PREVBUTTONIA; ## Next message link unless ($NEXTLINK) { $NEXTLINK =<Next by $IdxTypeStr: \$SUBJECT(NEXT)\$ EndOfStr $IsDefault{'NEXTLINK'} = 1; } ## Inactive next message link $NEXTLINKIA = '', $IsDefault{'NEXTLINKIA'} = 1 unless $NEXTLINKIA; ## Previous message link unless ($PREVLINK) { $PREVLINK =<Prev by $IdxTypeStr: \$SUBJECT(PREV)\$ EndOfStr $IsDefault{'PREVLINK'} = 1; } ## Inactive previous message link $PREVLINKIA = '', $IsDefault{'PREVLINKIA'} = 1 unless $PREVLINKIA; ## Thread next/previous buttons $TNEXTBUTTON = '[Thread Next]', $IsDefault{'TNEXTBUTTON'} = 1 unless $TNEXTBUTTON; $TPREVBUTTON = '[Thread Prev]', $IsDefault{'TPREVBUTTON'} = 1 unless $TPREVBUTTON; $TNEXTBUTTONIA = '[Thread Next]', $IsDefault{'TNEXTBUTTONIA'} = 1 unless $TNEXTBUTTONIA; $TPREVBUTTONIA = '[Thread Prev]', $IsDefault{'TPREVBUTTONIA'} = 1 unless $TPREVBUTTONIA; ## Next message in thread link unless ($TNEXTLINK) { $TNEXTLINK =<<'EndOfStr';
  • Next by thread: $SUBJECT(TNEXT)$
  • EndOfStr $IsDefault{'TNEXTLINK'} = 1; } ## Inactive next message in thread link $TNEXTLINKIA = '', $IsDefault{'TNEXTLINKIA'} = 1 unless $TNEXTLINKIA; ## Previous message in thread link unless ($TPREVLINK) { $TPREVLINK =<<'EndOfStr';
  • Prev by thread: $SUBJECT(TPREV)$
  • EndOfStr $IsDefault{'TPREVLINK'} = 1; } ## Inactive previous message in thread link $TPREVLINKIA = '', $IsDefault{'TPREVLINKIA'} = 1 unless $TPREVLINKIA; ## Top links in message if (!$TOPLINKS) { $TOPLINKS = "
    \n"; $TOPLINKS .= '$BUTTON(PREV)$$BUTTON(NEXT)$' if $MAIN; $TOPLINKS .= '$BUTTON(TPREV)$$BUTTON(TNEXT)$' if $THREAD; $TOPLINKS .= '[$IDXLABEL$]' if $MAIN; $TOPLINKS .= '[$TIDXLABEL$]' if $THREAD; $IsDefault{'TOPLINKS'} = 1; } ## Bottom links in message if (!$BOTLINKS) { $BOTLINKS = "\n"; $IsDefault{'BOTLINKS'} = 1; } ## Follow-up and References resources unless ($FOLUPBEGIN) { $FOLUPBEGIN =<<'EndOfVar'; EndOfVar $IsDefault{'FOLUPEND'} = 1; } unless ($REFSBEGIN) { $REFSBEGIN =<<'EndOfVar'; EndOfVar $IsDefault{'REFSEND'} = 1; } ##--------------------------------------------## ## Next/previous main/thread index page links ## ##--------------------------------------------## $NEXTPGLINK = '[Next Page]', $IsDefault{'NEXTPGLINK'} = 1 unless $NEXTPGLINK; $PREVPGLINK = '[Prev Page]', $IsDefault{'PREVPGLINK'} = 1 unless $PREVPGLINK; $TNEXTPGLINK = '[Next Page]', $IsDefault{'TNEXTPGLINK'} = 1 unless $TNEXTPGLINK; $TPREVPGLINK = '[Prev Page]', $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; ##---------------## ## Miscellaneous ## ##---------------## $MSGIDLINK = '$MSGID$', $IsDefault{'MSGIDLINK'} = 1 unless $MSGIDLINK; $NOTE = '$NOTETEXT$', $IsDefault{'NOTE'} = 1 unless $NOTE; $NOTEIA = '', $IsDefault{'NOTEIA'} = 1 unless $NOTEIA; $NOTEICON = '', $IsDefault{'NOTEICON'} = 1 unless $NOTEICON; $NOTEICONIA = '', $IsDefault{'NOTEICONIA'} = 1 unless $NOTEICONIA; ## Set unknown icon $Icons{'unknown'} = $Icons{'text/plain'} unless $Icons{'unknown'}; ## if ($AddressModify eq "") { $AddressModify = q{s|([\!\%\w\.\-+=/]+@)([\w\.\-]+)|$1.('x' x length($2))|ge} if $SpamMode; $IsDefault{'AddressModify'} = 1; } if ($MAILTOURL eq "") { if ($SpamMode) { $MAILTOURL = 'mailto:$TOADDRNAME$@DOMAIN.HIDDEN'; } else { $MAILTOURL = 'mailto:$TO$'; } $IsDefault{'MAILTOURL'} = 1; } } ##---------------------------------------------------------------------------## 1;