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/
{{kronolith/config/prefs.php}} contains:
// 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' => ''
);
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:
call('contacts/sources');
$value = json_encode(array_keys($sources));
$scope_ob->set($pref, $value);
$scope_ob->setDirty($pref, true);
}
return $value;
}
}
}
Because the prefs_init hook is called each time an user logins, line 12 shall prevent that the value is set to default each time, probably overwriting the user's choice. The empty string is the default value of the {{search_sources}}.
Line 13 collects all address books from Turba, the user has access to. Line 14 prepares the string for the preference. These lines are very preference-specific.
Line 15 and 16 permanently write the settings into the preference storage of the user. The next time the user logins, {{$value}} is no longer empty, hence, the {{if()}} block is skipped and any newly available address books are **not** automatically enabled. If you want to keep the preference unchanged once the user has change the setting manually, remove these two lines.