mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 08:43:40 +00:00
[pumpio] Add addon config
- Update mentions of .htconfig.php
This commit is contained in:
parent
05077bf127
commit
9cc5f29dad
3 changed files with 32 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
To let the connector work properly you should define an application name in the .htconfig:
|
||||
To let the connector work properly you should define an application name in config/local.ini.php:
|
||||
|
||||
$a->config['pumpio']['application_name'] = "Name of you site";
|
||||
[pumpio]
|
||||
application_name = Name of you site
|
||||
|
||||
This name appears at pump.io and is important for not mirroring back posts that came from friendica.
|
||||
This name appears at pump.io and is important for not mirroring back posts that came from Friendica.
|
||||
|
|
21
pumpio/config/pumpio.ini.php
Normal file
21
pumpio/config/pumpio.ini.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php return <<<INI
|
||||
|
||||
; Warning: Don't change this file! It only holds the default config values for this addon.
|
||||
; Instead overwrite these config values in config/local.ini.php in your Friendica directory
|
||||
|
||||
[pumpio]
|
||||
; application_name (String)
|
||||
; To let the connector work properly you should define an application name.
|
||||
; This name appears at pump.io and is important for not mirroring back posts that came from Friendica.
|
||||
application_name =
|
||||
|
||||
; wall-to-wall_share (Boolean)
|
||||
; Displays forwarded posts like "wall-to-wall" posts.
|
||||
wall-to-wall_share = false
|
||||
|
||||
; poll_interval (Integer)
|
||||
; Given in minutes
|
||||
poll_interval = 5
|
||||
|
||||
INI;
|
||||
//Keep this line
|
|
@ -32,6 +32,7 @@ define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
|
|||
|
||||
function pumpio_install()
|
||||
{
|
||||
Addon::registerHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
||||
Addon::registerHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
||||
Addon::registerHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
||||
Addon::registerHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
||||
|
@ -44,6 +45,7 @@ function pumpio_install()
|
|||
|
||||
function pumpio_uninstall()
|
||||
{
|
||||
Addon::unregisterHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
||||
Addon::unregisterHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
||||
Addon::unregisterHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
||||
Addon::unregisterHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
||||
|
@ -372,6 +374,11 @@ function pumpio_settings_post(&$a, &$b)
|
|||
}
|
||||
}
|
||||
|
||||
function pumpio_load_config(\Friendica\App $a)
|
||||
{
|
||||
$a->loadConfigFile(__DIR__. '/config/pumpio.ini.php');
|
||||
}
|
||||
|
||||
function pumpio_post_local(&$a, &$b)
|
||||
{
|
||||
if (!local_user() || (local_user() != $b['uid'])) {
|
||||
|
|
Loading…
Reference in a new issue