How to manipulate plugin configuration variables ($plugin_cf)
Posted: Wed Sep 27, 2017 10:38 pm
It is not a bug, but a serious issue.
In version previous to 1.7 it was possible to overwrite values of configuration values in plugins on the fly, i.e.
$plugin_cf['plugin_name'].['value']=$new_value
was executed and the plugin configuration changed to a new value. This functionality could be used to change plugins default configuration to alternate behaviour. I used this possibility in many of mine plugins, among other in PHP Viewer where some documents needs to be refreshed frequently (eg sports results) and other never change. in order to satisfy both needs it's necessary to change plugins configuration on some pages, or even the same page displaying to different pdf documents.
The possibility to manipulate configuration variables seems to be gone in CMSimple_XH version 1.7. and I get the warning: "Indirect modification of overloaded element of XH\PluginConfig has no effect", and it really has no effect. Of course it can be solved by passing all configurations values to plugin function but it's against the idea of having configurations variables. Any suggestion how to manipulate plugins configuration variables in version 1.7?
In version previous to 1.7 it was possible to overwrite values of configuration values in plugins on the fly, i.e.
$plugin_cf['plugin_name'].['value']=$new_value
was executed and the plugin configuration changed to a new value. This functionality could be used to change plugins default configuration to alternate behaviour. I used this possibility in many of mine plugins, among other in PHP Viewer where some documents needs to be refreshed frequently (eg sports results) and other never change. in order to satisfy both needs it's necessary to change plugins configuration on some pages, or even the same page displaying to different pdf documents.
The possibility to manipulate configuration variables seems to be gone in CMSimple_XH version 1.7. and I get the warning: "Indirect modification of overloaded element of XH\PluginConfig has no effect", and it really has no effect. Of course it can be solved by passing all configurations values to plugin function but it's against the idea of having configurations variables. Any suggestion how to manipulate plugins configuration variables in version 1.7?