[Mailman-Users] patch to add date to each meassge in mail archiveIndex

Matt Ryanczak ryanczak at arin.net
Tue Sep 13 19:44:27 CEST 2005


I submitted this patch to the sourceforge mailman site so it can now be
found there. I also updated the patch so that it will now update every
template (not just the English version). For convenience the patch is
also below (and attached to keep the proper breaks in some of the
template files)...

Regards,

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




--- mailman-2.1.6/Mailman/Archiver/HyperArch.py	2005-05-13 07:35:37.000000000 -0400
+++ mailman-2.1.6/Mailman/Archiver/HyperArch.py	2005-09-12 18:41:06.000000000 -0400
@@ -1024,6 +1024,7 @@
     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)
@@ -1032,12 +1033,14 @@
                 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
+            'author':   author,
+            'datestr':  datestr
         }
         print quick_maketext(
             'archidxentry.html', d,
--- mailman-2.1.6/templates/ca/archidxentry.html	2003-11-01 10:51:48.000000000 -0500
+++ mailman-2.1.6/templates/ca/archidxentry.html	2005-09-13 12:46:07.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/en/archidxentry.html	2002-10-08 12:50:41.000000000 -0400
+++ mailman-2.1.6/templates/en/archidxentry.html	2005-09-13 12:44:40.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;%(datestr)s>&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/es/archidxentry.html	2005-05-20 09:28:23.000000000 -0400
+++ mailman-2.1.6/templates/es/archidxentry.html	2005-09-13 12:46:21.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/eu/archidxentry.html	2003-12-01 11:07:41.000000000 -0500
+++ mailman-2.1.6/templates/eu/archidxentry.html	2005-09-13 12:45:48.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/fr/archidxentry.html	2002-12-19 23:06:08.000000000 -0500
+++ mailman-2.1.6/templates/fr/archidxentry.html	2005-09-13 12:46:16.000000000 -0400
@@ -1,4 +1,4 @@
-<li><a href="%(filename)s">%(subject)s 
+<li>%(datestr)s&nbsp;<a href="%(filename)s">%(subject)s 
 </a><a name="%(sequence)i">&nbsp;</a>
  <i>%(author)s 
 </i></li>
--- mailman-2.1.6/templates/hr/archidxentry.html	2003-11-30 18:04:02.000000000 -0500
+++ mailman-2.1.6/templates/hr/archidxentry.html	2005-09-13 12:44:50.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/hu/archidxentry.html	2002-12-11 22:30:15.000000000 -0500
+++ mailman-2.1.6/templates/hu/archidxentry.html	2005-09-13 12:44:58.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/it/archidxentry.html	2002-10-10 15:33:47.000000000 -0400
+++ mailman-2.1.6/templates/it/archidxentry.html	2005-09-13 12:45:35.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/ja/archidxentry.html	2002-10-08 12:50:42.000000000 -0400
+++ mailman-2.1.6/templates/ja/archidxentry.html	2005-09-13 12:45:27.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/lt/archidxentry.html	2002-12-24 14:05:13.000000000 -0500
+++ mailman-2.1.6/templates/lt/archidxentry.html	2005-09-13 12:45:09.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/pl/archidxentry.html	2003-04-20 00:52:59.000000000 -0400
+++ mailman-2.1.6/templates/pl/archidxentry.html	2005-09-13 12:45:40.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/pt/archidxentry.html	2003-04-09 01:09:01.000000000 -0400
+++ mailman-2.1.6/templates/pt/archidxentry.html	2005-09-13 12:45:03.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/pt_BR/archidxentry.html	2004-11-03 13:29:30.000000000 -0500
+++ mailman-2.1.6/templates/pt_BR/archidxentry.html	2005-09-13 12:45:31.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/ro/archidxentry.html	2003-12-13 11:35:53.000000000 -0500
+++ mailman-2.1.6/templates/ro/archidxentry.html	2005-09-13 12:45:52.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/ru/archidxentry.html	2002-10-10 20:43:36.000000000 -0400
+++ mailman-2.1.6/templates/ru/archidxentry.html	2005-09-13 12:45:59.000000000 -0400
@@ -1 +1 @@
-<LI><A HREF="%(filename)s">%(subject)s</A><A NAME="%(sequence)i">&nbsp;</A><I>%(author)s</I>
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s</A><A NAME="%(sequence)i">&nbsp;</A><I>%(author)s</I>
--- mailman-2.1.6/templates/sl/archidxentry.html	2003-10-03 22:57:36.000000000 -0400
+++ mailman-2.1.6/templates/sl/archidxentry.html	2005-09-13 12:45:22.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/sr/archidxentry.html	2003-09-21 23:52:34.000000000 -0400
+++ mailman-2.1.6/templates/sr/archidxentry.html	2005-09-13 12:44:30.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/tr/archidxentry.html	2004-04-24 22:30:04.000000000 -0400
+++ mailman-2.1.6/templates/tr/archidxentry.html	2005-09-13 12:46:03.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/uk/archidxentry.html	2003-09-21 23:52:35.000000000 -0400
+++ mailman-2.1.6/templates/uk/archidxentry.html	2005-09-13 12:46:12.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>
--- mailman-2.1.6/templates/zh_CN/archidxentry.html	2005-04-07 00:21:35.000000000 -0400
+++ mailman-2.1.6/templates/zh_CN/archidxentry.html	2005-09-13 12:45:17.000000000 -0400
@@ -1,4 +1,4 @@
-<LI><A HREF="%(filename)s">%(subject)s
+<LI>%(datestr)s&nbsp;<A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>
 <I>%(author)s
 </I>




More information about the Mailman-Users mailing list