[Mailman-Developers] Skinning Mailman (how to add a customer UI in five minutes or less...)

Barry A. Warsaw barry@digicool.com
Thu, 31 May 2001 01:51:42 -0400

>>>>> "CVR" == Chuq Von Rospach <chuqui@plaidworks.com> writes:

    CVR> I finally found a tool that takes care of this for me -- it's
    CVR> called mod_layout (www.tangent.org), and it's an apache
    CVR> module, so this is apache specific.

Very cool indeed.  Although I haven't had time to play with it, it
seems like a low-cost approach that gets you 90% of the way there.

    CVR> This gives me control over almost all of Mailman (and, hint
    CVR> hint) -- hopefully Barry will add the configuration for the
    CVR> rest down the road.

    CVR> One is that some of the text-box colors are hard-coded (see,
    CVR> for instance, /mailman/admin/listname/general/. It'd be nice
    CVR> (and it seems to be easy to do) to turn those into globals
    CVR> that can be set in mm_cfg.py instead of requiring someone to
    CVR> whack all of the source files they're sprinkled in.

I've completely rewritten the user options page (more on this later,
tomorrow is checkin day :), and have taken the opportunity to do
exactly this.  I may have missed some, but the idea is that the colors
are now overridable in mm_cfg.py.

Which makes me think more about having a better support for virtual
domains by having something akin to a different mm_cfg.py per domain.
That's rumbling around in the back of my head.

    CVR> The other key one for me are some of the admin messages
    CVR> (Mailman/Handlers/Hold.py). I've modified some of the
    CVR> messages for various reasons, and it'd be nice if I could
    CVR> simply override their definitions in the mm_cfg.py file

I'll have to think about this.  One hackish idea (untested) is to try
to import Mailman.Hold from mm_cfg.py, and then set the class's
__doc__ attribute with the message you want.  The fact that
Mailman/Hold.py imports mm_cfg.py means you might have to play games
with the importer to get this to work.  Not a great solution, but it
might help localize your customizations for now.

    CVR> And the third place I've made custom changes are in some of
    CVR> the list templates (most radically templates/listinfo.html)
    CVR> -- but that's why they're template; you simply keep a copy
    CVR> somewhere and watch out for additions to the updated copy...

Exactly, and the new template lookup scheme should be much more
friendly to this approach.

    CVR> It took me about three days and a couple of exchanges with
    CVR> the author of mod_layout to get it going the way I wanted
    CVR> (the documentation is still being fleshed out), but it's a
    CVR> nice improvement to the old way of doing things -- and since
    CVR> I know others build custom skins around their installations,
    CVR> I'd thought I'd pass this one along.

Yes, thanks!