[commits] [Wiki] created: CustomizingPreferencesH5

Wiki Guest wikiguest at horde.org
Thu Mar 6 07:58:26 UTC 2014


guest [194.95.66.21]  Thu, 06 Mar 2014 07:58:26 +0000

Created page: http://wiki.horde.org/CustomizingPreferencesH5

+ User Contributed Preferences

Perhaps the greatest feature of Horde and all of it's modules is the  
flexibility to adapt to a myriad of different uses and I would expect  
that eventually, a more integrated system of managing 'defaults' will  
become part of the code but at this moment in time, the only way to  
effect settings system wide is to edit the various prefs.php file  
inside each module.

In general: Add any local changes to a prefs.local.php or a  
prefs.d/<name>,php file. Never change prefs.php because this file is  
overwritten on upgrade and contains vital system information about the  
preferences that must match the other parts of the system. For instance,

{{kronolith/config/prefs.php}} contains:
<code type="php">
// Address book(s) to use when expanding addresses ``
// Refer to turba/config/sources.php for possible source values
//
// You can provide default values this way:
//   'value' => json_encode(array('source_one', 'source_two'))
$_prefs['search_sources'] = array(
     'value' => ''
);
</code>

To change the default value add the following PHP code to either  
{{kronolith/config/prefs.local.php}} or  
{{kronolith/config/prefs.d/**name**.php}} {{name}} can be any name you  
like, I prefer the local hostname:
<code type="php">
<?PHP
$_prefs['search_sources']['value'] = '["favourites"]';
</code>



More information about the commits mailing list