On Fri, Jul 25, 2003 at 09:46:47AM -0400, Jesse Guardiani wrote: > My template is void of "hard coded" template colors. I use a pure stylesheet > setup. It works with Netscape 4.x through 7.2 and all other major browsers. > > Rounded corners work fine. > > Take a look: > > http://mail.wingnet.net > > Click on Webmail (New Look). > > User ID: template-test > Passwd: test
Very nice, and of course if Sam takes them as the default templates then we'll use them. [You don't seem to be using frames? There's a good reason for them, see sqwebmail/SECURITY in the source distribution] However we've taken a decision to stick with standard templates as far as possible; it just makes supporting future upgrades so much easier. After all, the only set of templates which are guaranteed to be updated in line with future code releases are the ones which are bundled with sqwebmail itself. We let our users override the graphics and cascade the stylesheet. The graphics overriding is via an Apache mod_rewrite config, which checks for the image in the customer's template directory, and if not there it falls back to the original sqwebmail graphic. I've also made a little frig which lets them write replacement pages for the login screen (and expired.html and invalid.html) but nothing else. Hence when a new release comes out: we just replace the templates and images directories with those in the sqwebmail distribution bundle, and any overrides of images or css which the users have done remain. > I _did_ have to do quite a bit of cludgework to make various browsers happy > though. For example, Netscape 4.x didn't like the default HTML 4 DTD, so I > ripped them all out and replaced them with HTML 3.2 DTDs. Hmm. Netscape 4.x is pretty old, and like you say, it has a whole bunch of problems. If it causes problems with standards compliance going forwards, then I wouldn't worry too much about dropping support for it. After all, even HTML 4 is years old. > But really the only complaint I have is that there is still a bunch of hard coded > CGI HTML that you can't change without patching the source. I'm currently > working on a patch to fix that though. Sounds good, and I look forward to seeing the results. As an aside, have you looked at templating mechanisms like Amrita? These let you completely separate your program logic from your template, whilst the template remains a fully compliant HTML document in its own right. For example, where the [#F#] tag currently writes the folder index with alternating odd/even styles, the template could say: <table id="folderindex" class="folder-nextprev-background"> <div id="rows"> <tr id="odd" bgcolor="#ffffff"> <td id="index">1</td><td id="foldername">Folder name here</td> </tr> <tr id="even" bgcolor="#cccccc"> <td id="index">2</td><td id="foldername">Folder name here</td> </tr> </div> </table> The templating system binds an array to "rows" and repeats it as many times as required. It replaces the text inside the inner tags, like <td id="foldername">...</td> with whatever text is bound to the appropriate element. This is very beautiful, but: (1) it requires parsing of the HTML, rather than a simple string substitution (which for a non-persistent CGI, means either parsing every time, or storing a pre-parsed representation of the HTML tree) (2) it would be a rather substantial rewrite of the rendering portion of sqwebmail!! Regards, Brian.