Community wiki

Community wiki
Changes for Preferences

1) help-texts and more field-types for the user/default/forced preferences

All apps should use the 3-level preferences and help-texts.
The necessary infrastructure is already implemented in eGW. Please let RalfBecker know if you need other field-types to do so.

2) default / forced preferences via default_records

A new column app_name should be add to phpgw_preferences, to allow apps to set defaults and forced prefs (to not show all possible prefs after a new install) via their <app>/setup/

At the moment the preferences are saved as serialized array, with one rows per user/uid (-1 for default, -2 for forces prefs). The first level of the prefs array is the app-name or 'common' for the general / phpGW wide prefs. To enable apps to easyly set default and forced prefs, I propose to add a new column app_name to the phpgw_preferences table and split up that array on per application rows.

The big opportunity of that change is: app-developers can show only a clear (more simple) selection of preferences (for an easier start with eGW), while still maintain the full flexibility of their app. When the admin (or his users) get's more into eGW he can start changeing the forced prefs. Custom installations or eGW distributions can use a db-image (if setup supports that in the future) to start with different default and forced preferences, instead the ones from the default_records.

'''This is implemented now, any app can insert / update there default/forced prefs via $app/setup/ prefences_owner = -1 (for forced) or -2 (for default).

3) default prefs should be used for not-set preferences too

Atm the default prefs are only used for new users. Then they can be used as a kind of "system defaults" and would work in the context of newly enabled (via removed forced pres) or added preferences too.

'''This is implemented now : Not set user-prefs are labled 'Use default' now, and get the there effectiv value from the default prefs. This works now everytime, and not only when new accounts get created (as it was before).

4) preferences for anonymous users should be saved in a cookie

The wiki does already so and it will be interesting for other apps with anon users too. In spite of 1) this should be done as one serialized array for all apps. If the cookie does not exist, the normal prefs of that anon user are used as default.

Please add your comments here or mail them to RalfBecker

Back to: eGroupWare / DeveloperDocs
You are here