Changeset 2412
- Timestamp:
- 06/24/05 22:50:46 (3 years ago)
- Files:
-
- recent-comments/branches/wp-1.5/recent-comments.php (modified) (3 diffs)
- recent-comments/trunk/recent-comments.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
recent-comments/branches/wp-1.5/recent-comments.php
r1356 r2412 4 4 Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/ 5 5 Description: Retrieves a list of the most recent comments. 6 Version: 1.1 66 Version: 1.18 7 7 Author: Nick Momrik 8 8 Author URI: http://mtdewvirus.com/ … … 11 11 function mdv_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) { 12 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'";13 $request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN ('publish','static') "; 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"; … … 26 26 $comment_excerpt = join(" ",array_slice($words,0,$comment_lenth)); 27 27 $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID; 28 28 29 if ($comment_style == 1) { 29 30 $post_title = stripslashes($comment->post_title); 30 $output .= $before . comment_author_link() . ' on ' . $post_title . '.' . $after; 31 32 $url = $comment->comment_author_url; 33 34 if (empty($url)) 35 $output .= $before . $comment_author . ' on ' . $post_title . '.' . $after; 36 else 37 $output .= $before . "<a href='$url' rel='external'>$comment_author</a>" . ' on ' . $post_title . '.' . $after; 31 38 } 32 39 else { recent-comments/trunk/recent-comments.php
r1356 r2412 4 4 Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/ 5 5 Description: Retrieves a list of the most recent comments. 6 Version: 1.1 66 Version: 1.18 7 7 Author: Nick Momrik 8 8 Author URI: http://mtdewvirus.com/ … … 11 11 function mdv_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) { 12 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'";13 $request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN ('publish','static') "; 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"; … … 26 26 $comment_excerpt = join(" ",array_slice($words,0,$comment_lenth)); 27 27 $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID; 28 28 29 if ($comment_style == 1) { 29 30 $post_title = stripslashes($comment->post_title); 30 $output .= $before . comment_author_link() . ' on ' . $post_title . '.' . $after; 31 32 $url = $comment->comment_author_url; 33 34 if (empty($url)) 35 $output .= $before . $comment_author . ' on ' . $post_title . '.' . $after; 36 else 37 $output .= $before . "<a href='$url' rel='external'>$comment_author</a>" . ' on ' . $post_title . '.' . $after; 31 38 } 32 39 else {
