[Mailman-Users] Patch against HyperArch.py
Kadlecsik Jozsi
kadlec at sunserv.kfki.hu
Fri May 28 12:41:16 CEST 1999
Hello,
The patch below against HyperArch.py makes the archive.html template
to work: the changes made on the web interface will have effect and
HyperArch will use the template instead of the hardcoded page.
*** HyperArch.py.orig Wed May 26 10:32:54 1999
--- HyperArch.py Fri May 28 12:30:09 1999
***************
*** 462,471 ****
--- 462,481 ----
% (t, t))
return self.html_hdr_tmpl % d
+ def SnarfHTMLTemplate(self, file):
+ # XXX: hack, blech, yuk
+ filename = os.path.join(mm_cfg.LIST_DATA_DIR,
+ self.maillist._internal_name,
+ file)
+ f = open(filename,'r')
+ str = f.read()
+ f.close()
+ return str
def html_TOC(self):
d = {"listname": self.maillist.real_name,
+ "internalname": self.maillist._internal_name,
"listinfo": self.maillist.GetAbsoluteScriptURL('listinfo')
}
listing = ""
if not self.archives:
***************
*** 521,526 ****
--- 531,537 ----
{'archive' : a,
'textlink': textlink}
d["archive_listing"] = listing
+ self.html_TOC_tmpl = self.SnarfHTMLTemplate('archives.html')
return self.html_TOC_tmpl % d
def __init__(self, maillist,unlock=1):
The template must be based on the following version of archive.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>The %(listname)s Archives</title>
</HEAD>
<BODY BGCOLOR="#ffffff">
<h1>The %(listname)s Archives </h1>
<p>
<a href="%(listinfo)s">More info on this list...</a>
</p>
%(noarchive_msg)s
%(archive_listing_start)s
%(archive_listing)s
%(archive_listing_end)s
</BODY>
</HTML>
Regards,
Jozsef
--
E-mail : kadlec at sunserv.kfki.hu, kadlec at blackhole.kfki.hu
PGP key: finger kadlec at sunserv.kfki.hu | WWW: http://www.kfki.hu/~kadlec
Address: KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
More information about the Mailman-Users
mailing list