Changeset 795

Show
Ignore:
Timestamp:
02/20/05 16:08:46 (3 years ago)
Author:
MtDewVirus
Message:

Updating for WP 1.5

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • recent-comments/trunk/read_me.txt

    r388 r795  
    11Instructions: 
    22Place the function call wherever you want the recent comments to appear. 
    3 <?php get_recent_comments(); ?> 
     3<?php mdv_recent_comments(); ?> 
    44 
    55Configuration: 
    66You may pass parameters when calling the function to configure some of the options. 
    7 Example: get_recent_comments(10, 7, '', '<br />', true, 1) 
     7Example: mdv_recent_comments(10, 7, '', '<br />', true, 1) 
    88 
    99The parameters: 
     
    1414$show_pass_post - whether or not to display comments from password protected posts 
    1515$comment_style - sets the style of comment to be used 
    16       1 = "CommentorName on PostTitle" with CommentorName being a link to the comment 
    17       0 = "CommentorName: WordsOfComment" with WordsOfComment being a link to the comment 
     16      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  
    22/* 
    33Plugin Name: Recent Comments 
    4 Plugin URI: http://dev.wp-plugins.org/browser/recent-comments
     4Plugin URI: http://mtdewvirus.com/code
    55Description: Retrieves a list of the most recent comments. 
    6 Version: 1.14 
     6Version: 1.15 
    77Author: Nick Momrik 
    88Author URI: http://mtdewvirus.com/ 
    99*/ 
    1010 
    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' "; 
     11function 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' "; 
    1414      if(!$show_pass_post) $request .= "AND post_password ='' "; 
    1515      $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments";