I was asked to make the date for each message in a mailman archive be
visible in the index for that month. This required that I modify
HyperArch.py and the template file archidxentry.html. I thought others
might find this useful so here are the relevant patches for the
mailman-2.1.6 source tree. 

I apologize if this is a duplication of someone else efforts, I searched
around and could not find a way to do this in mailman as it was or a
patch to do the same.


Regards,
-- 
Matt Ryanczak
American Registry for Internet Numbers
Lead System Administrator

Apply the following patches to your mailman source tree and setup as
usual. You should be able to patch a live copy of mailman without issue
though you will have to modify the patch files according to the prefix
mailman is installed in. If you patch a live mailman install you'll have
to run "$PREFIX/bin/arch --wipe $LISTNAME" for each list hosted by that
mailman installation.

--- HyperArch.py        2005-09-12 11:29:44.000000000 -0400
+++ mailman-2.1.6/Mailman/Archiver/HyperArch.py           2005-05-13
07:35:37.000000000 -0400
@@ -1024,7 +1024,6 @@
     def write_index_entry(self, article):
         subject = self.get_header("subject", article)
         author = self.get_header("author", article)
-        datestr = self.get_header("datestr", article)
         if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
             try:
                 author = re.sub('@', _(' at '), author)
@@ -1033,14 +1032,12 @@
                 pass
         subject = CGIescape(subject, self.lang)
         author = CGIescape(author, self.lang)
-        datestr = CGIescape(datestr, self.lang)

         d = {
             'filename': urllib.quote(article.filename),
             'subject':  subject,
             'sequence': article.sequence,
-            'author':   author,
-            'datestr':  datestr
+            'author':   author
         }
         print quick_maketext(
             'archidxentry.html', d,



--- archidxentry.html   2005-09-12 11:34:59.000000000 -0400
+++ /home/ryanczak/src/mailman-2.1.6/templates/en/archidxentry.html
2002-10-08 12:50:41.000000000 -0400
@@ -1,4 +1,4 @@
-<LI> %(datestr)s&nbsp;&nbsp;<A HREF="%(filename)s">%(subject)s
+<LI><A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>




------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to