XH 1.7: Facilitate editing of hidden config options

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 1.7: Facilitate editing of hidden config options

Post by cmb » Mon Mar 02, 2015 8:24 pm

Hello Community,

svasti came up with the idea a while ago to offer a button to display hidden config option in the configuration forms. Basically, I think it would be nice to have this feature. One issue I see is that we don't have the field types available for hidden options (they're either hidden or bool/enum etc.)

Thoughts?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: Facilitate editing of hidden config options

Post by svasti » Tue Mar 03, 2015 8:20 pm

I think there may be hidden settings, which should not be altered and should remain hidden. Thus I wouldn't change this config option.
However a new type "advanced" or something similar might be introduced, which will only be displayed after clicking a button "advanced options" that could be placed at the end of the settings. Usage could be something like "advanced:bool", or "advanced|bool", or "advanced|enum:bla blub", "advanced|function:myNewFunction".

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

Re: XH 1.7: Facilitate editing of hidden config options

Post by cmb » Tue Mar 03, 2015 8:38 pm

svasti wrote:I think there may be hidden settings, which should not be altered and should remain hidden.
If some settings should not be altered, why having them as settings at all? If it is for backward compatibility purposes, it wouldn't be a problem to hard-code them in cms.php (as already done with $cf['scripting']['regexp'], for instance).
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: Facilitate editing of hidden config options

Post by svasti » Tue Mar 03, 2015 9:00 pm

I just though about usage of this option in plugins. Probably it's not really necessary in plugins.
So instead ot adding "advanced" one could have at the end of the config a button: "show hidden settings"?

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

Re: XH 1.7: Facilitate editing of hidden config options

Post by cmb » Tue Mar 03, 2015 10:04 pm

svasti wrote:I just though about usage of this option in plugins. Probably it's not really necessary in plugins.
It appears to me that it doesn't make much of a difference, if any, whether that is for the core or plugins. A plugin that has a setting that never should be edited, could also hard-code it (maybe as a constant or a variable).

Ah, maybe you're referring to something like $plugin_cf['memberpages']['version']. Um, not sure how to handle that. :?
svasti wrote:So instead ot adding "advanced" one could have at the end of the config a button: "show hidden settings"?
That is how I understood your original suggestion, and I think that would be quite sensible.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: sprint #4

Post by svasti » Tue May 05, 2015 2:54 pm

cmb wrote:I would prefer to have some patch available before voting
just thinking how it could be done...?
What about adding another type to the form fields, e.g. advanced.

Code: Select all

case 'advanced':
return '<button type="button" name="' . $iname . '" onClick="'
Javascript which turns hidden fields into some kind of text fields '">Advanced settings</button>';
This way it could also be used by plugins in future.
Last edited by cmb on Tue May 05, 2015 6:52 pm, edited 1 time in total.
Reason: moved from sprint #4 thread, to keep the discussion focused

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

Re: XH 1.7: Facilitate editing of hidden config options

Post by cmb » Tue May 05, 2015 6:59 pm

svasti wrote:What about adding another type to the form fields, e.g. advanced.
I would prefer to add the info that the field is special, instead of introducing a new type. This way it still would be possible to use the field types for the "advanced" fields; something like your previous suggestion might be best.

I'm still not sure, though, whether there should be "advanced" and "hidden" settings. Actually, that would be 3 levels (+ hardcoded settings in the code), and that seems to be overkill.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: Facilitate editing of hidden config options

Post by svasti » Tue May 05, 2015 7:36 pm

cmb wrote:I would prefer to add the info that the field is special
you're right. But how should it look like for the user?
May be on top of the lower "save" button another button?

The alternative is to skip the advanced options. In this case however I'd propose not to hide certain possibly important options, like $cf['mailform']['lf_only'].
Recently again I had to help someone who's mailform started sending base64 after upgrade to 1.6.6

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

Re: XH 1.7: Facilitate editing of hidden config options

Post by cmb » Tue May 05, 2015 8:06 pm

svasti wrote:But how should it look like for the user?
May be on top of the lower "save" button another button?
With "on top" you probably mean in y direction (not z direction); then yes, that seems to be reasonable.
svasti wrote:In this case however I'd propose not to hide certain possibly important options, like $cf['mailform']['lf_only'].
I still think that two levels (generally available options + advanced/hidden options) are sufficient. If we introduce "advanced", we should deprecate "hidden".
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: Facilitate editing of hidden config options

Post by svasti » Tue May 05, 2015 9:22 pm

cmb wrote:you probably mean in y direction
yes
cmb wrote:I still think that two levels (generally available options + advanced/hidden options) are sufficient. If we introduce "advanced", we should deprecate "hidden".
Of course, sorry, I was using advanced and hidden synonymously.
What should be written on the button? "hidden settings"? "advanced settings"? "special settings"?

Post Reply