Changeset 6318
- Timestamp:
- 08/21/06 06:57:32 (2 years ago)
- Location:
- wp-stats/trunk
- Files:
-
- 4 modified
-
readme.html (modified) (1 diff)
-
stats/stats-options.php (modified) (2 diffs)
-
stats/stats-widget.php (modified) (1 diff)
-
stats/stats.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-stats/trunk/readme.html
r6304 r6318 217 217 <b>Version 2.05 (01-10-2006)</b> 218 218 <ul> 219 <li>NEW: Allow You To Choose Which Type Of Stats To Display Under Options -> Stats</li> 219 220 <li>NEW: Stats Is Now Embedded Into A Page, And Hence No More Integrating Of Stats Page</li> 220 221 <li>NEW: Added Widget Title Option To WP-Stats Widget</li> -
wp-stats/trunk/stats/stats-options.php
r6295 r6318 21 21 $base_name = plugin_basename('stats/stats-options.php'); 22 22 $base_page = 'admin.php?page='.$base_name; 23 $stats_mostlimit = intval(get_settings('stats_mostlimit')); 24 $stats_display = get_settings('stats_display'); 23 25 24 26 ### If Form Is Submitted 25 27 if($_POST['Submit']) { 26 28 $stats_url = addslashes(trim($_POST['stats_url'])); 29 $stats_mostlimit = intval(trim($_POST['stats_mostlimit'])); 30 $stats_display = $_POST['stats_display']; 31 if($stats_display) { 32 foreach($stats_display as $stat_display) { 33 $stat_display = addslashes($stat_display); 34 $stats_display_array[$stat_display] = 1; 35 } 36 } 37 $stats_display = $stats_display_array; 27 38 $update_stats_queries = array(); 28 39 $update_stats_text = array(); 29 40 $update_stats_queries[] = update_option('stats_url', $stats_url); 41 $update_stats_queries[] = update_option('stats_mostlimit', $stats_mostlimit); 42 $update_stats_queries[] = update_option('stats_display', $stats_display); 30 43 $update_stats_text[] = __('Stats URL'); 44 $update_stats_text[] = __('Stats Most Limit'); 45 $update_stats_text[] = __('Stats Display Options'); 31 46 $i=0; 32 47 $text = ''; … … 55 70 </td> 56 71 </tr> 72 <tr valign="top"> 73 <th align="left" width="30%"><?php _e('Stats Most Limit'); ?></th> 74 <td align="left"> 75 <input type="text" name="stats_mostlimit" value="<?php echo $stats_mostlimit ?>" size="2" /><br />Top X Stats, where X is the most limit. 76 </td> 77 </tr> 78 <tr valign="top"> 79 <th align="left" width="30%"><?php _e('Type Of Stats To Display'); ?></th> 80 <td align="left"> 81 <p><b>General Stats</b></p> 82 <input type="checkbox" name="stats_display[]" value="total_stats"<?php checked(1, $stats_display['total_stats']); ?> /> Total<br /> 83 <p><b>Plugin Stats</b></p> 84 <?php 85 if(function_exists('wp_email')) { 86 echo '<input type="checkbox" name="stats_display[]" value="email"'; 87 checked(1, $stats_display['email']); 88 echo ' /> WP-EMail<br />'."\n"; 89 } 90 if(function_exists('get_poll')) { 91 echo '<input type="checkbox" name="stats_display[]" value="polls"'; 92 checked(1, $stats_display['polls']); 93 echo ' /> WP-Polls<br />'."\n"; 94 } 95 if(function_exists('the_ratings')) { 96 echo '<input type="checkbox" name="stats_display[]" value="ratings"'; 97 checked(1, $stats_display['ratings']); 98 echo ' /> WP-PostRatings<br />'."\n"; 99 } 100 if(function_exists('the_views')) { 101 echo '<input type="checkbox" name="stats_display[]" value="views"'; 102 checked(1, $stats_display['views']); 103 echo ' /> WP-PostViews<br />'."\n"; 104 } 105 if(function_exists('useronline')) { 106 echo '<input type="checkbox" name="stats_display[]" value="useronline"'; 107 checked(1, $stats_display['views']); 108 echo ' /> WP-UserOnline<br />'."\n"; 109 } 110 ?> 111 <p><b>Top <?php echo get_settings('stats_mostlimit'); ?> Stats</b></p> 112 <input type="checkbox" name="stats_display[]" value="recent_posts"<?php checked(1, $stats_display['recent_posts']); ?> /> <?php echo $stats_mostlimit ?> Most Recent Posts<br /> 113 <input type="checkbox" name="stats_display[]" value="recent_commtents"<?php checked(1, $stats_display['recent_commtents']); ?> /> <?php echo $stats_mostlimit ?> Most Recent Comments<br /> 114 <input type="checkbox" name="stats_display[]" value="commented_post"<?php checked(1, $stats_display['commented_post']); ?> /> <?php echo $stats_mostlimit ?> Most Commented Posts<br /> 115 <?php 116 if(function_exists('wp_email')) { 117 echo '<input type="checkbox" name="stats_display[]" value="emailed_most"'; 118 checked(1, $stats_display['emailed_most']); 119 echo ' /> '.$stats_mostlimit.' Most Emailed Posts<br />'."\n"; 120 } 121 if(function_exists('the_ratings')) { 122 echo '<input type="checkbox" name="stats_display[]" value="rated_highest"'; 123 checked(1, $stats_display['rated_highest']); 124 echo ' /> '.$stats_mostlimit.' Highest Rated Posts<br />'."\n"; 125 echo '<input type="checkbox" name="stats_display[]" value="rated_most"'; 126 checked(1, $stats_display['rated_most']); 127 echo ' /> '.$stats_mostlimit.' Most Rated Posts<br />'."\n"; 128 } 129 if(function_exists('the_views')) { 130 echo '<input type="checkbox" name="stats_display[]" value="viewed_most"'; 131 checked(1, $stats_display['viewed_most']); 132 echo ' /> '.$stats_mostlimit.' Most Viewed Posts<br />'."\n"; 133 } 134 ?> 135 <p><b>Authors Stats</b></p> 136 <input type="checkbox" name="stats_display[]" value="authors"<?php checked(1, $stats_display['authors']); ?> /> Authors<br /> 137 <p><b>Comments' Members Stats</b></p> 138 <input type="checkbox" name="stats_display[]" value="comment_members"<?php checked(1, $stats_display['comment_members']); ?> /> Comment Members<br /> 139 <p><b>Misc Stats</b></p> 140 <input type="checkbox" name="stats_display[]" value="post_cats"<?php checked(1, $stats_display['post_cats']); ?> /> Post Categories<br /> 141 <input type="checkbox" name="stats_display[]" value="link_cats"<?php checked(1, $stats_display['link_cats']); ?> /> Link Categories<br /> 142 </td> 143 </tr> 57 144 </table> 58 145 </fieldset> -
wp-stats/trunk/stats/stats-widget.php
r6295 r6318 224 224 echo '<p style="text-align: left;"><label for="most_limit">Most Limit:</label> '."\n"; 225 225 echo '<p style="text-align: left;"><input type="text" id="most_limit" name="most_limit" value="'.$options['most_limit'].'" size="2" maxlength="2" /></p>'."\n"; 226 echo '<p style="text-align: left;"><label for="show_link">Show Link To Full Stats (wp-stats.php)?</label> '."\n";226 echo '<p style="text-align: left;"><label for="show_link">Show Link To Full Stats?</label> '."\n"; 227 227 echo '<p style="text-align: left;">'; 228 228 echo '<input type="radio" id="show_link" name="show_link" value="1"'; -
wp-stats/trunk/stats/stats.php
r6305 r6318 42 42 ### Display WP-Stats Admin Page 43 43 function display_stats() { 44 ?> 45 <!-- General Stats --> 46 <div class="wrap"> 47 <h2>General Stats</h2> 48 <p><b>Total Stats</b></p> 49 <ul> 50 <li><b><?php get_totalauthors(); ?></b> Authors To This Blog.</li> 51 <li><b><?php get_totalposts(); ?></b> Posts Were Posted.</li> 52 <li><b><?php get_totalpages(); ?></b> Pages Were Created.</li> 53 <li><b><?php get_totalcomments(); ?></b> Comments Were Posted.</li> 54 <li><b><?php get_totalcommentposters(); ?></b> Different Nicks Were Represented In The Comments.</li> 55 <li><b><?php get_totallinks(); ?></b> Links Were Added.</li> 56 </ul> 57 </div> 58 59 <!-- Plugin Stats --> 60 <div class="wrap"> 61 <h2>Plugins Stats</h2> 62 <!-- WP-EMail Stats --> 63 <?php if(function_exists('wp_email')): ?> 64 <p><b>WP-EMail</b></p> 65 <ul> 66 <li><b><?php get_emails(); ?></b> Emails Were Sent.</li> 67 <li><b><?php get_emails_success(); ?></b> Emails Were Sent Successfully.</li> 68 <li><b><?php get_emails_failed(); ?></b> Emails Failed To Send.</li> 69 </ul> 70 <?php endif; ?> 71 <!-- WP-Polls Stats --> 72 <?php if(function_exists('get_poll')): ?> 73 <p><b>WP-Polls</b></p> 74 <ul> 75 <li><b><?php get_pollquestions(); ?></b> Polls Were Created.</li> 76 <li><b><?php get_pollanswers(); ?></b> Polls' Answers Were Given.</li> 77 <li><b><?php get_pollvotes(); ?></b> Votes Were Casted.</li> 78 </ul> 79 <?php endif; ?> 80 <!-- WP-PostRatings Stats --> 81 <?php if(function_exists('the_ratings')): ?> 82 <p><b>WP-PostRatings</b></p> 83 <ul> 84 <li><b><?php get_ratings_votes(); ?></b> Votes Were Casted.</li> 85 <li><b><?php get_ratings_users(); ?></b> Users Casted Their Vote.</li> 86 </ul> 87 <?php endif; ?> 88 <!-- WP-PostViews Stats --> 89 <?php if(function_exists('the_views')): ?> 90 <p><b>WP-PostViews</b></p> 91 <ul> 92 <li><b><?php get_totalviews(); ?></b> Views Were Generated.</li> 93 </ul> 94 <?php endif; ?> 95 <!-- WP-UserOnline Stats --> 96 <?php if(function_exists('useronline')): ?> 97 <p><b>WP-UserOnline</b></p> 98 <ul> 99 <li><?php get_useronline(); ?> Now.</li> 100 <li>Most users ever online was <b><?php get_most_useronline(); ?></b>.</li> 101 <li>On <b><?php get_most_useronline_date(); ?></b>.</li> 102 </ul> 103 <?php endif; ?> 104 </div> 105 106 <!-- Top 10 Stats--> 107 <div class="wrap"> 108 <h2>Top 10 Stats</h2> 109 <!-- 10 Recent Posts --> 110 <p><b>10 Recent Posts</b></p> 111 <ul> 112 <?php get_recentposts(); ?> 113 </ul> 114 <!-- 10 Recent Comments --> 115 <p><b>10 Recent Comments</b></p> 116 <ul> 117 <?php get_recentcomments(); ?> 118 </ul> 119 <!-- 10 Most Commented Post --> 120 <p><b>10 Most Commented Post</b></p> 121 <ul> 122 <?php get_mostcommented(); ?> 123 </ul> 124 <!-- WP-EMail (10 Most EMailed Post) --> 125 <?php if(function_exists('wp_email')): ?> 126 <p><b>10 Most Emailed Post</b></p> 127 <ul> 128 <?php get_mostemailed(); ?> 129 </ul> 130 <?php endif; ?> 131 <!-- WP-PostRatings (10 Highest Rated Post) --> 132 <?php if(function_exists('the_ratings')): ?> 133 <p><b>10 Highest Rated Post</b></p> 134 <ul> 135 <?php get_highest_rated(); ?> 136 </ul> 137 <?php endif; ?> 138 <!-- WP-PostRatings (10 Most Rated Post) --> 139 <?php if(function_exists('the_ratings')): ?> 140 <p><b>10 Most Rated Post</b></p> 141 <ul> 142 <?php get_most_rated(); ?> 143 </ul> 144 <?php endif; ?> 145 <!-- WP-PostViews (10 Most Viewed Post) --> 146 <?php if(function_exists('the_views')): ?> 147 <p><b>10 Most Viewed Post</b></p> 148 <ul> 149 <?php get_most_viewed(); ?> 150 </ul> 151 <?php endif; ?> 152 </div> 153 154 <!-- Author Stats --> 155 <div class="wrap"> 156 <h2>Authors Stats</h2> 157 <p><b>Authors</b></p> 158 <ol> 159 <?php get_authorsstats(); ?> 160 </ol> 161 </div> 162 163 <!-- Comments' Members Stats --> 164 <div class="wrap"> 165 <h2>Comments' Members Stats</h2> 166 <p><b>Comment Members</b></p> 167 <ol> 168 <?php get_commentmembersstats(); ?> 169 </ol> 170 </div> 171 172 <!-- Misc Stats --> 173 <div class="wrap"> 174 <h2>Misc Stats</h2> 175 <!-- Post Categories --> 176 <p><b>Post Categories</b></p> 177 <ul> 178 <?php list_cats(1,'All','name','asc','',true,0,1,0,1,true,0,0,0,'','','',true); ?> 179 </ul> 180 <!-- Link Categories --> 181 <p><b>Link Categories</b></p> 182 <ul> 183 <?php get_linkcats(); ?> 184 </ul> 185 </div> 186 <?php 44 $stats_page = stats_page(); 45 echo "<div class=\"wrap\">\n$stats_page</div>\n"; 187 46 } 188 47 … … 500 359 $temp_stats = ''; 501 360 $temp_post = $post; 361 $stats_mostlimit = intval(get_settings('stats_mostlimit')); 362 $stats_display = get_settings('stats_display'); 502 363 503 364 // Default wp-stats.php Page 504 365 if(empty($comment_author)) { 505 366 // General Stats 506 $temp_stats .= '<h2 class="pagetitle">General Stats</h2>'."\n"; 507 $temp_stats .= '<p><b>Total Stats</b></p>'."\n"; 508 $temp_stats .= '<ul>'."\n"; 509 $temp_stats .= '<li><b>'.get_totalauthors(false).'</b> Authors To This Blog.</li>'."\n"; 510 $temp_stats .= '<li><b>'.get_totalposts(false).'</b> Posts Were Posted.</li>'."\n"; 511 $temp_stats .= '<li><b>'.get_totalpages(false).'</b> Pages Were Created.</li>'."\n"; 512 $temp_stats .= '<li><b>'.get_totalcomments(false).'</b> Comments Were Posted.</li>'."\n"; 513 $temp_stats .= '<li><b>'.get_totalcommentposters(false).'</b> Different Nicks Were Represented In The Comments.</li>'."\n"; 514 $temp_stats .= '<li><b>'.get_totallinks(false).'</b> Links Were Added.</li>'."\n"; 515 $temp_stats .= '</ul>'."\n"; 367 if($stats_display['total_stats'] == 1) { 368 $temp_stats .= '<h2>General Stats</h2>'."\n"; 369 $temp_stats .= '<p><b>Total Stats</b></p>'."\n"; 370 $temp_stats .= '<ul>'."\n"; 371 $temp_stats .= '<li><b>'.get_totalauthors(false).'</b> Authors To This Blog.</li>'."\n"; 372 $temp_stats .= '<li><b>'.get_totalposts(false).'</b> Posts Were Posted.</li>'."\n"; 373 $temp_stats .= '<li><b>'.get_totalpages(false).'</b> Pages Were Created.</li>'."\n"; 374 $temp_stats .= '<li><b>'.get_totalcomments(false).'</b> Comments Were Posted.</li>'."\n"; 375 $temp_stats .= '<li><b>'.get_totalcommentposters(false).'</b> Different Nicks Were Represented In The Comments.</li>'."\n"; 376 $temp_stats .= '<li><b>'.get_totallinks(false).'</b> Links Were Added.</li>'."\n"; 377 $temp_stats .= '</ul>'."\n"; 378 } 516 379 517 380 // Plugin Stats 518 $temp_stats .= '<h2 class="pagetitle">Plugins Stats</h2>'."\n"; 381 if($stats_display['email'] == 1 || $stats_display['polls'] == 1 || $stats_display['ratings'] == 1 || $stats_display['views'] || $stats_display['useronline'] == 1) { 382 $temp_stats .= '<h2>Plugins Stats</h2>'."\n"; 383 } 519 384 520 385 // WP-EMail Stats 521 if(function_exists('wp_email') ) {386 if(function_exists('wp_email') && $stats_display['email'] == 1) { 522 387 $temp_stats .= '<p><b>WP-EMail</b></p>'."\n"; 523 388 $temp_stats .= '<ul>'."\n"; … … 529 394 530 395 // WP-Polls Stats 531 if(function_exists('get_poll') ) {396 if(function_exists('get_poll') && $stats_display['polls'] == 1) { 532 397 $temp_stats .= '<p><b>WP-Polls</b></p>'."\n"; 533 398 $temp_stats .= '<ul>'."\n"; … … 539 404 540 405 // WP-PostRatings Stats 541 if(function_exists('the_ratings') ) {406 if(function_exists('the_ratings') && $stats_display['ratings'] == 1) { 542 407 $temp_stats .= '<p><b>WP-PostRatings</b></p>'."\n"; 543 408 $temp_stats .= '<ul>'."\n"; … … 548 413 549 414 // WP-PostViews Stats 550 if(function_exists('the_views') ) {415 if(function_exists('the_views') && $stats_display['views'] == 1) { 551 416 $temp_stats .= '<p><b>WP-PostViews</b></p>'."\n"; 552 417 $temp_stats .= '<ul>'."\n"; … … 556 421 557 422 // WP-UserOnline Stats 558 if(function_exists('useronline') ) {423 if(function_exists('useronline') && $stats_display['useronline'] == 1) { 559 424 $temp_stats .= '<p><b>WP-UserOnline</b></p>'."\n"; 560 425 $temp_stats .= '<ul>'."\n"; … … 565 430 } 566 431 567 // Top 10 Stats 568 $temp_stats .= '<h2 class="pagetitle">Top 10 Stats</h2>'."\n"; 569 570 // 10 Recent Posts 571 $temp_stats .= '<p><b>10 Recent Posts</b></p>'."\n"; 572 $temp_stats .= '<ul>'."\n"; 573 $temp_stats .= get_recentposts('', 10, false); 574 $temp_stats .= '</ul>'."\n"; 575 576 // 10 Recent Comments 577 $temp_stats .= '<p><b>10 Recent Comments</b></p>'."\n"; 578 $temp_stats .= '<ul>'."\n"; 579 $temp_stats .= get_recentcomments('', 10, false); 580 $temp_stats .= '</ul>'."\n"; 581 582 // 10 Most Commented Post 583 $temp_stats .= '<p><b>10 Most Commented Post</b></p>'."\n"; 584 $temp_stats .= '<ul>'."\n"; 585 $temp_stats .= get_mostcommented('', 10, 0, false); 586 $temp_stats .= '</ul>'."\n"; 587 588 // WP-EMail (10 Most EMailed Post) 589 if(function_exists('wp_email')) { 590 $temp_stats .= '<p><b>10 Most Emailed Post</b></p>'."\n"; 591 $temp_stats .= '<ul>'."\n"; 592 $temp_stats .= get_mostemailed('', 10, 0, false); 593 $temp_stats .= '</ul>'."\n"; 594 } 595 596 // WP-PostRatings (10 Highest Rated Post) (10 Most Rated Post) 432 // Top Stats 433 if($stats_display['recent_posts'] == 1 || $stats_display['recent_commtents'] == 1 || $stats_display['commented_post'] == 1 || $stats_display['emailed_most'] == 1 || $stats_display['rated_highest'] == 1 || $stats_display['rated_most'] == 1 || $stats_display['viewed_most'] == 1) { 434 $temp_stats .= '<h2>Top '.$stats_mostlimit.' Stats</h2>'."\n"; 435 } 436 437 // Recent Posts 438 if($stats_display['recent_posts'] == 1) { 439 $temp_stats .= '<p><b>'.$stats_mostlimit.' Recent Posts</b></p>'."\n"; 440 $temp_stats .= '<ul>'."\n"; 441 $temp_stats .= get_recentposts('', $stats_mostlimit, false); 442 $temp_stats .= '</ul>'."\n"; 443 } 444 445 // Recent Comments 446 if($stats_display['recent_commtents'] == 1) { 447 $temp_stats .= '<p><b>'.$stats_mostlimit.' Recent Comments</b></p>'."\n"; 448 $temp_stats .= '<ul>'."\n"; 449 $temp_stats .= get_recentcomments('', $stats_mostlimit, false); 450 $temp_stats .= '</ul>'."\n"; 451 } 452 453 // Most Commented Post 454 if($stats_display['commented_post'] == 1) { 455 $temp_stats .= '<p><b>'.$stats_mostlimit.' Most Commented Post</b></p>'."\n"; 456 $temp_stats .= '<ul>'."\n"; 457 $temp_stats .= get_mostcommented('', $stats_mostlimit, 0, false); 458 $temp_stats .= '</ul>'."\n"; 459 } 460 461 // WP-EMail (Most EMailed Post) 462 if(function_exists('wp_email') && $stats_display['emailed_most'] == 1) { 463 $temp_stats .= '<p><b>'.$stats_mostlimit.' Most Emailed Post</b></p>'."\n"; 464 $temp_stats .= '<ul>'."\n"; 465 $temp_stats .= get_mostemailed('', $stats_mostlimit, 0, false); 466 $temp_stats .= '</ul>'."\n"; 467 } 468 469 // WP-PostRatings (Highest Rated Post) (Most Rated Post) 597 470 if(function_exists('the_ratings')) { 598 $temp_stats .= '<p><b>10 Highest Rated Post</b></p>'."\n"; 599 $temp_stats .= '<ul>'."\n"; 600 $temp_stats .= get_highest_rated('', 10, 0, false); 601 $temp_stats .= '</ul>'."\n"; 602 $temp_stats .= '<p><b>10 Most Rated Post</b></p>'."\n"; 603 $temp_stats .= '<ul>'."\n"; 604 $temp_stats .= get_most_rated('', 10, 0, false); 605 $temp_stats .= '</ul>'."\n"; 606 } 607 608 // WP-PostViews (10 Most Viewed Post) 609 if(function_exists('the_views')) { 610 $temp_stats .= '<p><b>10 Most Viewed Post</b></p>'."\n"; 611 $temp_stats .= '<ul>'."\n"; 612 $temp_stats .= get_most_viewed('', 10, 0, false); 471 if($stats_display['rated_highest'] == 1) { 472 $temp_stats .= '<p><b>'.$stats_mostlimit.' Highest Rated Post</b></p>'."\n"; 473 $temp_stats .= '<ul>'."\n"; 474 $temp_stats .= get_highest_rated('', $stats_mostlimit, 0, false); 475 $temp_stats .= '</ul>'."\n"; 476 } 477 if($stats_display['rated_most'] == 1) { 478 $temp_stats .= '<p><b>'.$stats_mostlimit.' Most Rated Post</b></p>'."\n"; 479 $temp_stats .= '<ul>'."\n"; 480 $temp_stats .= get_most_rated('', $stats_mostlimit, 0, false); 481 $temp_stats .= '</ul>'."\n"; 482 } 483 } 484 485 // WP-PostViews (Most Viewed Post) 486 if(function_exists('the_views') && $stats_display['viewed_most'] == 1) { 487 $temp_stats .= '<p><b>'.$stats_mostlimit.' Most Viewed Post</b></p>'."\n"; 488 $temp_stats .= '<ul>'."\n"; 489 $temp_stats .= get_most_viewed('', $stats_mostlimit, 0, false); 613 490 $temp_stats .= '</ul>'."\n"; 614 491 } 615 492 616 493 // Author Stats 617 $temp_stats .= '<h2 class="pagetitle">Authors Stats</h2>'."\n"; 618 $temp_stats .= '<p><b>Authors</b></p>'."\n"; 619 $temp_stats .= '<ol>'."\n"; 620 $temp_stats .= get_authorsstats(false); 621 $temp_stats .= '</ol>'."\n"; 494 if($stats_display['authors'] == 1) { 495 $temp_stats .= '<h2>Authors Stats</h2>'."\n"; 496 $temp_stats .= '<p><b>Authors</b></p>'."\n"; 497 $temp_stats .= '<ol>'."\n"; 498 $temp_stats .= get_authorsstats(false); 499 $temp_stats .= '</ol>'."\n"; 500 } 622 501 623 502 // Comments' Members Stats 624 $temp_stats .= '<h2 class="pagetitle">Comments\' Members Stats</h2>'."\n"; 625 $temp_stats .= '<p><b>Comment Members</b></p>'."\n"; 626 $temp_stats .= '<ol>'."\n"; 627 $temp_stats .= get_commentmembersstats(-1, false); 628 $temp_stats .= '</ol>'."\n"; 629 503 if($stats_display['comment_members'] == 1) { 504 $temp_stats .= '<h2>Comments\' Members Stats</h2>'."\n"; 505 $temp_stats .= '<p><b>Comment Members</b></p>'."\n"; 506 $temp_stats .= '<ol>'."\n"; 507 $temp_stats .= get_commentmembersstats(-1, false); 508 $temp_stats .= '</ol>'."\n"; 509 } 510 630 511 // Misc Stats 631 $temp_stats .= '<h2 class="pagetitle">Misc Stats</h2>'."\n"; 512 if($stats_display['post_cats'] == 1 || $stats_display['link_cats'] == 1) { 513 $temp_stats .= '<h2>Misc Stats</h2>'."\n"; 514 } 632 515 633 516 // Post Categories 634 $temp_stats .= '<p><b>Post Categories</b></p>'."\n"; 635 $temp_stats .= '<ul>'."\n"; 636 $temp_stats .= list_cats(1,'All','name','asc','',true,0,1,0,1,true,0,0,1,'','','',true); 637 $temp_stats .= '</ul>'."\n"; 517 if($stats_display['post_cats'] == 1) { 518 $temp_stats .= '<p><b>Post Categories</b></p>'."\n"; 519 $temp_stats .= '<ul>'."\n"; 520 $temp_stats .= list_cats(1,'All','name','asc','',true,0,1,0,1,true,0,0,1,'','','',true); 521 $temp_stats .= '</ul>'."\n"; 522 } 638 523 639 524 // Link Categories 640 $temp_stats .= '<p><b>Link Categories</b></p>'."\n"; 641 $temp_stats .= '<ul>'."\n"; 642 $temp_stats .= get_linkcats(false); 643 $temp_stats .= '</ul>'."\n"; 525 if($stats_display['link_cats'] == 1) { 526 $temp_stats .= '<p><b>Link Categories</b></p>'."\n"; 527 $temp_stats .= '<ul>'."\n"; 528 $temp_stats .= get_linkcats(false); 529 $temp_stats .= '</ul>'."\n"; 530 } 644 531 645 532 // Displaying Comments Posted By User … … 668 555 $gmz_comments = $wpdb->get_results("SELECT $wpdb->posts.ID, comment_author, comment_date, comment_content, ID, comment_ID, post_date, post_title, post_name, post_password FROM $wpdb->comments INNER JOIN $wpdb->posts ON $wpdb->comments.comment_post_ID = $wpdb->posts.ID WHERE comment_author = '$comment_author_sql' AND comment_approved = '1' AND post_date < '".current_time('mysql')."' AND (post_status = 'publish' OR post_status = 'static') ORDER BY comment_post_ID DESC, comment_date DESC LIMIT $offset, $perpage"); 669 556 670 $temp_stats .= '<h2 class="pagetitle">Comments Posted By '.$comment_author.'</h2>'."\n";557 $temp_stats .= '<h2>Comments Posted By '.$comment_author.'</h2>'."\n"; 671 558 $temp_stats .= '<p>Displaying <b>'.$displayonpage.'</b> To <b>'.$maxonpage.'</b> Of <b>'.$totalcomments.'</b> Comments</p>'."\n"; 672 559 … … 763 650 function stats_init() { 764 651 global $wpdb; 652 $stats_display = array('total_stats' => 1, 'email' => 1, '
