On 13 Feb 2004, at 18:38, Richard D. Dover wrote:
I edited the archive index.html folder for my mailing list. I also edited the date.html and subject.html to have the appearance I wanted. Everything looked good until there was a post.
When a post is made to the list all my data is erased and the archive index.html, date.html, and subject.html went back to default.
Why is this?
Because these pages are generated dynamically by Mailman when the underlying data changes, such as when a new post to the list is archived or the archive is rebuilt, so your hand edits to these pages are inevitably, and predictably, being lost.
How can I change the archive files to look the way I want?
By changing the templates used to generate the things of interest to you. The default templates live in the directory structure underneath $prefix/Mailman/templates. The actual template file used for a given list is dynamically chosen per the following algorithm; the comments are quoted from $prefix/Mailman/Uils.py:
<quote>
# When looking for a template in a specific language, there are 4 places
# that are searched, in this order:
#
# 1. the list-specific language directory
# lists/<listname>/<language>
#
# 2. the domain-specific language directory
# templates/<list.host_name>/<language>
#
# 3. the site-wide language directory
# templates/site/<language>
#
# 4. the global default language directory
# templates/<language>
#
# The first match found stops the search. In this way, you can specialize
# templates at the desired level, or, if you use only the default
# templates, you don't need to change anything. You should never modify
# files in the templates/<language> subdirectory, since Mailman will
# overwrite these when you upgrade. That's what the templates/site
# language directories are for.
#
# A further complication is that the language to search for is determined
# by both the `lang' and `mlist' arguments. The search order there is
# that if lang is given, then the 4 locations above are searched,
# substituting lang for <language>. If no match is found, and mlist is
# given, then the 4 locations are searched using the list's preferred
# language. After that, the server default language is used for
# <language>. If that still doesn't yield a template, then the standard
# distribution's English language template is used as an ultimate
# fallback. If that's missing you've got big problems. ;)
#
</quote>
Note that you should not make changes to the default templates under the $prefix/Mailman/templates directory as those changes will be lost when you next upgrade Mailman; put your changed templates under $prefix/templates/site/ if, for instance, you want them to apply to all lists on your server in place of the defaults. Or put them in host or list specific directories as described above. Templates in these locations are not changed by a Mailman upgrade.
Note that for performance reasons the templates are cached by the various qrunners while they are running. As a consquence you need to use mailmanctl restart after changing templates so that the qrunners will pick up the new versions from disk and incorporate them into their caches.
----------------------------------------------------------------------- Richard Barrett http://www.openinfo.co.uk
------------------------------------------------------ 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 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
