[Mailman-Developers] [PATCH] logo disabling, and extra "<BODY " tag

Adi Fairbank adi@adiraj.org
Sun, 14 Apr 2002 21:25:25 -0700


This is a multi-part message in MIME format.
--------------7DEEFCB53E2C4EFDB71AE69F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here are two quick patches I made (both against version 2.0.8):

First one is a new feature which makes it easy to disable display of sponsor
logos (I don't know if you wanted this to be so easy or not, but here it
is).

Second one is a minor bugfix which removes an extra "<BODY " tag in
htmlformat.Document.Format().  Looks like a typo.

Also, I started doing some work on making it easy to private-label Mailman. 
Then I noticed a patch has already been submitted (Request ID 401383 on
sourceforge) which looks like it does what I wanted (using two new variables
GLOBAL_HEADER and GLOBAL_FOOTER).  However I don't see this patch in the
current release 2.0.9.  Are there plans to add this patch, or is it still
being worked on?  Is it in the 2.1 versions?

Thanks,
-Adi
--------------7DEEFCB53E2C4EFDB71AE69F
Content-Type: text/plain; charset=us-ascii;
 name="mailman-disablelogos.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mailman-disablelogos.patch"

--- Mailman/Defaults.py.in~	Sun Apr  7 01:14:57 2002
+++ Mailman/Defaults.py.in	Tue Apr  9 21:13:35 2002
@@ -40,11 +40,12 @@
 # Should image logos be used?  Set this to false to disable image logos from
 # "our sponsors" and just use textual links instead.  Otherwise, this should
 # contain the URL base path to the logo images (and must contain the trailing
-# slash)..  If you want to disable Mailman's logo footer altogther, hack
-# Mailman/htmlformat.py:MailmanLogo(), which also contains the hardcoded links
-# and image names.
+# slash)..
 IMAGE_LOGOS = '/icons/'
 
+# If you want to disable Mailman's logo footer altogther
+DISABLE_SPONSOR_LOGOS = 0
+
 # Don't change MAILMAN_URL, unless you want to point it at the list.org
 # mirror.
 MAILMAN_URL = 'http://www.gnu.org/software/mailman/mailman.html'
--- Mailman/htmlformat.py~	Sun Apr  7 01:14:57 2002
+++ Mailman/htmlformat.py	Tue Apr  9 21:14:07 2002
@@ -515,6 +515,8 @@
 
 
 def MailmanLogo():
+    if mm_cfg.DISABLE_SPONSOR_LOGOS:
+        return ''
     t = Table(border=0, width='100%')
     if mm_cfg.IMAGE_LOGOS:
         def logo(file):


--------------7DEEFCB53E2C4EFDB71AE69F
Content-Type: text/html; charset=us-ascii;
 name="mailman-extrabodybug.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mailman-extrabodybug.patch"

--- Mailman/htmlformat.py~	Sun Apr  7 01:14:57 2002
+++ Mailman/htmlformat.py	Tue Apr  9 21:45:02 2002
@@ -278,7 +278,6 @@
         if self.title:
             output.append('%s<TITLE>%s</TITLE>' % (tab, self.title))
         output.append('%s</HEAD>' % tab)
-        output.append('%s<BODY' % tab)
 	quals = []
 	for k, v in kws.items():
 	    quals.append('%s="%s"' % (k, v))


--------------7DEEFCB53E2C4EFDB71AE69F--