[Mailman-Developers] Referencing internal list names in TOC templates

Lindsay Haisley fmouse-mailman at fmp.com
Wed Mar 12 18:04:35 CET 2008


I mentioned this before, about a year and a half ago, but I don't know
if it ever got any notice, since it's not in the 2.1.9 code.  Please
excuse me if this is already in the pipeline and scheduled for a future
version.  I just came on it again after a Gentoo Mailman upgrade which
made me rebuild everything.

If one is modifying Mailman TOC templates, as is necessary, for
instance, when implementing the Namazu search engine or working with PHP
code in templates, it can be extremely useful, and sometimes quite
necessary to know the "internal" name of a list.  This is easily done by
adding one line to HyperArch.py:

--- HyperArch.py.orig   2006-10-16 20:25:22.000000000 -0500
+++ HyperArch.py        2006-10-16 20:28:35.000000000 -0500
@@ -752,6 +752,7 @@
         listname = mlist.internal_name()
         mbox = os.path.join(mlist.archive_dir()+'.mbox', listname+'.mbox')
         d = {"listname": mlist.real_name,
+             "internal": mlist.internal_name(),
              "listinfo": mlist.GetScriptURL('listinfo', absolute=1),
              "fullarch": '../%s.mbox/%s.mbox' % (listname, listname),
              "size": sizeof(mbox, mlist.preferred_language),

This allows one to use "%(internal)s" as a replacement token in template
code.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |



More information about the Mailman-Developers mailing list