spamblock - pre set required fields

Creating and modifying plugins.
Post Reply
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

spamblock - pre set required fields

Post 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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: spamblock - pre set required fields

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: spamblock - pre set required fields

Post 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
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply