[horde] Include custom preferences

Jan Schneider jan at horde.org
Sat Jul 26 13:04:25 UTC 2008


Zitat von Juan Asensio Sánchez <okelet at gmail.com>:

> Hi
>
> I am trying to configure Horde. Now i want to set some default values
> for the users that are different from the default values defined in
> the Horde prefs.php file. I don' want to modify this file, so i
> created a new file called prefs_custom.php
> (horde/config/prefs_custom.php) with this content:
>
> ==========================================
>
> <?php
>
> // user language
> $_prefs['language']['value'] = 'es_ES';
>
> // user time zone
> $_prefs['timezone']['value'] = 'Europe/Madrid';
>
> // time format
> $_prefs['twentyFour']['value'] = true;
>
> // date format
> $_prefs['date_format']['value'] = '%A, %d %B %Y';
>
> // what day should be displayed as the first day of the week?
> $_prefs['first_week_day']['value'] = 1;
>
> ==========================================
>
> And at the end of prefs.php i added this line (in horde/config/prefs.php):
>
> require_once(dirname(__FILE__) . '/prefs_custom.php');
>
> The problem is that Horde does not recognise these new values. When I
> go to the preferences page, the values are the Horde defaults, NOT my
> defaults (i have even recreated the database, tried in many browsers,
> OSs, etc). I have done the same thing with the rest of the modules and
> there it works fine. The problem is only with the default general
> Horde prefs.

Use "require", not "require_once".

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list