Twitter: added App name config to admin panel
parent
cdb914458b
commit
690b4a175a
|
@ -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]].
|
||||
|
||||
|
|
|
@ -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'))
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -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 }}
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
|
|
@ -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}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||
|
|
Loading…
Reference in New Issue