[Mailman-Users] Adding searching to index pages
Igor S. Livshits
igorl at life.uiuc.edu
Sat Aug 21 00:34:23 CEST 1999
Here's a short patch that will allow one to add a search block to the
index.html pages created by the Mailman archiver:
-=>diff HyperArch.py HyperArch.py.orig
< # Provision for archive searching
< search_file_path= os.path.join(mm_cfg.PREFIX,
< search= open(search_file_path, 'r')
< except IOError:
< d["search"] = '''\
< <!-- searching disabled -->
< d["search"] = search.read()
Simply patch HyperArch.py and add a search.html file to your
~mailman/archives/private/<listname>/ directory. As the archive gets
rebuilt, the contents of the search.html file will get included just
above the index table of the index.html file in that directory.
This provides a fairly painless way to add an interface for ht://Dig
searches and similar.
This is my first attempt at Python code; so, if there is a better way
to accomplish the same, I'd love to hear about it.
More information about the Mailman-Users