mhonarc-commits
[Top] [All Lists]

mhonarc/MHonArc CHANGES doc/app-rcidx.html doc/...

2003-10-01 20:32:57
CVSROOT:	/cvsroot/mhonarc
Module name:	mhonarc
Branch: 	
Changes by:	Earl Hood <earl(_at_)earlhood(_dot_)com>	03/10/01 23:30:58

Modified files:
	MHonArc        : CHANGES 
	MHonArc/doc    : app-rcidx.html rcvars.html resources.html 
	MHonArc/doc/_helper: addvartbls.pl rcvars.lst resource.lst 
	MHonArc/doc/resources: mailtourl.html news.html nextbutton.html 
	MHonArc/examples: mhonarc.vim 
	MHonArc/lib    : mhdb.pl mhidxrc.pl mhinit.pl mhopt.pl 
	                 mhrcfile.pl mhusage.pl mhutil.pl 
Added files:
	MHonArc/doc/resources: newsurl.html 

Log message:
	Added NEWSURL: Allows customization of how newsgroups are linked to.

Patches:
Index: mhonarc/MHonArc/CHANGES
diff -u mhonarc/MHonArc/CHANGES:1.120 mhonarc/MHonArc/CHANGES:1.121
--- mhonarc/MHonArc/CHANGES:1.120	Wed Oct  1 00:30:41 2003
+++ mhonarc/MHonArc/CHANGES	Wed Oct  1 23:30:58 2003
@@ -19,6 +19,7 @@
 
     ATTACHMENTDIR	Directory to save attachments.
     ATTACHMENTURL	Web URL to attachment directory.
+    NEWSURL		URL template for linking to newsgroups.
 
 * Attachment filenames have changed from the numeric-style
   <ext><#####>.<ext> to <ext><XXXXXXXXXX>.<ext> where <XXXXXXXXXX>
@@ -2597,4 +2598,4 @@
 
 =======================================================================
 Earl Hood, mhonarc(_at_)mhonarc(_dot_)org
-$Id: CHANGES,v 1.120 2003/10/01 04:30:41 ehood Exp $
+$Id: CHANGES,v 1.121 2003/10/02 03:30:58 ehood Exp $
Index: mhonarc/MHonArc/doc/_helper/addvartbls.pl
diff -u mhonarc/MHonArc/doc/_helper/addvartbls.pl:1.9 mhonarc/MHonArc/doc/_helper/addvartbls.pl:1.10
--- mhonarc/MHonArc/doc/_helper/addvartbls.pl:1.9	Mon Dec  9 23:08:02 2002
+++ mhonarc/MHonArc/doc/_helper/addvartbls.pl	Wed Oct  1 23:30:58 2003
@@ -56,6 +56,7 @@
     $MsgVars{$var} = $txt  	if $type =~ /M/; # message pages
     $MsgFixVars{$var} = $txt  	if $type =~ /F/; # message pages (fixed areas)
     $MailtoURLVars{$var} = $txt if $type =~ /U/; # MAILTOURL
+    $NewsURLVars{$var} = $txt   if $type =~ /u/; # NEWSURL
 }
 close(VARFILE);
 
@@ -64,6 +65,7 @@
     ($rc = $file) =~ s/\..*//;
 
     $hash = undef;
+    $hash = \%NewsURLVars  	if $Rc2Type{$rc} =~ /u/;
     $hash = \%MailtoURLVars  	if $Rc2Type{$rc} =~ /U/;
     $hash = \%IdxVars   	if $Rc2Type{$rc} =~ /I/;
     $hash = \%TIdxVars  	if $Rc2Type{$rc} =~ /T/;
Index: mhonarc/MHonArc/doc/_helper/rcvars.lst
diff -u mhonarc/MHonArc/doc/_helper/rcvars.lst:1.22 mhonarc/MHonArc/doc/_helper/rcvars.lst:1.23
--- mhonarc/MHonArc/doc/_helper/rcvars.lst:1.22	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/_helper/rcvars.lst	Wed Oct  1 23:30:58 2003
@@ -32,6 +32,7 @@
 MSGNUM(M):ITM:The message number assigned to the message by MHonArc (includes leading zeros).
 MSGPREFIX:ITMF:Filename prefix for message files.
 MSGTORDNUM(T):ITMF:The ordinal message number of the current discussion thread.
+NEWSGROUP:u:Newsgroup name
 NOTE(M):ITM:Message annotation.
 NOTETEXT(M)::Base text of message annotation.
 PG(P):i:Filename of an index page.
Index: mhonarc/MHonArc/doc/_helper/resource.lst
diff -u mhonarc/MHonArc/doc/_helper/resource.lst:1.52 mhonarc/MHonArc/doc/_helper/resource.lst:1.53
--- mhonarc/MHonArc/doc/_helper/resource.lst:1.52	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/_helper/resource.lst	Wed Oct  1 23:30:58 2003
@@ -107,6 +107,7 @@
 msgsep::M2H_MSGSEP:<MSGSEP>:-msgsep:Regex for matching message separator in mailbox files.
 multipg::M2H_MULTIPG:<MULTIPG/>:-multipg:Create multi-page indexes.
 news::M2H_NEWS:<NEWS/>,<NONEWS/>:-news:Hyperlink newsgroups in message headers.
+newsurl:u,MSGID:M2H_NEWSURL:<NEWSURL>:-newsurl:URL template to use for newsgroup links.
 nextbuttonia:M::<NEXTBUTTONIA>::Inactive button markup for next message by main index.
 nextbutton:M::<NEXTBUTTON>::Button markup for next message by main index.
 nextlinkia:M::<NEXTLINKIA>::Inactive link markup for next message by main index.
Index: mhonarc/MHonArc/doc/app-rcidx.html
diff -u mhonarc/MHonArc/doc/app-rcidx.html:1.31 mhonarc/MHonArc/doc/app-rcidx.html:1.32
--- mhonarc/MHonArc/doc/app-rcidx.html:1.31	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/app-rcidx.html	Wed Oct  1 23:30:58 2003
@@ -92,6 +92,7 @@
 <tr valign="top"><td align="right"><b><a href="resources/msgsep.html"><tt>M2H_MSGSEP</tt></a></b></td><td>&nbsp;Regex for matching message separator in mailbox files.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/multipg.html"><tt>M2H_MULTIPG</tt></a></b></td><td>&nbsp;Create multi-page indexes.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/news.html"><tt>M2H_NEWS</tt></a></b></td><td>&nbsp;Hyperlink newsgroups in message headers.</td></tr>
+<tr valign="top"><td align="right"><b><a href="resources/newsurl.html"><tt>M2H_NEWSURL</tt></a></b></td><td>&nbsp;URL template to use for newsgroup links.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/nosubjecttxt.html"><tt>M2H_NOSUBJECTTXT</tt></a></b></td><td>&nbsp;Raw subject text to use for messages without a subject.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/notedir.html"><tt>M2H_NOTEDIR</tt></a></b></td><td>&nbsp;Directory to store annotations.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/otherindexes.html"><tt>M2H_OTHERINDEXES</tt></a></b></td><td>&nbsp;List of alternate indexes to create for an archive.</td></tr>
@@ -231,6 +232,7 @@
 <tr valign="top"><td align="right"><b><a href="resources/msgsep.html"><tt>&lt;MSGSEP&gt;</tt></a></b></td><td>&nbsp;Regex for matching message separator in mailbox files.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/multipg.html"><tt>&lt;MULTIPG&gt;</tt></a></b></td><td>&nbsp;Create multi-page indexes.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/news.html"><tt>&lt;NEWS&gt;</tt><br><tt>&lt;NONEWS&gt;</tt></a></b></td><td>&nbsp;Hyperlink newsgroups in message headers.</td></tr>
+<tr valign="top"><td align="right"><b><a href="resources/newsurl.html"><tt>&lt;NEWSURL&gt;</tt></a></b></td><td>&nbsp;URL template to use for newsgroup links.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/nextbutton.html"><tt>&lt;NEXTBUTTON&gt;</tt></a></b></td><td>&nbsp;Button markup for next message by main index.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/nextbuttonia.html"><tt>&lt;NEXTBUTTONIA&gt;</tt></a></b></td><td>&nbsp;Inactive button markup for next message by main index.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/nextlink.html"><tt>&lt;NEXTLINK&gt;</tt></a></b></td><td>&nbsp;Link markup for next message by main index.</td></tr>
@@ -439,6 +441,7 @@
 <tr valign="top"><td align="right"><b><a href="resources/msgsep.html"><tt>-msgsep</tt></a></b></td><td>&nbsp;Regex for matching message separator in mailbox files.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/multipg.html"><tt>-multipg</tt></a></b></td><td>&nbsp;Create multi-page indexes.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/news.html"><tt>-news</tt></a></b></td><td>&nbsp;Hyperlink newsgroups in message headers.</td></tr>
+<tr valign="top"><td align="right"><b><a href="resources/newsurl.html"><tt>-newsurl</tt></a></b></td><td>&nbsp;URL template to use for newsgroup links.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/nosubjecttxt.html"><tt>-nosubjecttxt</tt></a></b></td><td>&nbsp;Raw subject text to use for messages without a subject.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/notedir.html"><tt>-notedir</tt></a></b></td><td>&nbsp;Directory to store annotations.</td></tr>
 <tr valign="top"><td align="right"><b><a href="resources/notetext.html"><tt>-notetext</tt></a></b></td><td>&nbsp;Annotation text.</td></tr>
@@ -494,7 +497,7 @@
 <!-- *************************************************************** -->
 <hr>
 <address>
-$Date: 2003/10/01 04:33:50 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="monicon.png" alt="">
 <a href="http://www.mhonarc.org";><strong>MHonArc</strong></a><br>
 Copyright &#169; 1999, <a href="http://www.mhonarc.org/~ehood/";
Index: mhonarc/MHonArc/doc/rcvars.html
diff -u mhonarc/MHonArc/doc/rcvars.html:1.27 mhonarc/MHonArc/doc/rcvars.html:1.28
--- mhonarc/MHonArc/doc/rcvars.html:1.27	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/rcvars.html	Wed Oct  1 23:30:58 2003
@@ -858,6 +858,19 @@
 </td>
 </tr>
 </table><br></dd>
+<dt><strong><a name="NEWSGROUP"><tt>$NEWSGROUP$</tt></a></strong></dt>
+<dd><table border=0>
+<tr valign=top>
+<td align=right><b>Arguments:</b></td>
+<td>N/A</td>
+</tr>
+<tr valign=top>
+<td align=right><b>Description:</b></td>
+<td>Newsgroup name.
+This variable is only applicable for use in the
+<a href="resources/newsurl.html">NEWSURL</a>.</td>
+</tr>
+</table><br></dd>
 <dt><strong><a name="NOTE"><tt>$NOTE$</tt></a></strong></dt>
 <dd><table border=0>
 <tr valign=top>
@@ -1269,7 +1282,7 @@
 <!-- *************************************************************** -->
 <hr>
 <address>
-$Date: 2003/10/01 04:33:50 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="monicon.png" alt="">
 <a href="http://www.mhonarc.org";
 ><strong>MHonArc</strong></a><br>
Index: mhonarc/MHonArc/doc/resources.html
diff -u mhonarc/MHonArc/doc/resources.html:1.34 mhonarc/MHonArc/doc/resources.html:1.35
--- mhonarc/MHonArc/doc/resources.html:1.34	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/resources.html	Wed Oct  1 23:30:58 2003
@@ -259,6 +259,7 @@
 <tr valign="top"><td align="right"><b><a name="msgsep" href="resources/msgsep.html">MSGSEP</a></b></td><td>&nbsp;Regex for matching message separator in mailbox files.</td></tr>
 <tr valign="top"><td align="right"><b><a name="multipg" href="resources/multipg.html">MULTIPG</a></b></td><td>&nbsp;Create multi-page indexes.</td></tr>
 <tr valign="top"><td align="right"><b><a name="news" href="resources/news.html">NEWS</a></b></td><td>&nbsp;Hyperlink newsgroups in message headers.</td></tr>
+<tr valign="top"><td align="right"><b><a name="newsurl" href="resources/newsurl.html">NEWSURL</a></b></td><td>&nbsp;URL template to use for newsgroup links.</td></tr>
 <tr valign="top"><td align="right"><b><a name="nextbutton" href="resources/nextbutton.html">NEXTBUTTON</a></b></td><td>&nbsp;Button markup for next message by main index.</td></tr>
 <tr valign="top"><td align="right"><b><a name="nextbuttonia" href="resources/nextbuttonia.html">NEXTBUTTONIA</a></b></td><td>&nbsp;Inactive button markup for next message by main index.</td></tr>
 <tr valign="top"><td align="right"><b><a name="nextlink" href="resources/nextlink.html">NEXTLINK</a></b></td><td>&nbsp;Link markup for next message by main index.</td></tr>
@@ -421,7 +422,7 @@
 <!-- *************************************************************** -->
 <hr>
 <address>
-$Date: 2003/10/01 04:33:50 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="monicon.png" alt="">
 <a href="http://www.mhonarc.org";
 ><strong>MHonArc</strong></a><br>
Index: mhonarc/MHonArc/doc/resources/mailtourl.html
diff -u mhonarc/MHonArc/doc/resources/mailtourl.html:1.11 mhonarc/MHonArc/doc/resources/mailtourl.html:1.12
--- mhonarc/MHonArc/doc/resources/mailtourl.html:1.11	Mon Dec  9 23:08:02 2002
+++ mhonarc/MHonArc/doc/resources/mailtourl.html	Wed Oct  1 23:30:58 2003
@@ -159,7 +159,8 @@
 <h2><a name="seealso">See Also</a></h2>
 
 <p>
-<a href="mailto.html">MAILTO</a>
+<a href="mailto.html">MAILTO</a>,
+<a href="newsurl.html">NEWSURL</a>
 </p>
 
 <!-- *************************************************************** -->
@@ -170,7 +171,7 @@
 <!--/x-rc-nav-->
 <hr>
 <address>
-$Date: 2002/12/10 04:08:02 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="../monicon.png" alt="">
 <a href="http://www.mhonarc.org/";><strong>MHonArc</strong></a><br>
 Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/";>Earl Hood</a>, <a href="mailto:mhonarc(_at_)mhonarc(_dot_)org">mhonarc(_at_)mhonarc(_dot_)org</a><br>
Index: mhonarc/MHonArc/doc/resources/news.html
diff -u mhonarc/MHonArc/doc/resources/news.html:1.11 mhonarc/MHonArc/doc/resources/news.html:1.12
--- mhonarc/MHonArc/doc/resources/news.html:1.11	Mon Dec  9 23:08:03 2002
+++ mhonarc/MHonArc/doc/resources/news.html	Wed Oct  1 23:30:58 2003
@@ -6,7 +6,7 @@
 <body>
 <!--x-rc-nav-->
 <table border=0><tr valign="top">
-<td align="left" width="50%">[Prev:&nbsp;<a href="multipg.html">MULTIPG</a>]</td><td><nobr>[<a href="../resources.html#news">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbutton.html">NEXTBUTTON</a>]</td></tr></table>
+<td align="left" width="50%">[Prev:&nbsp;<a href="multipg.html">MULTIPG</a>]</td><td><nobr>[<a href="../resources.html#news">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="newsurl.html">NEWSURL</a>]</td></tr></table>
 <!--/x-rc-nav-->
 <hr>
 <h1>NEWS</h1>
@@ -35,7 +35,7 @@
 </dd>
 
 <dt><strong>Element(s)</strong><dt>
-<dd><p><br>
+<dd><p>
 <code>
 &lt;NEWS&gt;<br>
 &lt;NONEWS&gt;<br>
@@ -44,7 +44,7 @@
 </dd>
 
 <dt><strong>Command-line Option(s)</strong><dt>
-<dd><p><br>
+<dd><p>
 <code>-news<br>
 -nonews
 </code>
@@ -59,7 +59,7 @@
 
 <p>When NEWS is on, newsgroups listed in the <tt>Newsgroup</tt> field
 of a message header will be converted to <tt>news</tt> URL
-hyperlinks.
+hyperlinks as defined by the <a href="newsurl.html">NEWSURL</a> resource.
 </p>
 
 <!-- *************************************************************** -->
@@ -95,17 +95,19 @@
 <h2><a name="seealso">See Also</a></h2>
 
 <p>
+<a href="newsurl">NEWSURL</a>,
+<a href="mailto">MAILTO</a>
 </p>
 
 <!-- *************************************************************** -->
 <hr>
 <!--x-rc-nav-->
 <table border=0><tr valign="top">
-<td align="left" width="50%">[Prev:&nbsp;<a href="multipg.html">MULTIPG</a>]</td><td><nobr>[<a href="../resources.html#news">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbutton.html">NEXTBUTTON</a>]</td></tr></table>
+<td align="left" width="50%">[Prev:&nbsp;<a href="multipg.html">MULTIPG</a>]</td><td><nobr>[<a href="../resources.html#news">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="newsurl.html">NEWSURL</a>]</td></tr></table>
 <!--/x-rc-nav-->
 <hr>
 <address>
-$Date: 2002/12/10 04:08:03 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="../monicon.png" alt="">
 <a href="http://www.mhonarc.org/";><strong>MHonArc</strong></a><br>
 Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/";>Earl Hood</a>, <a href="mailto:mhonarc(_at_)mhonarc(_dot_)org">mhonarc(_at_)mhonarc(_dot_)org</a><br>
Index: mhonarc/MHonArc/doc/resources/nextbutton.html
diff -u mhonarc/MHonArc/doc/resources/nextbutton.html:1.17 mhonarc/MHonArc/doc/resources/nextbutton.html:1.18
--- mhonarc/MHonArc/doc/resources/nextbutton.html:1.17	Wed Oct  1 00:33:50 2003
+++ mhonarc/MHonArc/doc/resources/nextbutton.html	Wed Oct  1 23:30:58 2003
@@ -6,7 +6,7 @@
 <body>
 <!--x-rc-nav-->
 <table border=0><tr valign="top">
-<td align="left" width="50%">[Prev:&nbsp;<a href="news.html">NEWS</a>]</td><td><nobr>[<a href="../resources.html#nextbutton">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbuttonia.html">NEXTBUTTONIA</a>]</td></tr></table>
+<td align="left" width="50%">[Prev:&nbsp;<a href="newsurl.html">NEWSURL</a>]</td><td><nobr>[<a href="../resources.html#nextbutton">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbuttonia.html">NEXTBUTTONIA</a>]</td></tr></table>
 <!--/x-rc-nav-->
 <hr>
 <h1>NEXTBUTTON</h1>
@@ -310,11 +310,11 @@
 <hr>
 <!--x-rc-nav-->
 <table border=0><tr valign="top">
-<td align="left" width="50%">[Prev:&nbsp;<a href="news.html">NEWS</a>]</td><td><nobr>[<a href="../resources.html#nextbutton">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbuttonia.html">NEXTBUTTONIA</a>]</td></tr></table>
+<td align="left" width="50%">[Prev:&nbsp;<a href="newsurl.html">NEWSURL</a>]</td><td><nobr>[<a href="../resources.html#nextbutton">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="nextbuttonia.html">NEXTBUTTONIA</a>]</td></tr></table>
 <!--/x-rc-nav-->
 <hr>
 <address>
-$Date: 2003/10/01 04:33:50 $ <br>
+$Date: 2003/10/02 03:30:58 $ <br>
 <img align="top" src="../monicon.png" alt="">
 <a href="http://www.mhonarc.org/";><strong>MHonArc</strong></a><br>
 Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/";>Earl Hood</a>, <a href="mailto:mhonarc(_at_)mhonarc(_dot_)org">mhonarc(_at_)mhonarc(_dot_)org</a><br>
Index: mhonarc/MHonArc/examples/mhonarc.vim
diff -u mhonarc/MHonArc/examples/mhonarc.vim:1.22 mhonarc/MHonArc/examples/mhonarc.vim:1.23
--- mhonarc/MHonArc/examples/mhonarc.vim:1.22	Sat Aug  2 02:15:37 2003
+++ mhonarc/MHonArc/examples/mhonarc.vim	Wed Oct  1 23:30:58 2003
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	MHonArc Resource File
 " Maintainer:	Earl Hood <mhonarc(_at_)pobox(_dot_)com>
-" Last change:	$Date: 2003/08/02 06:15:37 $ 
+" Last change:	$Date: 2003/10/02 03:30:58 $ 
 
 "	Adapted from the following:
 " Language:	HTML
@@ -43,6 +43,8 @@
 
 " BEGIN: MHonArc Tags
 syn keyword mhaTagName contained addressmodifycode
+syn keyword mhaTagName contained attachmentdir
+syn keyword mhaTagName contained attachmenturl
 syn keyword mhaTagName contained authorbegin
 syn keyword mhaTagName contained authorend
 syn keyword mhaTagName contained authsort
@@ -148,6 +150,7 @@
 syn keyword mhaTagName contained multipg
 syn keyword mhaTagName contained news
 syn keyword mhaTagName contained nonews
+syn keyword mhaTagName contained newsurl
 syn keyword mhaTagName contained nextbuttonia
 syn keyword mhaTagName contained nextbutton
 syn keyword mhaTagName contained nextlinkia
Index: mhonarc/MHonArc/lib/mhdb.pl
diff -u mhonarc/MHonArc/lib/mhdb.pl:2.34 mhonarc/MHonArc/lib/mhdb.pl:2.35
--- mhonarc/MHonArc/lib/mhdb.pl:2.34	Wed Oct  1 00:30:41 2003
+++ mhonarc/MHonArc/lib/mhdb.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhdb.pl,v 2.34 2003/10/01 04:30:41 ehood Exp $
+##	$Id: mhdb.pl,v 2.35 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -181,6 +181,7 @@
 print_var($db,'MsgLocalDateFmt',\$MsgLocalDateFmt);
 print_var($db,'MsgPrefix',      \$MsgPrefix);
 print_var($db,'MULTIIDX',       \$MULTIIDX);
+print_var($db,'NewsUrl',        \$NewsUrl)  unless $IsDefault{'NEWSURL'};
 print_var($db,'NOMAILTO',       \$NOMAILTO);
 print_var($db,'NONEWS',         \$NONEWS);
 print_var($db,'NOURL',          \$NOURL);
Index: mhonarc/MHonArc/lib/mhidxrc.pl
diff -u mhonarc/MHonArc/lib/mhidxrc.pl:2.15 mhonarc/MHonArc/lib/mhidxrc.pl:2.16
--- mhonarc/MHonArc/lib/mhidxrc.pl:2.15	Mon Mar 31 12:53:47 2003
+++ mhonarc/MHonArc/lib/mhidxrc.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhidxrc.pl,v 2.15 2003/03/31 17:53:47 ehood Exp $
+##	$Id: mhidxrc.pl,v 2.16 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -758,6 +758,11 @@
 	$MAILTOURL = 'mailto:$TO$';
     }
     $IsDefault{'MAILTOURL'} = 1;
+}
+
+if ($NewsUrl eq "") {
+    $NewsUrl = 'news:$NEWSGROUP$';
+    $IsDefault{'NEWSURL'} = 1;
 }
 
 if (!defined($AddrModifyBodies)) {
Index: mhonarc/MHonArc/lib/mhinit.pl
diff -u mhonarc/MHonArc/lib/mhinit.pl:2.49 mhonarc/MHonArc/lib/mhinit.pl:2.50
--- mhonarc/MHonArc/lib/mhinit.pl:2.49	Wed Oct  1 00:30:41 2003
+++ mhonarc/MHonArc/lib/mhinit.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhinit.pl,v 2.49 2003/10/01 04:30:41 ehood Exp $
+##	$Id: mhinit.pl,v 2.50 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -309,6 +309,7 @@
 $TTITLE    = $ENV{'M2H_TTITLE'}     || "Mail Thread Index";
 $TITLE     = $ENV{'M2H_TITLE'}      || "Mail Index";
 $MAILTOURL = $ENV{'M2H_MAILTOURL'}  || "";
+$NewsUrl   = $ENV{'M2H_NEWSURL'}  || "";
 $FROM      = $ENV{'M2H_MSGSEP'}     || '^From ';
 $LOCKFILE  = $ENV{'M2H_LOCKFILE'}   ||
 	     ($MSDOS ? "mhonarc.lck" :
Index: mhonarc/MHonArc/lib/mhopt.pl
diff -u mhonarc/MHonArc/lib/mhopt.pl:2.55 mhonarc/MHonArc/lib/mhopt.pl:2.56
--- mhonarc/MHonArc/lib/mhopt.pl:2.55	Wed Oct  1 00:30:41 2003
+++ mhonarc/MHonArc/lib/mhopt.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##      $Id: mhopt.pl,v 2.55 2003/10/01 04:30:41 ehood Exp $
+##      $Id: mhopt.pl,v 2.56 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -112,6 +112,7 @@
 	'msgprefix=s',	# Filename prefix for message files
 	'multipg',	# Generate multi-page indexes
 	'news',		# Add links to newsgroups
+	'newsurl=s',	# URL to use for news hyperlinks
 	'noauthsort',	# Do not sort by author
 	'noarchive',	# Do not create an archive
 	'nochecknoarchive',
@@ -507,6 +508,7 @@
 	$IDXSIZE *= -1  if $IDXSIZE < 0;
     $OUTDIR	= $opt{'outdir'}     if $opt{'outdir'}; # Override db
     $MAILTOURL	= $opt{'mailtourl'}  if $opt{'mailtourl'};
+    $NewsUrl	= $opt{'newsurl'}    if $opt{'newsurl'};
     $MAXSIZE	= $opt{'maxsize'}    if defined($opt{'maxsize'});
 	$MAXSIZE = 0  if $MAXSIZE < 0;
     $MHPATTERN	= $opt{'mhpattern'}  if $opt{'mhpattern'};
Index: mhonarc/MHonArc/lib/mhrcfile.pl
diff -u mhonarc/MHonArc/lib/mhrcfile.pl:2.38 mhonarc/MHonArc/lib/mhrcfile.pl:2.39
--- mhonarc/MHonArc/lib/mhrcfile.pl:2.38	Wed Oct  1 00:30:41 2003
+++ mhonarc/MHonArc/lib/mhrcfile.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhrcfile.pl,v 2.38 2003/10/01 04:30:41 ehood Exp $
+##	$Id: mhrcfile.pl,v 2.39 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -657,6 +657,15 @@
 	}
 	if ($elem eq 'multipg') {		# Print multi-page indexes
 	    $MULTIIDX = 1; last FMTSW;
+	}
+	if ($elem eq 'newsurl') {		# News URL
+	    while (defined($line = <$handle>)) {
+		last  if $line =~ /^\s*<\/newsurl\s*>/i;
+		next  if $line =~ /^\s*$/;
+		$line =~ s/\s//g;
+		$NewsUrl = $line;
+	    }
+	    last FMTSW;
 	}
 	if ($elem eq 'nextbutton') {		# Next button link in message
 	    $NEXTBUTTON = &get_elem_content($handle, $elem, $chop);
Index: mhonarc/MHonArc/lib/mhusage.pl
diff -u mhonarc/MHonArc/lib/mhusage.pl:2.24 mhonarc/MHonArc/lib/mhusage.pl:2.25
--- mhonarc/MHonArc/lib/mhusage.pl:2.24	Wed Oct  1 00:30:42 2003
+++ mhonarc/MHonArc/lib/mhusage.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##      $Id: mhusage.pl,v 2.24 2003/10/01 04:30:42 ehood Exp $
+##      $Id: mhusage.pl,v 2.25 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -133,6 +133,8 @@
                              (def: "^From ")
   -multipg                 : Generate multi-page indexes
   -news                    : Add links to newsgroups (the default)
+  -newsurl <url>           : URL to use for newsgroup hyperlinks
+                             (def: "news:\$NEWSGROUP\$";)
   -noarchive               : Do not generate archive related files
   -noauthsort              : Do not sort messages by author
   -nochecknoarchive        : Ignore "no archive" flags in messages
Index: mhonarc/MHonArc/lib/mhutil.pl
diff -u mhonarc/MHonArc/lib/mhutil.pl:2.27 mhonarc/MHonArc/lib/mhutil.pl:2.28
--- mhonarc/MHonArc/lib/mhutil.pl:2.27	Thu Jan  9 18:42:28 2003
+++ mhonarc/MHonArc/lib/mhutil.pl	Wed Oct  1 23:30:58 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhutil.pl,v 2.27 2003/01/09 23:42:28 ehood Exp $
+##	$Id: mhutil.pl,v 2.28 2003/10/02 03:30:58 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -527,7 +527,7 @@
 	    last LBLSW;
 	}
 	if (!$NONEWS && ($label eq 'newsgroup' || $label eq 'newsgroups')) {
-	    $fld_text = newsurl($fld_text);
+	    $fld_text = newsurl($fld_text, $fields->{'x-mha-message-id'});
 	    last LBLSW;
 	}
 	last LBLSW;
@@ -540,16 +540,23 @@
 ##	Routine to add news links of newsgroups names
 ##
 sub newsurl {
-    my $str = shift;
+    my $str     = shift;
+    my $msgid_u = urlize(shift);
     my $h = "";
 
+    local $_;
     if ($str =~ s/^([^:]*:\s*)//) {
 	$h = $1;
     }
-    $str =~ s/\s//g;			# Strip whitespace
-    my @groups = split(/,/, $str);	# Split groups
-    foreach (@groups) {			# Make hyperlinks
-	s|(.*)|<a href="news:$1";>$1</a>|;
+    $str =~ s/[\s<>]//g;
+    my @groups = split(/,/, $str);
+    my $group;
+    foreach $group (@groups) {
+	my $url     = $NewsUrl;
+	my $group_u = urlize($group);
+	$url =~ s/\$NEWSGROUP(?::U)?\$/$group_u/g;
+	$url =~ s/\$MSGID(?::U)?\$/$msgid_u/g;
+	$group = qq{<a href="$url">$group</a>};
     }
     $h . join(', ', @groups);	# Rejoin string
 }

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS