Required input fields in Spamblock

Creating and modifying plugins.
Post Reply
Carl @ ATS
Regular
Posts: 55
Joined: Fri Jun 07, 2013 11:41 am
Location: Fürstenfeldbruck, Germany
Contact:

Required input fields in Spamblock

Post by Carl @ ATS » Mon Oct 28, 2013 12:01 pm

Hi everyone,

I'm having a bit of trouble with the input-field settings in the Spamblock plug-in. If I set them to "name, email, url, comment", then I get inundated with bogus comments (= spam). If I add the ReplyTo field to the required fields, then I don't get any comments at all. :shock:

I initially thought the lack of comments was just due to my blog being new and not widely known, but a colleague of mine contacted me at the weekend to say he had actually been trying to post a comment, but the blog wouldn't let him. He said this:
"Well, I updated my comment (below) but still can't get it on. The error message says " You did not specify the replyTo field! Your comment could not be added because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measures." But "Reply to" says "Top level" w/ no other option, so I'm confused." [And this is a person who is an experienced software engineer as well as a fellow translator.]

Well, there are two points on my mind here. First of all, as far as I can tell (from trying it out myself), if I select "ReplyTo" as a required input field, then the message my colleague mentioned appears in red each time you try and post a comment. This is both bewildering and annoying because the visitor can see the words "top level" in the entry field, so a setting seems to have been made, yet it doesn't work. In a new blog post without any comments, this is all you can see in the drop-down field, and s9y won't let you enter anything yourself. So you're stuck! And will eventually give up trying to post a comment... :?

Apart from that (and as an aside), why does the ReplyTo field display the words "Top Level"? I don't think this is intuitive to many visitors who don't program themselves; I would personally expect the name of the blog entry to be inserted (and expect this to be done automatically, not manually) since that is what the visitor wants to reply to/comment on. If this can't be changed at the moment, then the words "Top Level" ought to be explained to visitors, if only very briefly. Or they ought to be substituted by "blog post" or something just as clear. After all, this is what "top level" means, and it's more intuitive to laymen than thinking in terms of a hierarchical information structure.

Can anyone advise me what to do to remedy/improve the situation? Have I overlooked something in the settings or is there something wrong with the plug-in? (-> When will it be fixed?) Do I need to change/delete anything in serendipity_event_spamblock.php? Can I change the words "top level" myself to something more intuitive? If so, in what part of which file?

I'm using v1.7.3 of s9y on an Apache server with various versions of PHP installed, the latest being 5.3.18.

Regards

Carl
Attachments
add_comment_input_fields.png
add_comment_input_fields.png (23.45 KiB) Viewed 5582 times

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

Re: Required input fields in Spamblock

Post by Timbalu » Mon Oct 28, 2013 12:59 pm

I tested. Aside you seem to want the homepage field filled, this is the result:
Your comment was successfully added.
Warning: This comment needs approval before it will be displayed
The "replyTo" in the comment form means "reply to a specific comment". That is why it holds that [ Top Level ] and more, if there are some comments to reply to.

So what would I do?
Do not set any specific fields in the SPAMBLOCK Plugin. Then it uses the default, which are: name, email, comment.

To avoid comment SPAM there are better add-ons, then a plain spamblock only plugin. Search for "Bee" and "Bayes" here in the forum.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
onli
Regular
Posts: 2231
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Required input fields in Spamblock

Post by onli » Mon Oct 28, 2013 1:03 pm

Hi
Thanks for the report, this is a bug. But: It is not very useful to mark replyTo as required field, as replyTo always has a value, as it is a dropdown menu in its default interface. So I think the description of this configuration field should be altered, and you should just not set replyTo as required.
Regards

Carl @ ATS
Regular
Posts: 55
Joined: Fri Jun 07, 2013 11:41 am
Location: Fürstenfeldbruck, Germany
Contact:

Re: Required input fields in Spamblock

Post by Carl @ ATS » Mon Oct 28, 2013 4:55 pm

Hi Timbalu and Onli,

Thanks for your comments, both of you. Since ReplyTo doesn't seem to be necessary (even though it's mentioned as one of the possible input fields that can be used in the plug-in), I'll do as Timbalu says and just omit all the options so it picks the default ones.

Another thing I noticed was that the "homepage" input box always appears in the comment form, regardless of whether it is included as an input field - so it appears in the form even if you don't pick it as an option. This behaviour needs to be corrected, too, please.

I'll have a look at the threads on bees and bayes that you mentioned, which I'm sure will be helpful. But I really think effective ways of enabling commenting and avoiding comment spam should be included in s9y's plug-ins and not in information scattered around the forums suggesting workarounds. This material takes time for each of us bloggers to read, digest and apply to our own blogs, whereas if the plug-ins worked properly, all we'd need to do is configure and activate them. I hope this particular plug-in will be revised soon as it's an important one.

Regards

Carl
Attachments
required_comment_fields_spamblock.gif
ReplyTo is mentioned as a possible option
required_comment_fields_spamblock.gif (3.97 KiB) Viewed 5571 times

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

Re: Required input fields in Spamblock

Post by Timbalu » Mon Oct 28, 2013 6:10 pm

Well sorry, my fault. The default is "name, email, url, replyTo, comment". That means, all of them are checked by spam measurements, not being showed in the frontend or not!
If you set "name, email, replyTo, comment" into that spamblock field, the homepage field is still available, but is optional to be filled or not.

I do really wonder, why this isn't asked more often..., since we have that in contactform, but most people seem to live with it without problems. :) (And it is slightly more complicated to re-invent for comments.)
The 2k11 template makes use of showing a required field *, to show, which field is important to be filled by a user. To have this in your template, you need a copy of default/commentform.tpl, do some manual work in the commentform and some php / smarty checks in your templates config.inc.

See useful discussion in here: http://board.s9y.org/viewtopic.php?f=5&t=15632 or see

https://github.com/s9y/Serendipity/blob ... ig.inc.php and
https://github.com/s9y/Serendipity/blob ... ntform.tpl as an example.

Sorry, Spam Bee and Spam Bayes Plugins are offered through Spartacus Event Plugins and do certainly help to understand, what they are supposed to do. Since still "quite new" (in means of Serendipity terms) better handling HowTos have not entered our documentation area yet. We are not enough people to find the time for this too. So, this in mind, there are some interesting discussions in the forum, on how to make best use of bee, spamblock, bayes, about captchas or not, best plugin list placement, etc.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Carl @ ATS
Regular
Posts: 55
Joined: Fri Jun 07, 2013 11:41 am
Location: Fürstenfeldbruck, Germany
Contact:

Re: Required input fields in Spamblock

Post by Carl @ ATS » Mon Oct 28, 2013 7:20 pm

Thanks for your reply, Ian.

Regarding this first point,
Timbalu wrote:If you set "name, email, replyTo, comment" into that spamblock field, the homepage field is still available, but is optional to be filled or not.
... Yes, I understand that now, but visitors who are trying to fill in the comment form won't realise that "homepage" is an optional field, i.e. that they don't have to fill it in, because there's no note there telling them that. And if they don't happen to have a website of their own (which might actually be the case occasionally), then they'll think, "Oh, what should I do?" and may break off commenting altogether. I think it's confusing.

Regarding Spam Bee and Bayes, I'll take a look at the forum threads when I get a chance to and see if I can set up the plug-ins correctly. Thanks for the tips. Are there any "how to's" in German yet? I can read those if there are and they aren't too technical. :shock:

I appreciate your voluntary work on this big software project and the work you all do replying to users' questions. :)

Regards

Carl

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

Re: Required input fields in Spamblock

Post by Timbalu » Mon Oct 28, 2013 8:16 pm

Yes, I surely do understand your concerns about this field issue. But the Plugin Spamblock is only activated and accessed once you have pushed a comment submit, in mean AFTER, not BEFORE. Then it tells you, if anything misses or is not right, or is being successful committed.
There is no other useful way to do this else than using method A (*) (**), in the thread I already posted, and which is the way 2k11 (which is the most modern offered template) is doing it. And this can be done in your personal template only, since the fallback (default) does not have a config.

Any "how to's" in German for bee and bayes, beside forum entries? No, not really. There are some blog posts by grischa and onli, the authors, as far as I remember though.

(*) If you copy default/commentform.tpl to your template, you can easily add any notes on how you have set the required fields, also, which is not so much work and will be pretty the same. :wink:

(**) Actually there is, but this would mean to drop that sort of code for the config.inc to somewhere else in the core, which would assign this to Smarty and to get accessed in the commentform tpls. I think Garvin never thought of doing this for this little enhancement, since it would tear some (more) ressources for all Serendipity users, without them all benefitting.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply