To avoid misunderstandings: the change that was introduced with 1.6.5 is the possibility to omit the parentheses and the trailing semicolon. What svasti suggests is to partly revert the change introduced with 1.6, namely that the leading PLUGIN can be replaced with an arbitrary comment.Holger wrote:I was the one voted "never" on that topic for 1.6.5.
That might be worth a separate discussion. It seems to me one of the main goals of CMSimple_XH was to be more user friendly (especially for inexperienced ones); for instance, at least the original functionality of meta_tags and page_params was not really new -- all of it could be done with CMSimple scripting before. hi_pdScripting and the plugin call are alternatives to make CMSimple scripting simpler for more general cases. Why not improve on this, if possible.Holger wrote:IMO we should not try to make everything as much foolproof for inexperienced users as possible.
I have to agree. Probably it would have been better to simply disallow PLUGIN: with XH 1.6, and to disallow the parentheses and the trailing semicolon with XH 1.7. That would have broken resp. would break backwards compatibility, but most likely it could (have) be(en) solved by a small upgrade script (update_content.php).Holger wrote:I'm fine with one (and only one) clear and correct syntax for a plugin-call.
It is not clear for me what to do now. Simply reverting the changes from 1.6.5 would not really solve all issues. Above I gave an example of a plugin call that already would have failed under 1.6.4.
ACK. However, currently that is not necessarily possible, because the plugin call still allows arbitrary PHP expressions for the arguments. For instance, the following would give a fatal error instead of nice error message:Holger wrote:And if something goes wrong, a short error message should be enough.
Code: Select all
{{{PLUGIN:trim(wurst());}}}