Skip to content

trouble comment section tips

Violet edited this page Nov 12, 2010 · 1 revision

Comment Section Tips

Comment "Armor"

Inside of the comment form, you can insert a hidden item called "armor." Example: <input type="hidden/ name="armor" id="armor" value="1">.

This works in conjunction with Javascript to dynamically change the form value to a unique hash value that helps add one additional layer of anti-spam security to your comment form. Here is an example using jQuery:

$(function() {
    form = $("#comment_form_identifier_here");
    form.submit(function() {
        $("#armor").val(mt.blog.comments.armor);
        return true;
    });
});

Required Input Names

The comment system uses certain input names to drive its international workings. For example, it assumes that if there is a form element whose name is "post," the user is posting a comment. A submit button with the name "post" will submit a comment; one with the name "preview" will show the user a preview of their comment before it is posted. The other two options are "reply and "reply_preview."

<input name="comment" type="submit"/> will result in the comment script aborting the post.

<input name="post" type="submit"/> will cause the comment script to attempt to post the comment (passing it through spam filters, etc. before finally posting it).

 


Questions, comments, can't find something? Let us know at our community outpost on Get Satisfaction.

Credits

  • Author: Mike Thomsen
  • Edited by: Violet Bliss Dietz
Clone this wiki locally