--- twitter-tools.orig.php 2009-02-19 01:58:00.000000000 +0900 +++ twitter-tools.php 2009-05-30 02:02:00.000000000 +0900 @@ -136,6 +136,7 @@ , 'tweet_from_sidebar' , 'give_tt_credit' , 'exclude_reply_tweets' + , 'exclude_wordlist' , 'last_tweet_download' , 'doing_tweet_download' , 'doing_digest_post' @@ -163,6 +164,7 @@ $this->tweet_from_sidebar = '1'; $this->give_tt_credit = '1'; $this->exclude_reply_tweets = '0'; + $this->exclude_wordlist = ''; $this->install_date = ''; $this->js_lib = 'jquery'; $this->digest_tweet_order = 'ASC'; @@ -370,7 +372,7 @@ $tweet = new aktt_tweet; $tweet->tw_text = $data->tw_text; $tweet->tw_reply_tweet = $data->tw_reply_tweet; - if (!$tweet->tweet_is_post_notification() || ($tweet->tweet_is_reply() && $this->exclude_reply_tweets)) { + if (!$this->tweet_is_post_notification() && (!$aktt->exclude_reply_tweets || !$this->tweet_is_reply()) && !$this->tweet_has_balcklisted_word()) { $tweets_to_post[] = $data; } } @@ -538,6 +540,16 @@ return (substr($this->tw_text, 0, 1) == '@'); } + function tweet_has_balcklisted_word() { + global $aktt; + foreach (explode("\n", $aktt->exclude_wordlist) as $word) { + if (stristr($this->tw_text, trim($word))) { + return true; + } + } + return false; + } + function add() { global $wpdb, $aktt; $wpdb->query(" @@ -560,7 +572,7 @@ ) "); do_action('aktt_add_tweet', $this); - if ($aktt->create_blog_posts == '1' && !$this->tweet_post_exists() && !$this->tweet_is_post_notification() && (!$aktt->exclude_reply_tweets || !$this->tweet_is_reply())) { + if ($aktt->create_blog_posts == '1' && !$this->tweet_post_exists() && !$this->tweet_is_post_notification() && (!$aktt->exclude_reply_tweets || !$this->tweet_is_reply()) && !$this->tweet_has_balcklisted_word()) { $aktt->do_tweet_post($this); } } @@ -1623,6 +1635,10 @@
+ + +
+
'.__('Numbers only please.', 'twitter-tools').'