Changeset 9772

Show
Ignore:
Timestamp:
03/29/07 08:00:56 (1 year ago)
Author:
GamerZ
Message:

Recent Post Fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-stats/trunk/stats/stats.php

    r8071 r9772  
    134134            $where = '1=1'; 
    135135      } 
    136     $recentposts = $wpdb->get_results("SELECT $wpdb->posts.*, $wpdb->users.* FROM $wpdb->posts LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author WHERE post_date < '".current_time('mysql')."' AND $where AND post_status = 'publish' AND post_password = '' ORDER  BY post_date DESC LIMIT $limit"); 
     136    $recentposts = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author WHERE post_date < '".current_time('mysql')."' AND $where AND post_status = 'publish' AND post_password = '' ORDER  BY post_date DESC LIMIT $limit"); 
    137137      if($recentposts) { 
    138138            foreach ($recentposts as $post) { 
     
    370370 
    371371 
     372### Function: Change Page Title 
     373if(isset($_GET['stats_author'])) { 
     374      add_filter('wp_title', 'stats_pagetitle'); 
     375} 
     376function stats_pagetitle($content) { 
     377      $comment_author = urldecode(strip_tags(stripslashes(trim($_GET['stats_author'])))); 
     378      $content = $comment_author.' - User Comments'; 
     379      return $content; 
     380} 
     381 
     382 
    372383### Function: Statistics Page 
    373384function stats_page() { 
    374       global $wpdb, $post; 
     385      global $wpdb, $post;                
    375386      // Variables Variables Variables 
    376387      $comment_author = urldecode(strip_tags(stripslashes(trim($_GET['stats_author'])))); 
     
    576587            $temp_stats .= '<p>'.sprintf(__('Displaying <strong>%s</strong> To <strong>%s</strong> Of <strong>%s</strong> Comments', 'wp-stats'), $displayonpage, $maxonpage, $totalcomments).'</p>'; 
    577588 
     589 
    578590            // Get Comments 
    579591            if($gmz_comments) {