In my plugins I've been calling a function in the plugin init of:
class plugin_name extends rcube_plugin {
public function init() { _load_config(); }
private function _load_config() { include('config.inc.php'); $this->config = (array) $_config; }
}
with the config in plugins/plugin_name/config.inc.php with the content:
$_config = array(); $_config['plugin_var'] = 'plugin_var_value'; ...
Why not extend the rcube_plugin class to do something similar? I'm thinking along the same lines as the localization texts. It keeps the config file localized to the plugins/plugin_name/ directory and would follow the same thought process as plugins/plugin_name/localization/. I think that value added by keeping similar functionality by keeping the learning curve for the api shallow.
Per user customization can be done similar to the example in the subscriptions_option plugin.