spamblock - pre set required fields

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

spamblock - pre set required fields

Post by Timbalu » Fri Jan 17, 2014 11:40 am

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post by garvinhicking » Fri Jan 17, 2014 11:43 am

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/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: spamblock - pre set required fields

Post by Timbalu » Fri Jan 17, 2014 11:49 am

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post by garvinhicking » Fri Jan 17, 2014 12:18 pm

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/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: spamblock - pre set required fields

Post by Timbalu » Fri Jan 17, 2014 1:06 pm

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: spamblock - pre set required fields

Post by garvinhicking » Fri Jan 17, 2014 1:48 pm

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