WordPress.org

Plugin Directory

Changeset 350160


Ignore:
Timestamp:
02/24/11 02:47:54 (3 years ago)
Author:
webgrrrl
Message:

Committing and tagging v.1.4.2

Location:
top-commentators-widget
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • top-commentators-widget/trunk/readme.txt

    r345914 r350160  
    44Tags: comments, widget, seo, sidebar 
    55Requires at least: 2.8 
    6 Tested up to: 3.0.5 
    7 Stable tag: 1.4.1 beta 
     6Tested up to: 3.1 
     7Stable tag: 1.4.2 
    88 
    99Adds a sidebar widget to show the top commentators in your WP site. Adapted from Show Top Commentators plugin at Personal Financial Advice. 
     
    1111== Description == 
    1212 
    13 1.4.1 beta = MAJOR CODE REWRITE! This may break any customized CSS you may have on TCW. Read the Changelog as well as http://webgrrrl.net/tags/tcw for the latest news on this widget (especially v.1.4). 
    14 The Top Commentators Widget a sidebar widget to show the top commentators in your WP site. Adapted from Show Top Commentators plugin at Personal Financial Advice, this widget is easier to manage via the control form (no need to edit the PHP file); additional options are also available to make it more flexible. Read the FAQ section on how to customize the widget, and take a look at the screen shot to see the control form for customizing the Top Commentators Widget. 
     13The Top Commentators Widget a sidebar widget to show the top commentators in your WP site. Adapted from Show Top Commentators plugin at Personal Financial Advice, this widget is easier to manage via the control form (no need to edit the PHP file); additional options are also available to make it more flexible. Read the FAQ section on how to customize the widget. Read the Changelog as well as http://webgrrrl.net/tags/tcw for the latest news on this widget. 
    1514 
    1615== Installation == 
     
    3332 
    3433== Changelog == 
     34 
     35= v.1.4.2 = 
     361. Further improved query against URL hijacking (searching based on e-mail instead of username). 
    3537 
    3638= v.1.4.1 beta = 
  • top-commentators-widget/trunk/topcommentators_widget.php

    r345914 r350160  
    33Description: Adds a sidebar widget to show the top commentators in your WP site. Adapted from Show Top Commentators plugin.   
    44Author: Lorna Timbah (WebGrrrl.net) 
    5 Version: 1.4.1 beta 
     5Version: 1.4.2 
    66Author URI: http://webgrrrl.net  
    77Plugin URI: http://webgrrrl.net/archives/my-top-commentators-widget-quick-dirty.htm 
     
    9898        // start grouping setup 
    9999    if($instance['groupBy'] == "0") { 
    100             $groupBy = " GROUP BY comment_author"; 
     100      $groupBy = "comment_author"; 
    101101        } else { 
    102             $groupBy = " GROUP BY comment_author_email"; 
     102            $groupBy = "comment_author_email"; 
    103103        } 
    104104        $showInHome = $instance['showInHome']; 
     
    122122    $writeList .= $listStart . "\n"; 
    123123    global $wpdb; 
    124     $commenters = $wpdb->get_results("SELECT COUNT(comment_author) AS comment_comments, comment_author, comment_author_url, comment_author_email  
     124    $commenters = $wpdb->get_results("SELECT COUNT($groupBy) AS comment_comments, comment_author, comment_author_url, comment_author_email  
    125125      FROM $wpdb->comments 
    126126      WHERE comment_type != 'pingback' 
     
    132132      $filterEmail 
    133133      $onlyWithUrl 
    134       $groupBy 
     134      GROUP BY $groupBy 
    135135      ORDER BY comment_comments DESC, comment_author 
    136136      "); 
     
    141141      foreach ($commenters as $k) { 
    142142        $url = $wpdb->get_var("SELECT comment_author_url FROM $wpdb->comments 
    143           WHERE comment_author = '".addslashes($k->comment_author)."' 
     143          WHERE comment_author_email = '".addslashes($k->comment_author_email)."' 
    144144          AND comment_author_url != 'http://' 
    145145          AND comment_approved = 1 
Note: See TracChangeset for help on using the changeset viewer.