Changeset 795
- Timestamp:
- 02/20/05 16:08:46 (3 years ago)
- Files:
-
- recent-comments/branches/wp-1.2x (added)
- recent-comments/branches/wp-1.2x/read_me.txt (added)
- recent-comments/branches/wp-1.2x/recent-comments.php (added)
- recent-comments/branches/wp-1.5 (added)
- recent-comments/branches/wp-1.5/read_me.txt (added)
- recent-comments/branches/wp-1.5/recent-comments.php (added)
- recent-comments/trunk/read_me.txt (modified) (2 diffs)
- recent-comments/trunk/recent-comments.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
recent-comments/trunk/read_me.txt
r388 r795 1 1 Instructions: 2 2 Place the function call wherever you want the recent comments to appear. 3 <?php get_recent_comments(); ?>3 <?php mdv_recent_comments(); ?> 4 4 5 5 Configuration: 6 6 You may pass parameters when calling the function to configure some of the options. 7 Example: get_recent_comments(10, 7, '', '<br />', true, 1)7 Example: mdv_recent_comments(10, 7, '', '<br />', true, 1) 8 8 9 9 The parameters: … … 14 14 $show_pass_post - whether or not to display comments from password protected posts 15 15 $comment_style - sets the style of comment to be used 16 1 = "Comment orName on PostTitle" with CommentorName being a link to the comment17 0 = "Comment orName: WordsOfComment" with WordsOfComment being a link to the comment16 1 = "CommenterName on PostTitle" with CommenterName being a link to the comment 17 0 = "CommenterName: WordsOfComment" with WordsOfComment being a link to the comment recent-comments/trunk/recent-comments.php
r493 r795 2 2 /* 3 3 Plugin Name: Recent Comments 4 Plugin URI: http:// dev.wp-plugins.org/browser/recent-comments/4 Plugin URI: http://mtdewvirus.com/code/ 5 5 Description: Retrieves a list of the most recent comments. 6 Version: 1.1 46 Version: 1.15 7 7 Author: Nick Momrik 8 8 Author URI: http://mtdewvirus.com/ 9 9 */ 10 10 11 function get_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) {12 global $wpdb , $tablecomments, $tableposts;13 $request = "SELECT ID, comment_ID, comment_content, comment_author, post_title FROM $ tablecomments LEFT JOIN $tableposts ON $tableposts.ID=$tablecomments.comment_post_ID WHERE post_status = 'publish' ";11 function mdv_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) { 12 global $wpdb; 13 $request = "SELECT ID, comment_ID, comment_content, comment_author, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status = 'publish' "; 14 14 if(!$show_pass_post) $request .= "AND post_password ='' "; 15 15 $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments";
