[horde] Check on Horde prefs.d/prefs-servername.php Implementation & capability

Jan Schneider jan at horde.org
Thu May 23 11:36:25 UTC 2013


Zitat von Andy Dorman <adorman at ironicdesign.com>:

> This query is about Horde 5.04 (the latest debian package release)
>
> We are trying to set different default theme for different domains  
> BEFORE someone logs in.
>
> Our horde - conf.php has vhosts enabled.
> $conf['vhosts'] = true;
>
> We have set up additional themes as described in  
> http://wiki.horde.org/Doc/Dev/ThemesH5.  For this example the theme  
> directories are named "bulldogs-ABC/", "bulldogs-XYZ/", and  
> "bulldogs-default/"
>
> We finally added prefs-servername.php entries for the base  
> servername and a couple of specific server hostnames that look like  
> these:
>
> prefs-abc.bulldogs.com.php
> ----------------------------
> <?php
>
> // default theme for abc.bulldogs.com
> $_prefs['theme']['value'] = 'bulldogs-ABC';
>
> prefs-xyz.bulldogs.com.php
> ----------------------------
> <?php
>
> // default theme for xyz.bulldogs.com
> $_prefs['theme']['value'] = 'bulldogs-XYZ';
>
> prefs-bulldogs.com.php
> ----------------------------
> <?php
>
> // default theme for bulldogs.com
> $_prefs['theme']['value'] = 'bulldogs-default';
>
>
> In testing we have found the results to be hit-or-miss.  We do not  
> see the Horde default theme when calling these different  
> servernames, but rarely do we see the correct servername theme  
> either.  I suspect caching is the cause of our inconsistent results,  
> we are still checking that.
>
> I just wanted to confirm a couple of things and make sure we are  
> doing this correctly...
>
> 1. Default servername themes WILL work BEFORE login.

They should.

> 2. You can specify hostnames to as many levels as necessary in the  
> prefs.d filenames, ie, both prefs-beta.abc.bulldogs.com.php, or  
> simply prefs-bulldogs.com.php will work.

Yes, as long as it matches exactly the host name that the browser is  
sending. The vhost-specific files shouldn't go into the prefs.d/  
directory though, but right into config/.

> Out of curiosity, does anyone know what will happen if we have  
> defined a theme in prefs-bulldogs.com and someone requests  
> www.bulldogs.com ? Will we get a basic match on the tld and get the  
> bulldogs.com theme?  Of course we can set up Apache/Nginx to  
> redirect www requests, just wondering if we need to.

No, they would just get the default theme.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list