--- /dev/null
+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.
+++ /dev/null
-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
--- /dev/null
+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
+*
}
}
+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');
--- /dev/null
+{{include file="field_input.tpl" field=$key}}
+<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>