I was asked by my employer to make a company theme for
webmail to match that of our web site (or close to it).
The problem is that handling of "themes" is NOT managed
with a .css file (at least not entirely). There are no
"class=" attributes on BODY, TD, TABLE, etc. tags. For
example it would have been better to specify on the
mailbox listing
<td class="even">
...
<td class='odd'>
to control alternating colours of the rows. If a CSS
class is not defined, its ignored by Mozilla, IE, and
Opera. The whole theme management would be better
served through the correct application of class
attributes through out.
However in order to achieve the minimum required for my
firm's needs, I only modified two files: src/login.php
and src/left_main.php.
The small patch below permits severals things:
src/login.php:
Customisation of the entire look of the login screen
through the creation of a company login plugin in
conjunctions with a company .css file that uses:
a) the login_cookie hook to specify a $theme_css and
set some new variables to disable display elements
b) login_top to insert HTML before the form
c) login_bottom to insert HTML after the form
It also adds to the BODY tag: class="LoginBody" With
the CSS class LoginBody, I can specify style attributes
like "background-image" in the .css file.
src/left_main.php:
The patch adds to the BODY tag: class="LeftMainBody" ,
which again allows the a .css file to specify
interesting style settings like "background-image"
(again) and then in conjuction with a company theme
that hooks left_main_before and left_main_after, HTML
can be inserted to wrap the folders list.
I would appreciate if the Squirrel Mail team would
consider adding this patch to the current stable branch
and incorporate these changes into the development branch.
example: plugins/tas_login/setup.php
Logged In: YES
user_id=184379
I'm also including examples of how these patches were used
by us.
example: themes/tas-theme.php
example: themes/css/tas.css
Replacement for sm-1.2.10.patch (fix typo).
Logged In: YES
user_id=285765
Thanks for the patch. Users who want to can use this on
their setup, but I'm not integrating since we're planning to
implement templating.