[pLog-svn] r4218 - in plog/trunk: class/action/admin
class/controller class/dao class/plugin
class/template/smarty/plugins class/view/admin locale templates/admin
Oscar Renalias
oscar at renalias.net
Tue Oct 31 20:53:30 GMT 2006
I forgot to say that plugins do not need to be modified as long as
they fulfil these two conditions:
1) they access their configuration settings via BlogSettings::getValue
() (I think all do)
2) their configuration keys are called plugin_xxx (again, most of
them do)
Basically now BlogSettings::getValue() will always check if the
parameter we're asking for is plugin_xxx. If it is, it will first
check with the GlobalPluginConfig whether the value requested can be
overriden by user settings or not. If it cannot, it will
transparently return the globally set value instead of the one in the
blog settings. If it can be overriden, it will return the value
stored in the blog settings unless it isn't available, in which case
it will return the globally set one.
Easy, isn't it? :)
> Preliminary support for global plugin setting.
>
> This implementation relies on plugins implementing the method
> PluginBase::getPluginConfigurationKeys() and returning an array
> with all the 'public' settings that can be set at a site-wide
> level. Some plugins will just export the 'plugin_xxx_enabled'
> setting while others will export some more settings, it will depend
> on the plugin. The returned array should include the name of the
> key as well as the type and the validator class, if required. I
> will commit a modified version of the 'authimage' and 'hostblock'
> plugin with support for this new feature.
>
> Administrators now have the new "plugin settings" page that will
> list all plugins and for each one of the plugins, their public
> settings. Additionally, for each one of the settings it will be
> possible to tell whether users are allowed to modify the setting or
> not. Right now the UI of this new page is a bit messy as I don't
> know how to arrange the fields, so I would appreciate somebody
> having a look at it...
>
> New blogs will inherit the values configured in the global plugin
> settings page but dependin on the configuration and the setting,
> owners of new blogs will be allowed to modify those settings. This
> means that we can install the 'authimage' plugin, say that
> plugin_authimage_enabled can be modified by users and set its
> default value to true.
>
> At the UI level, there is a new Smarty 'block' plugin that will
> check whether a setting can be overriden by users and disable the
> field. This is not strictly necessary and it's only for the purpose
> of visual feedback. If a field value cannot be overriden because
> administrators have configured it so, deactivating it/activating it
> at the blog level won't make any difference as the global value
> will always take precedence.
>
> I'm sure I'm forgetting something about this new feature but I will
> write about it later on in the wiki :) In the meantime, feel free
> to have it a look (I will commit the modified plugins shortly)
More information about the pLog-svn
mailing list