WordPress.org

Plugin Directory

wiki:FilosofoCommentsPreview

Filosofo Comments Preview

Filosofo Comments Preview is a WordPress plugin that lets you preview comments on your blog before you submit them. It's easily configurable from the admin control panel, including optional captcha and JavaScript alert features. Templates allow you to adjust the preview page to match the look of the rest of your blog, all from the admin control panel.

Download

Installation Instructions

You must be using WordPress version 1.5 or newer. This plugin also works in WordPress 2.0.

  1. Download the PHP script, or download and extract either the filosofo-comments-preview.zip file or the filosofo-comments-preview.tar.gz file.
  2. Upload the filosofo-comments-preview.php file into your WordPress plugins folder (in www.%your_blog_address%/wp-content/plugins/) and activate it in your control panel.
  3. If your WordPress version is 1.5.1.1 or newer, or if you're using only popup comments with 1.5, then you're done''' (You can find your WordPress version at the bottom of the admin pages for the blog, after logging in to the blog.)

Otherwise (e.g. if it's version 1.5), you'll need to do the following:

Make the following two edits to the comments.php file in your theme. (If you don't have a comments.php file, your theme is probably using the comments.php file in the default theme folder, found at www.%your_blog_address%/wp-content/themes/default/comments.php).

  • Replace this
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    with this:
    <!-- begin filosofo comments preview edit -->
    <?php if (function_exists("filosofo_cp_submitbuttons")) { ?>
    <form action="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/filosofo-comments-preview.php" method="post" id="commentform">
    <?php
    }
    else { ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php } ?>
    <!-- end filosofo comments preview edit -->
    
  • And replace this (yours may say something slightly different from "Submit"):
    <input name="submit"  type="submit"  tabindex="5" value="<?php _e('Submit'); ?>" />
    
    with this:
    <!-- begin replaced buttons -->
    <?php if(function_exists("filosofo_cp_submitbuttons")) { filosofo_cp_submitbuttons('comments.php'); } else {?>
    <input name="submit" type="submit" tabindex="5" value="<?php _e('Submit'); ?>" />
    <?php } ?>
    <!-- end replaced buttons -->
    

What are some of its features?

  • Extremely simple to install with WordPress versions 1.5.1.1 or newer: just activate it.
  • Configurable from the administrative control panel
  • Creates the preview using WordPress comments filters so it looks as would look if published, according to your settings (i.e. smileys, profanity edited, etc.)
  • Also works with pop-up comments.
  • Optional captcha feature, with settings for its size, color, etc.
  • Optionally lists the previous comments at the bottom of the previewed comment page
  • Optional JavaScript warnings when someone tries to submit without entering required fields
  • Button text, class name, and id name can be configured from the admin options page
  • The layout of the preview page can be modified using a template in the admin options page
  • The layout and order of the previous comments can be modified using a template in the admin options page
  • Works in WordPress versions 1.5 and newer, including 2.0.
Last modified 8 years ago Last modified on 08/01/06 19:21:20