Page 1 of 1

spamblock - pre set required fields

Posted: Fri Jan 17, 2014 10:40 am
by Timbalu
Before we push out 1.7.5, couldn't we pre-set "name,comment" or "name,email,comment" to spamblocks required fields as default, to have our users benefit by default from modern templates aria-required $.accessifyHtml5.selector = 'article, aside, nav, output, section, [required]'; JS Voodoo?

I know this changes compat, but I can't imagine someone using (or at least wanting to use) comment formfields without any required checks.

What do you think?

Re: spamblock - pre set required fields

Posted: Fri Jan 17, 2014 10:43 am
by garvinhicking
Hi!

We could set that to the introspect 'default' attribute, since this only applies to fresh installations of the plugin and wouldn't affect current user.

Definitely only use "name,comment" because email should not be mandatory.

Regards,
Garvin

Re: spamblock - pre set required fields

Posted: Fri Jan 17, 2014 10:49 am
by Timbalu
That is what I meant, certainly. But this still will happen to alll updaters, wouldn't it, since this is the nature of our plugin system.

Re: spamblock - pre set required fields

Posted: Fri Jan 17, 2014 11:18 am
by garvinhicking
Timbalu wrote:That is what I meant, certainly. But this still will happen to alll updaters, wouldn't it, since this is the nature of our plugin system.
What do you mean? For existing installations, this will not change anything in their plugin setup. Once the plugin configuration has been saved at least once, no default values will ever get used again.

Regards,
Garvin

Re: spamblock - pre set required fields

Posted: Fri Jan 17, 2014 12:06 pm
by Timbalu
Oh - and I really thought to have seen this before, in some of my plugin treatments... But if you define that so clear, I will believe this was some mistake by me. :)

Back to the question:
Before I recognized the behaviour of that "missing array" value, I always believed, spamblock did provide some sort of ("hidden") required fields. That is why I (nearly) never touched this option to play around with it. But some time ago I fell over this issue, comparing a local dev and a live site, with one of them had it set.

I could imagine this untouched option happened to some users out there, without knowing (*), that some modern templates use this sort of magic field Voodoo. For them it would still be nice to have this addition by default, even on update, wouldn't it? (Could also be done easily by $required_fields = $this->get_config('required_fields', 'name,comment');)

(*) I dimly remembered there was something "similar" asked with required fields some time ago http://board.s9y.org/viewtopic.php?f=4&t=19599

Re: spamblock - pre set required fields

Posted: Fri Jan 17, 2014 12:48 pm
by garvinhicking
Hi!

I don't really like forcing new configuration options without user interaction to users, especially not in the 1.7 line. So let's leave it with just the new default value...

Regards,
Garvin