Plugin: User-specific gsconfig settings

After reading this thread I thought it would be useful to have a very simple, small plugin that lets you define user-specific gsconfig settings (for the editor).
Here it is, attached to this post.

You can set user-specific or default settings for GSEDITORTOOL, GSEDITORHEIGHT, GSEDITORLANG and GSEDITOROPTIONS in gsconfig.php.
These settings work the same way as GS default ones but:
- for user-specific settings, prefix them with an underscore plus the user name (e.g. GSEDITORTOOL_name)
- (optional) to define default values for all users, prefix the setting with an underscore (e.g. GSEDITORTOOL_ instead of GSEDITORTOOL)

Note: normal default gsconfig settings for those values must be disabled (removed or commented out, with a # at the beginning of the line). If not, they will override the specific ones.

Examples:

Advanced editor for user name1:

define('GSEDITORTOOL_name1', 'advanced');

Advanced editor for all users, except name1 and name2, that will have the basic one:

define('GSEDITORTOOL_', 'advanced');
define('GSEDITORTOOL_name1', 'basic');
define('GSEDITORTOOL_name2', 'basic');

Download the plugin (Extend)

blog comments powered by Disqus