diff --git a/twitter/README b/twitter/README index ff08976c..8041f317 100755 --- a/twitter/README +++ b/twitter/README @@ -3,17 +3,14 @@ By Tobias Diekershoff http://diekershoff.homeunix.net/friendika/profile/tobias tobias.diekershoff(at)gmx.net -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! This addon is currently under development. If you have any problem !! -!! with it, please contact the Author. !! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - With this addon to Friendica you can give your user the possibility to post their *public* messages to Twitter. The messages will be strapped their rich context and shortened to 140 characters length if necessary. If shortening of the message was performed a link will be added to the Tweet pointing to the original message on your server. +The addon can also mirror a users Tweets into the ~friendica wall. + There is a similar addon for forwarding public messages to "StatusNet":http://status.net [[StatusNet Plugin]]. diff --git a/twitter/twitter.php b/twitter/twitter.php index 88cf3858..7bf01eff 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -543,8 +543,10 @@ function twitter_post_hook(&$a,&$b) { function twitter_plugin_admin_post(&$a){ $consumerkey = ((x($_POST,'consumerkey')) ? notags(trim($_POST['consumerkey'])) : ''); $consumersecret = ((x($_POST,'consumersecret')) ? notags(trim($_POST['consumersecret'])): ''); + $applicationname = ((x($_POST, 'application-name')) ? notags(trin($_POST['applicationname'])):''); set_config('twitter','consumerkey',$consumerkey); set_config('twitter','consumersecret',$consumersecret); + set_config('twitter','application_name',$applicationname); info( t('Settings updated.'). EOL ); } function twitter_plugin_admin(&$a, &$o){ @@ -554,7 +556,8 @@ function twitter_plugin_admin(&$a, &$o){ '$submit' => t('Submit'), // name, label, value, help, [extra values] '$consumerkey' => array('consumerkey', t('Consumer key'), get_config('twitter', 'consumerkey' ), ''), - '$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), '') + '$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), ''), + '$applicationname' => array('applicationname', t('Name of the Twitter Application'), get_config('twitter','applicationname'),t('set this to avoid mirroring postings from ~friendica back to ~friendica')) )); } diff --git a/twitter/view/admin.tpl b/twitter/view/admin.tpl index a83eb07a..b89f51b6 100644 --- a/twitter/view/admin.tpl +++ b/twitter/view/admin.tpl @@ -1,3 +1,4 @@ {{ inc field_input.tpl with $field=$consumerkey }}{{ endinc }} {{ inc field_input.tpl with $field=$consumersecret }}{{ endinc }} +{{ inc field_input.tpl with $field=$applicationname }}{{ endinc }}
diff --git a/twitter/view/smarty3/admin.tpl b/twitter/view/smarty3/admin.tpl index 9efcb065..554ed5a0 100644 --- a/twitter/view/smarty3/admin.tpl +++ b/twitter/view/smarty3/admin.tpl @@ -1,3 +1,4 @@ {{include file="field_input.tpl" field=$consumerkey}} {{include file="field_input.tpl" field=$consumersecret}} +{{include file="field_input.tpl" field=$applicationname}}