[FEATURE] Add possibility to exclude replies in user timeline 66/23166/2
authorNicole Cordes <cordes@cps-it.de>
Sat, 17 Aug 2013 22:01:48 +0000 (00:01 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 17 Aug 2013 22:02:51 +0000 (00:02 +0200)
Releases: 1.0
Change-Id: Id40d1e754bf6a6ccb4914c834c11f0bddce33dfc
Reviewed-on: https://review.typo3.org/23166
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Classes/Domain/Repository/TweetRepository.php
Configuration/TypoScript/Main/constants.txt
Configuration/TypoScript/Main/setup.txt

index f9fddb1..55bc2cc 100644 (file)
@@ -107,6 +107,13 @@ class Tx_WtTwitter_Domain_Repository_TweetRepository {
                                $parameter['include_rts'] = 'false';
                        }
 
+                       // Exclude retweets
+                       if ($settings['excludeReplies']) {
+                               $parameter['exclude_replies'] = 'true';
+                       } else {
+                               $parameter['exclude_replies'] = 'false';
+                       }
+
                        $tweets = $this->callApi(Tx_WtTwitter_Twitter_Api::getUserTimelineUrl(), 'GET', $parameter, $response);
                }
 
index 5a5ab40..c370645 100644 (file)
@@ -22,6 +22,9 @@ plugin.wttwitter {
        # cat=plugin.wt_twitter//0090; type=boolean; label= Show retweets: Also show own retweets - only if mode is showOwn (e.g. 1)
        main.showRetweets = 1
 
+       # cat=plugin.wt_twitter//0100; type=boolean; label= Exclude replies: Filter replies from tweets - only if mode is showOwn (e.g. 1)
+       main.excludeReplies = 0
+
        # cat=plugin.wt_twitter//9999; type=boolean; label= Debug Mode: Enable or disable some debug output
        debug = 0
 
index 449232d..6b3cc5d 100644 (file)
@@ -12,6 +12,7 @@ plugin.tx_wttwitter {
                        limit = {$plugin.wttwitter.main.limit}
                        sortDESC = {$plugin.wttwitter.main.sortDESC}
                        showRetweets = {$plugin.wttwitter.main.showRetweets}
+                       excludeReplies = {$plugin.wttwitter.main.excludeReplies}
                        debug = {$plugin.wttwitter.debug}
 
                        # Tweet Fields (Feed in a loop like text, link, etc..)