[Mailman-Developers] Piping Mailman's HTML through PHP

John Price jp_mailman at gcfl.net
Thu Jul 22 22:56:46 CEST 2004


I'm far from a Python guru, so that's why I'm asking the
developer's list.

I want to integrate the Mailman web pages into the rest
of my web page, but everything else is PHP.  I've seen
lots of posts about using PHP with Mailman, but not really
any solutions (if I missed it, please point me in the
right direction).

With that in mind, I thought I'd try to see how to do it
myself.  All I really need Mailman to do is after it
generates it's HTML to pipe the output through
/usr/bin/php before sending it to stdout where apache will
get it.

I have a solution, but I but there's a better way within
Mailman.

Right now I moved all the programs in
/usr/local/mailman/cgi-bin to
/usr/local/mailman/cgi-bin.orig, then created shell
scripts in cgi-bin that look like this:

--- start file: listinfo ---
#!/bin/sh

../cgi-bin.orig/listinfo | /usr/bin/php
--- end file: listinfo ---

That's all there is to it.  Now I can add PHP directives
in Mailman's HTML code, and they get parsed.

Is there a better way?

Maybe you good folks could add some hooks into later
releases so that the user could specify a "filter" program
or something that Mailman will pipe all it's HTML output
through.  That's all that is needed.

Thanx for a great program!

- John

-- 
"Cat's motto: No matter what you've done wrong, always try
to make it look like the dog did it." -- Unknown

http://GCFL.net (The Good, Clean Funnies List): Good, clean
funnies five times a week, no ads, for free!


More information about the Mailman-Developers mailing list