'sidebar-left', 'before_widget' => '', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name'=>'sidebar-right', 'before_widget' => '', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name' => 'sidebar-double', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name' => 'footer-column-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name' => 'footer-column-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name' => 'footer-column-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

» ', 'after_title' => '

' )); register_sidebar(array( 'name' => 'footer-column-4', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

» ', 'after_title' => '

' )); } /* Plugin Name: Simple Recent Comments Plugin URI: http://www.g-loaded.eu/2006/01/15/simple-recent-comments-wordpress-plugin/ Description: Shows a list of recent comments. Version: 0.1.2 Author: GNot Author URI: http://www.g-loaded.eu/ */ /* License: GPL Compatibility: All Usage: This plugin returns an unordered list of the most recent comments. It provides a template function you can use: simple_recent_comments(arg1, arg2, 'arg3', 'arg4') Arguments explanation: arg1 (numeric): The number of comments to return. Default: 7 arg2 (numeric): The comment excerpt length. Default: 60 arg3 (alphanumeric): The HTML code to prepend to the list. Default: '
  • Recent Comments

    ' arg4 (alphanumeric): The HTML code to append to the list. Default: '
  • ' Of course it can be used without arguments. In this case the defaults will be used. The default usage of the template function is to place it in the sidebar. I would recommend to use the following way of placing the function in your template: This way, even if you de-activate the plugin in your administration panel, but you do not remove it from your templates, it would not produce any errors. The plugin simply will not function at all and will show nothing. */ /* Copyright (C) George Notaras (http://www.g-loaded.eu/) You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ function simple_recent_comments($src_count=3, $src_length=24, $pre_HTML='', $post_HTML='') { global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $src_count"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; //$output .= "\n"; $output .= $post_HTML; echo $output; } // Create Theme Options Page require_once (TEMPLATEPATH . '/customize.php'); ?>