[dev] horde/apps for virtualhosting with different themes
Atif Ghaffar
aghaffar@developer.ch
Fri, 29 Jun 2001 17:03:55 +0200
Chuck Hagenbuch wrote:
> =
> Quoting Atif Ghaffar <aghaffar@developer.ch>:
> =
> > May I request a function called HordeInclude and to use HordeInclude
> > instead of include?
> =
> It seems like you could get the same effect with a lot less overhead by=
just
> customizing the $conf['paths']['templates'] variable.
Hi Chuck.
Yes you were right.
The trick of customizing this variable did the trick. Also I managed to
get the functionality that I wanted (to check if the customized file
exists and if not load the regular file).
I have set in horde/config/horde.php
$conf['horde']['paths']['templates'] = 'http://' .
$GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'] . '/horde/include.php';
and in horde/imp/conf.php
$conf['paths']['templates'] =
'http://'.$GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'] .
'/horde/imp/include.php';
include.php lives in horde/ and is symlinked later in horde/imp
horde/turba etc.
contents of include.php
--------------------------
<?
$file="./vhost_templates/" . $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']
. "/templates" . $PATH_INFO;
if (!file_exists($file)) $file="./templates" . $PATH_INFO;
echo join ('', file($file));
?>
Thanks for your help.
PS::Feel free to include this trick in Horde and make it an option for
those who want to do this madness..
--
Atif Ghaffar
Internet Development Manager
4unet AG/SA/Ltd.
---------------------------.
+41 21 351 53 60 ¦ voice
+41 79 659 89 72 ¦ mobile
+41 21 254 53 62 ¦ fax
http://www.4unet.net ¦ www
http://www.atifghaffar.com ¦ homepage
atif.ghaffar@4unet.net ¦ email