XH 1.6: Checkboxes in configuration

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
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

XH 1.6: Checkboxes in configuration

Post by Holger » Sat Oct 12, 2013 9:14 pm

Hi devs,

the new possibilities in the configuration dialogs of 1.6 are really cool :) .
But I think a unchecked checkbox should result in a "false" string in $cf / $plugin_cf instead of an empty string.
That would make things easier if you want to use the variable for example in the inits of the editors.

Holger

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

Re: XH 1.6: Checkboxes in configuration

Post by cmb » Sun Oct 13, 2013 11:42 am

Holger wrote:But I think a unchecked checkbox should result in a "false" string in $cf / $plugin_cf instead of an empty string.
The current choice of the values of boolean options was driven by compatibility reasons regarding existing plugins, see http://www.cmsimpleforum.com/viewtopic. ... 165#p30581. Using "false" would break with the first way to check for boolean options. I don't know whether anybody else except me uses this way to test for boolean options, though, but it seems to be a reasonable choice considering the type juggling rules for converting strings to boolean.
Holger wrote:That would make things easier if you want to use the variable for example in the inits of the editors.
I'm not sure if I get this point. Can you give an example, please?
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: XH 1.6: Checkboxes in configuration

Post by Holger » Wed Oct 16, 2013 9:52 am

cmb wrote:Using "false" would break with the first way to check for boolean options.
Of course.
Sorry, stupid suggestion. Just forget it :roll: .

Post Reply