• Resolved prunly

    (@prunly)


    Hello,

    Thank you for taking up the fight against nasty WP spambots! Currently, I am developing a website that will have two comment forms displayed on each post. One comment type is for reviews (using normal WP comments) and one is for peer reviews (using a custom comment type).

    When I submit a peer review, I get the following error message:
    There was a problem processing your comment.

    How can I get my custom peer review comment form to comply with your plugin? I presumed it would work out of the box since I am using native WP comments functions. The only odd thing I am doing is setting a custom comment type in the peer review form using a hidden field called “extra”.

    Here is the code I am using as the basis for my own custom comment type:
    https://gist.github.com/dbranes/0215762a4cf3db50a6b7

    Many thanks for your help.

    https://www.ads-software.com/plugins/zero-spam/

Viewing 1 replies (of 1 total)
  • Thread Starter prunly

    (@prunly)

    I cracked it. My new comment form uses another ID so the plugin was not appending the zero spam key to the form on submit. The solution was to add the new comment form ID to the b var in the plugin’s zero-spam.min.js file:

    b+=", #commentform_extra",

    However, this patch will have to be applied every time I update the plugin. If zero-spam.min.js was changed to loosen the jQuery selector specificity then all comment forms would be covered, even if a developer changes the comment form ID (id_form parameter) as described in:
    https://codex.www.ads-software.com/Function_Reference/comment_form

    So in the plugin’s zero-spam.min.js file, the following…

    var b="#commentform";

    … would be changed to…

    var b=".comment-form";

    …then all comment forms would always be covered by WPZS. I tested this out and it works for my setup. Of course, I didn’t write your wonderful plugin so I do not understand all the implications this might have but thought it would be worth mentioning.

    Thanks for your hard work in creating this plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘How to comply with Zero Spam when using multiple comment forms’ is closed to new replies.