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

Andy Dorman adorman at ironicdesign.com
Wed May 22 23:05:48 UTC 2013


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.

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.

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.

Thank you for such a great system.

-- 
Andy Dorman
FanMail.com
Ironic Design, Inc.
AnteSpam.com, HomeFreeMail.com, ComeHome.net

CONFIDENTIALITY NOTICE: This message is for the named person's use only. 
It may contain confidential, proprietary or legally privileged 
information. No confidentiality or privilege is waived or lost by any 
erroneous transmission. If you receive this message in error, please 
immediately destroy it and notify the sender. You must not, directly or 
indirectly, use, disclose, distribute, or copy any part of this message 
if you are not the intended recipient.



More information about the horde mailing list