For those Mailman site admins who want archive searches without the hassle of HtDig install and overhead, a week's worth of hacking (actually not many changes) has provided my site with archive searches. I throw this to the list for critique and comment.
Mailman 2.0.9 running since May 3 Apache 1.3.22-1 Postfix 1.1.7 Perlfect Search 3.0.3 http://perlfect.com/freescripts/search/ (a couple of pl scripts) I wanted the search button to appear on the list's index.html page, where the archives-by-month are listed, and since HyperArch.py rewrites a list's index.html each time a message goes to the list, (it updates the archive size) I had to... edit /home/mailman/Mailman/Archiver/HyperArch.py starting at line 545, add the form arch_listing_end = '''\ </table> <HR> <form method="get" action="/search/search.pl"> <input type="hidden" name="p" value="1"> <input type="hidden" name="lang" value="en"> <input type="hidden" name="penalty" value="0"> <input type="hidden" name="include" value="'%s' % (listname)"> <input type="hidden" name="exclude" value=".*\.txt"> <select name="mode"> <option value="all">Match ALL words</option> <option value="any">Match ANY word</option> </select> <input type="text" name="q"><input type="submit" value="Search"> </form> ''' add to mailman's crontab: # Do indexing at a little after midnight 24 0 * * * perl /home/mailman/cgi-bin/perlfect/search/indexer.pl add to apache's httpd.conf: ScriptAlias /search/ "/home/mailman/cgi-bin/perlfect/search/" <Directory "/home/mailman/cgi-bin/perlfect/search/"> AllowOverride None Options ExecCGI Indexes FollowSymlinks MultiViews Order allow,deny Allow from all </Directory> test drive: http://www.mailman.srv.ualberta.ca/pipermail/test5/ I do have a slight date problem. Hopefully someone's been through the same. On the month archive, the "Ending" date and "Last message date" are 20 hours into the future. In both cases it's from HyperArch.py's %(lastdate)s value. I'm 7h from GMT, so even if my system date is wrong, where could I be gaining the extra 13? 'date' at system prompt returns the correct time. Is it Mailman or me? [EMAIL PROTECTED] Computing and Network Systems Internet Applications 352 General Services Bldg. University of Alberta Edmonton, Alberta T6G 2H1 Phone: 780-492-9329 Fax: 780-492-1729 Webhome: http://www.ualberta.ca/~dblack Majordomo: http://www.ualberta.ca/cns/majordomo LWGate: http://www.ualberta.ca/htbin/lwgate Mailman: http://www.mailman.srv.ualberta.ca ------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
