Additional simplyfication in plugin calls?

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Additional simplyfication in plugin calls?

Post by svasti » Fri May 29, 2015 11:46 pm

Hi everybody,
what about even more simplification of the plugin call?
Namely: allowing the ommission of inverted commas for arguments without space, e.g. {{{flexslider myselfies}}}

I got the idea from css font-family, where inverted commas are only required when the name of the font family contains spaces. The same could be done to plugin calls. The first word is always the name of the plugin, and further words are arguments. Only arguments containing a space would need to be delimited by inverted commas. For other arguments this is logically not really necessary.
Even now, when the argument is a number, inverted commas are not required, e.g. {{{year 2010}}}, why not allow this for strings also?

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Additional simplyfication in plugin calls?

Post by Holger » Sat May 30, 2015 2:50 pm

IMHO all that simplifications are subject of confusing.
I think one -- and only one correct syntax is best practice.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Additional simplyfication in plugin calls?

Post by cmb » Sat May 30, 2015 5:06 pm

svasti wrote:what about even more simplification of the plugin call?
Namely: allowing the ommission of inverted commas for arguments without space, e.g. {{{flexslider myselfies}}}
I'm against this simplification, because it would introduce ambiguities. As it is now, the arguments are not parsed by CMSimple_XH, but are simply passed to PHP's eval. This allows rather complex argument lists; actually, arbitrary expression lists are permitted. The expressions may contain constants, which would not be distinguishable from unquoted strings.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply