[horde] Horde, virtual hosting, multiple themes
Diego Rivera
lrivera at racsa.co.cr
Mon Mar 10 19:31:19 PST 2003
I've actually done one sorta-better. The included patch to
'horde/css.php' makes it seek three files when building the css page (in
order of preference):
- HTTP_HOST + "-html.php"
- "html.php"
- "html.php.dist"
It could be enhanced (in fact, I probably will ;) ) to add searcing for
the domain, to allow "inheritance" by including in reverse order : first
the defaults, then the domain-wide, and then the host-wide so that one
can just "modify" an existing theme by changing specific portions
instead of having to create complete theme files.
It does NOT add "domain-wide" files...this could easily be achieved as
well. I'll probably do this later - I have to go now.
It does so not just for horde, but for all apps (see patch for
details). It can be applied to Horde 2.2.1 stock - I don't believe it
breaks anything but if it does, let me know.
Later on I'll include the "force initial language" patch, which has come
in handy for me (I live in a spanish speaking country where most
software, ironically enough, is installed in the english version).
Best
On Mon, 2003-03-10 at 21:20, eculp at encontacto.net wrote:
> Quoting Diego Rivera <lrivera at racsa.co.cr>:
>
> | Is it possible to have Horde/Imp/others use different themes for
> | different virtual host setups?
> |
> | I.e. Instead of including from */config/html.php to include from
> | */config/<vdomain-name>-html.php?
>
> You could easily do something simple by creating a theme for each
> virtual domain like html-domain.com.php in config/themes and then
> in prefs you could set something like the following
>
> $vdomain = strtolower(preg_replace('/^mail\.|^www\.|www\.mail\./i', '', \
> $_SERVER['HTTP_HOST']));
>
> $_prefs['theme'] = array(
> 'value' => 'html-' . $vdomain . '.php',
>
> and everydomain would have its own theme.
>
> |
> | I realize a quick hack to the CSS page could do this (I think), but can
> | it be done without the hack? I'd prefer to NOT do the hack, to keep the
> | codebase as close to the stock codebase as possible.
> |
> | Also, another nice little feature would be the ability to "force" the
> | initial selection of a particular language regardless of the ACCEPTS
> | header...as far as I can tell, you can only lock it down, but the idea
> | is to force the default to one language and allow changing to another if
> | a particular user so desires.
>
> You could do something similar with the language pref.
>
> ed
>
>
>
> |
> | Best
> |
> | --
> | Diego Rivera <lrivera at racsa.co.cr>
> |
> |
> | --
> | Horde mailing list
> | Frequently Asked Questions: http://horde.org/faq/
> | To unsubscribe, mail: horde-unsubscribe at lists.horde.org
> |
>
>
> --
>
>
> -------------------------------------------------
--
Diego Rivera <lrivera at racsa.co.cr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: css.php.patch.bz2
Type: application/x-bzip
Size: 845 bytes
Desc: not available
Url : http://lists.horde.org/archives/horde/attachments/20030310/12f933c0/css.php.patch-0002.bin
More information about the horde
mailing list