[horde] Include custom preferences
Juan Asensio Sánchez
okelet at gmail.com
Sat Jul 26 14:00:36 UTC 2008
Ok
It was that. Thank you very much.
I know this is more a question about PHP than Horde, but why?
require_once works equal than require except that "once" does not load
the file if it was loaded previosly. And one more question, why does
require_once work in the rest of the modules?
Thanks in advance.
2008/7/26 Jan Schneider <jan at horde.org>:
> 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/
>
> --
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
More information about the horde
mailing list