Index: changelog.txt =================================================================== --- changelog.txt (Revision 19884) +++ changelog.txt (Arbeitskopie) @@ -1,6 +1,9 @@ Changelog Version Date Changes +2.0.1 2007/09/24 Added switch on the categories page, which + reverses the selection. It is now possible to + include or exclude categories. 2.0 2007/09/24 New code for fetching the data: 1. Instead of one expensive database query we now use two or more cheap queries. Thanks to mirra, who Index: get-recent-comments.php =================================================================== --- get-recent-comments.php (Revision 19884) +++ get-recent-comments.php (Arbeitskopie) @@ -1,7 +1,7 @@ ?page=get-recent-comments.php&subpage=4&updated=true"> -

Ignore comments from the checked categories

+

Categories

+ +
+ +

+

  • >Comments
  • >Trackbacks
  • -
  • >Excluded Categories
  • +
  • >Categories
  • >Gravatars
  • >Misc
  • >Instructions
  • @@ -617,7 +622,7 @@ function kjgrc_get_option($section,$option_name) { global $wpdb,$kjgrc_options_loaded; - $version = 10; // If version differs from saved value -> insert new defaults + $version = 11; // If version differs from saved value -> insert new defaults $kjgrc_options = get_option("kjgrc_options"); if ($kjgrc_options == NULL || $kjgrc_options['version'] != $version) { @@ -639,6 +644,7 @@ "grt_chars_per_word" => 30, "grt_format" => "
  • %comment_author: %trackback_title
  • ", "misc_exclude_cat" => "", + "misc_exclude_cat_reverse" => 0, "misc_convert_smileys" => 1, "gravatar_size" => 20, "gravatar_alt_url" => "", @@ -759,6 +765,11 @@ } else { kjgrc_set_option('misc_exclude_cat',implode(" ",$_POST['exclude_category'])); } + if (isset($_POST['exclude_categories_reverse'])) { + if ($_POST['exclude_categories_reverse'] == 0 || $_POST['exclude_categories_reverse'] == 1) { + kjgrc_set_option("misc_exclude_cat_reverse",$_POST['exclude_categories_reverse']); + } + } } if ($function == 'gravatar') { if ($_POST['gravatar_size'] > 0 && $_POST['gravatar_size'] < 81) { @@ -1142,10 +1153,16 @@ } $exclude_cat = kjgrc_get_exclude_cat(); $is_in_excluded_cat = 0; + if (kjgrc_get_option("misc","exclude_cat_reverse") == 1) { + $is_in_excluded_cat = 1; + } if ($exclude_cat) { foreach ($exclude_cat as $cat) { if ($cat_cache[$comment->comment_post_ID][$cat] == 1) { $is_in_excluded_cat = 1; + if (kjgrc_get_option("misc","exclude_cat_reverse") == 1) { + $is_in_excluded_cat = 0; + } // echo "drop $comment->comment_ID (is in excluded cat $cat)
    "; } Index: changelog.html =================================================================== --- changelog.html (Revision 19884) +++ changelog.html (Arbeitskopie) @@ -6,6 +6,14 @@ Changes + + 2.0.1 + 2007/09/24 + Added switch on the categories page, which reverses the +selection. It is now possible to include or exclude categories. + + + 2.0 2007/09/24 @@ -22,7 +30,7 @@ Support for Custom Smileys Plugin. Thanks to Henry for suggesting this.
    Fix: Username was not displayed as "Anonymous", if commentor left no name. Thanks to Pixelation for reporting this.
    - Added support for WordPress 2.3. It will drop the post2cat table. Changed plugin to new taxonomy scheme. A *great* thank you goes to Lakatos Zsolt, who provided a complete patch for get-recent-comments-1.5.6, which made it very easy for me to understand how 2.0-beta10 had to be changed. Thank you also to xelios, Ville and Kretzschmar who warned me, that WordPress 2.3 will break the old plugin code. + Added support for WordPress 2.3. It will drop the post2cat table. Changed plugin to new taxonomy scheme. A *great* thank you goes to Lakatos Zsolt, who provided a complete patch for get-recent-comments-1.5.6, which made it very easy for me to understand how 2.0-beta10 had to be changed. Thank you also to xelios, Ville and Kretzschmar who warned me, that WordPress 2.3 will break the old plugin code.