From c9fd85c45634735c20daf30b228a49f90bf6f795 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 21 Nov 2015 12:27:48 +0100 Subject: [PATCH 1/2] The addons "fromgplus" and "appnet" are now having a better documentation --- appnet/README.md | 15 +++++++++++++++ fromgplus/README | 25 ------------------------- fromgplus/README.md | 10 ++++++++++ fromgplus/fromgplus.php | 15 +++++++++++++++ fromgplus/templates/admin.tpl | 2 ++ 5 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 appnet/README.md delete mode 100644 fromgplus/README create mode 100644 fromgplus/README.md create mode 100644 fromgplus/templates/admin.tpl diff --git a/appnet/README.md b/appnet/README.md new file mode 100644 index 00000000..ec24753c --- /dev/null +++ b/appnet/README.md @@ -0,0 +1,15 @@ +App.net Plugin +============== + +With this addon to friendica you can give your users the possibility to post their *public* messages to App.net and +to import their timeline. The messages will be strapped their rich context and shortened to 256 characters length if +necessary. + +Installation +------------ + +If you have an developer account you can create an Application for all of your users at +[https://account.app.net/developer/apps/](https://account.app.net/developer/apps/). Add the redirect uri +"https://your.server.name/appnet/connect" (Replace "your.server.name" with the hostname of your server) + +If you can't create an application (because you only have a free account) this addon still works, but your users have to create individual applications on their own. diff --git a/fromgplus/README b/fromgplus/README deleted file mode 100644 index 6587407c..00000000 --- a/fromgplus/README +++ /dev/null @@ -1,25 +0,0 @@ -This extension fetches messages from a Google+ account and reshares it. - -You have to place the following config values in your .htconfig.php: - -$a->config['fromgplus']['key'] = "your key"; -$a->config['fromgplus']['poll_interval'] = 10; - -You need an API key for "Simple API Access". - -- You go to https://code.google.com/apis/console/ -- Then you go to "Services" and activate "Google+ API". -- After that you go to "API Access". -- At the bottom of the page you see "Simple API Access". - -The value after "API key:" is the key that you need. - - -The new cloudbased Developerconsole - -- You go to https://code.google.com/apis/console/ -- Then you got to "APIs & auth" > "Apis" switch on Google+ API -- Then you go to "Credentials" -- At the bottom of the Page you see "Public API access" - -The value after "API key:" is the key that you need. \ No newline at end of file diff --git a/fromgplus/README.md b/fromgplus/README.md new file mode 100644 index 00000000..d654da9d --- /dev/null +++ b/fromgplus/README.md @@ -0,0 +1,10 @@ +This extension fetches messages from a Google+ account and reshares it. + +To get the needed API key please follow these steps: + +* go to [https://code.google.com/apis/console/](https://code.google.com/apis/console/) +* Create a new project or open an existing one +* Activate the Google+ API +* Go to the credentials +* Create an API key (browser key) and leave the field for the referrer empty +* diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 933567ce..e0fdc705 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -81,6 +81,21 @@ function fromgplus_addon_settings_post(&$a,&$b) { } } +function fromgplus_plugin_admin(&$a, &$o){ + $t = get_markup_template("admin.tpl", "addon/fromgplus/"); + + $o = replace_macros($t, array( + '$submit' => t('Save Settings'), + '$key' => array('key', t('Key'), trim(get_config('fromgplus', 'key')), t('')), + )); +} + +function fromgplus_plugin_admin_post(&$a){ + $key = ((x($_POST,'key')) ? trim($_POST['key']) : ''); + set_config('fromgplus','key',$key); + info( t('Settings updated.'). EOL ); +} + function fromgplus_cron($a,$b) { $last = get_config('fromgplus','last_poll'); diff --git a/fromgplus/templates/admin.tpl b/fromgplus/templates/admin.tpl new file mode 100644 index 00000000..0bd83c39 --- /dev/null +++ b/fromgplus/templates/admin.tpl @@ -0,0 +1,2 @@ +{{include file="field_input.tpl" field=$key}} +
From 2c7e0b8492e6eced6513f533a952d487e5252319 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 21 Nov 2015 12:31:50 +0100 Subject: [PATCH 2/2] One asterisk too much :) --- fromgplus/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/fromgplus/README.md b/fromgplus/README.md index d654da9d..94b098cf 100644 --- a/fromgplus/README.md +++ b/fromgplus/README.md @@ -7,4 +7,3 @@ To get the needed API key please follow these steps: * Activate the Google+ API * Go to the credentials * Create an API key (browser key) and leave the field for the referrer empty -*