On Tuesday, Sep 2, 2003, at 04:55 US/Central, Brian Candler wrote:

On Tue, Sep 02, 2003 at 02:33:52AM -0700, rkl wrote:
My biggest concern is avoiding work for all the virtual domain on sqwebmail
upgrade.


Any ideas on managing sqwebmail and implementation for large virtual domain
is appreciated.

My suggestions:


(1) have a separate /images/ directory for each virtual host, but share the
templates. This allows users to replace the images for buttons, and the
background pattern etc, without being able to tamper with the template
structure.

Good thought. This is how I've got my server set up too. As yet though, none of my domains have used the feature. But it's available.



(2) modify the templates so that they cascade: i.e.

  <link rel="stylesheet" type="text/css" href="[#SQWEBMAILCSS#]" />
  <link rel="stylesheet" type="text/css" href="/images/webmail.css" />

Then users can upload 'webmail.css' with just selective overrides to the
default stylesheet, without having to replace the entire 'sqwebmail.css'
which would need to be kept up-to-date on each new release of sqwebmail.

Not a bad idea. I hadn't yet considered doing this for my domains -- because they've not really been that interested in messing with the CSS anyway. But adding a second CSS file is a nice idea of something to put in place... to be ahead of the demand. =)



I also remove the fixed sizes for the navigation buttons, which allows them
to be replaced with other sizes of image. The following script fixes up the
templates:


cd sqwebmail/html/en-us &&
for i in *.html; do \
mv $i $i.prev; \
sed \
-e '/\[#SQWEBMAILCSS#\]/p;s%%/images/webmail.css%' \
-e 's/,width=28 height=20 /,/' \
$i.prev >$i; \
rm $i.prev; \
done

But realize that only the old templates (prior to 3.6.0) should be using unquoted attributes for width and height. The search string for the newer templates would include quotes in the second substitution (-e) line of that script.



(3) allow your users to write their own login page, which posts the
username/password to sqwebmail. They can prettify this as much as they like.

But this is a bit awkward as you would need to enable separate template directories just to handle this, wouldn't you? I mean, sqwebmail actually handles returning the page content itself, rather than letting Apache (or whatever server) find the appropriate file... because even on the login page, it has to do code replacements of various strings. Am I missing something?


And finally, it should be noted that there are (I believe) 3 different pages that produce the same "login page layout" as the primary login page.

One's the primary one, the other 2 are error pages of some sort, IIRC. -- Anyway, you should look around for all pages with the same layout if you want to give them control over the "login page" appearance. ... I believe that the form field names, logindomain replacement string, and logo/signin images are probably each unique to those pages.

But as I said, I think you have to implement multiple template directories to make this work to begin with. Of course, maybe there's a way around that which I'm just not considering, and I'd like to hear about it if so.

-jab


Regards,

Brian.




Reply via email to