I don't know if anyone else will find this usefull, but here
goes.

- Ben

PS I used it to add a logo to the top of some of the web
interface pages for example in listinfo.py

---<snip>---
def FormatListinfoOverview(error=None):
    "Present a general welcome and itemize the (public)
lists for this host."
 
    # XXX We need a portable way to determine the host by
which we are being
    #     visited!  An absolute URL would do...
    http_host = os.environ.get('HTTP_HOST',
os.environ.get('SERVER_NAME'))
    port = os.environ.get('SERVER_PORT')
    # strip off the port if there is one
    if port and http_host[-len(port)-1:] == ':'+port:
        http_host = http_host[:-len(port)-1]
    if mm_cfg.VIRTUAL_HOST_OVERVIEW and http_host:
        host_name = http_host
    else:
        host_name = mm_cfg.DEFAULT_HOST_NAME
 
    doc = Document()
    legend = "%s Mailing Lists" % host_name
    doc.SetTitle(legend)
 
# lets see if we can insert an image at the top of this page
    toplogo =
Img('/mailmanlogos/riders_connection_header.png','750','115',"Ocentrix
Riders' Connection",'0')
    doc.AddItem(toplogo)
 
    table = Table(border=0, width="100%")
 
    table.AddRow([Center(Header(2, legend))])
 
    table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0,
                      colspan=2,
bgcolor="#99ccff")                                                                     
                                       
---</snip>---

htmlformat.py_add_image_class_patch.gz

Reply via email to