Merge pull request #326 from annando/1511-reworked-documentation2
Better documentation for "fromgplus" and "appnet"
This commit is contained in:
commit
1f4fc0ea89
15
appnet/README.md
Normal file
15
appnet/README.md
Normal file
|
@ -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.
|
|
@ -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.
|
9
fromgplus/README.md
Normal file
9
fromgplus/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
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
|
|
@ -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');
|
||||
|
||||
|
|
2
fromgplus/templates/admin.tpl
Normal file
2
fromgplus/templates/admin.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{include file="field_input.tpl" field=$key}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
Loading…
Reference in a new issue