From: Adam Magness Date: Sat, 20 Jan 2018 13:57:41 +0000 (-0500) Subject: Update function names X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c71f7b0e1a7bb5ca88347b295dd3a4cc3106c5a9;p=friendica-addons.git Update function names update function names and hook calls --- diff --git a/blackout/blackout.php b/blackout/blackout.php index 94e081ce..1c34862b 100644 --- a/blackout/blackout.php +++ b/blackout/blackout.php @@ -9,12 +9,12 @@ * About * ===== * - * This plugin will allow you to enter a date/time period during which + * This addon will allow you to enter a date/time period during which * all your ~friendica visitors from the web will be redirected to a page * you can configure in the admin panel as well. * * Calls to the API and the communication with other ~friendica nodes is - * not effected from this plugin. + * not effected from this addon. * * If you enter a period the current date would be affected none of the * currently logged in users will be effected as well. But if they log @@ -88,7 +88,7 @@ function blackout_redirect ($a, $b) { } } -function blackout_plugin_admin(&$a, &$o) { +function blackout_addon_admin(&$a, &$o) { $mystart = Config::get('blackout','begindate'); if (! is_string($mystart)) { $mystart = "YYYY-MM-DD:hhmm"; } $myend = Config::get('blackout','enddate'); @@ -112,7 +112,7 @@ function blackout_plugin_admin(&$a, &$o) { $o = '

Please double check that the current settings for the blackout. Begin will be '.$mystart.' and it will end '.$myend.'.

' . $o; } } -function blackout_plugin_admin_post (&$a) { +function blackout_addon_admin_post (&$a) { $begindate = trim($_POST['startdate']); $enddate = trim($_POST['enddate']); $url = trim($_POST['rurl']); diff --git a/blockem/blockem.php b/blockem/blockem.php index 2a2cd3d2..d943f26c 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -12,30 +12,25 @@ use Friendica\Core\PConfig; function blockem_install() { Addon::registerHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); - Addon::registerHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); Addon::registerHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); Addon::registerHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); - Addon::registerHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); + Addon::registerHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store'); } - function blockem_uninstall() { Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); - Addon::unregisterHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); Addon::unregisterHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); Addon::unregisterHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); - Addon::unregisterHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); - + Addon::unregisterHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store'); } - - - - -function blockem_addon_settings(&$a,&$s) { +function blockem_addon_settings(&$a, &$s) +{ if(! local_user()) return; @@ -45,7 +40,7 @@ function blockem_addon_settings(&$a,&$s) { $a->page['htmlhead'] .= '' . "\r\n"; - $words = PConfig::get(local_user(),'blockem','words'); + $words = PConfig::get(local_user(), 'blockem', 'words'); if(! $words) $words = ''; @@ -79,7 +74,6 @@ function blockem_addon_settings_post(&$a,&$b) { } } - function blockem_enotify_store(&$a,&$b) { $words = PConfig::get($b['uid'],'blockem','words'); @@ -143,13 +137,11 @@ function blockem_prepare_body(&$a,&$b) { } } - function blockem_display_item(&$a,&$b) { if(strstr($b['output']['body'],'id="blockem-wrap-')) $b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg"; } - function blockem_conversation_start(&$a,&$b) { if(! local_user()) diff --git a/blogger/blogger.php b/blogger/blogger.php index 7c9e1c5d..050aaa7a 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -8,7 +8,8 @@ use Friendica\Core\Addon; use Friendica\Core\PConfig; -function blogger_install() { +function blogger_install() +{ Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local'); Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send'); Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets'); @@ -16,7 +17,8 @@ function blogger_install() { Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post'); } -function blogger_uninstall() { +function blogger_uninstall() +{ Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local'); Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send'); Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets'); @@ -25,28 +27,29 @@ function blogger_uninstall() { // obsolete - remove Addon::unregisterHook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send'); - Addon::unregisterHook('plugin_settings', 'addon/blogger/blogger.php', 'blogger_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post'); } -function blogger_jot_nets(&$a,&$b) { +function blogger_jot_nets(&$a, &$b) +{ if (!local_user()) { return; } - $bl_post = PConfig::get(local_user(),'blogger','post'); + $bl_post = PConfig::get(local_user(), 'blogger', 'post'); if (intval($bl_post) == 1) { - $bl_defpost = PConfig::get(local_user(),'blogger','post_by_default'); + $bl_defpost = PConfig::get(local_user(), 'blogger', 'post_by_default'); $selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to blogger') . '
'; + . t('Post to blogger') . ''; } } -function blogger_settings(&$a,&$s) { - +function blogger_settings(&$a, &$s) +{ if (! local_user()) { return; } @@ -57,11 +60,11 @@ function blogger_settings(&$a,&$s) { /* Get the current state of our config variables */ - $enabled = PConfig::get(local_user(),'blogger','post'); + $enabled = PConfig::get(local_user(), 'blogger', 'post'); $checked = (($enabled) ? ' checked="checked" ' : ''); $css = (($enabled) ? '' : '-disabled'); - $def_enabled = PConfig::get(local_user(),'blogger','post_by_default'); + $def_enabled = PConfig::get(local_user(), 'blogger', 'post_by_default'); $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); @@ -79,7 +82,7 @@ function blogger_settings(&$a,&$s) { $s .= ''; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; @@ -108,17 +111,19 @@ function blogger_settings(&$a,&$s) { } -function blogger_settings_post(&$a,&$b) { - if (x($_POST,'blogger-submit')) { - PConfig::set(local_user(),'blogger','post',intval($_POST['blogger'])); - PConfig::set(local_user(),'blogger','post_by_default',intval($_POST['bl_bydefault'])); - PConfig::set(local_user(),'blogger','bl_username',trim($_POST['bl_username'])); - PConfig::set(local_user(),'blogger','bl_password',trim($_POST['bl_password'])); - PConfig::set(local_user(),'blogger','bl_blog',trim($_POST['bl_blog'])); +function blogger_settings_post(&$a, &$b) +{ + if (x($_POST, 'blogger-submit')) { + PConfig::set(local_user(), 'blogger', 'post', intval($_POST['blogger'])); + PConfig::set(local_user(), 'blogger', 'post_by_default', intval($_POST['bl_bydefault'])); + PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username'])); + PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password'])); + PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog'])); } } -function blogger_post_local(&$a,&$b) { +function blogger_post_local(&$a, &$b) +{ // This can probably be changed to allow editing by pointing to a different API endpoint if ($b['edit']) { @@ -133,11 +138,11 @@ function blogger_post_local(&$a,&$b) { return; } - $bl_post = intval(PConfig::get(local_user(),'blogger','post')); + $bl_post = intval(PConfig::get(local_user(), 'blogger', 'post')); - $bl_enable = (($bl_post && x($_REQUEST,'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0); + $bl_enable = (($bl_post && x($_REQUEST, 'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0); - if ($b['api_source'] && intval(PConfig::get(local_user(),'blogger','post_by_default'))) { + if ($b['api_source'] && intval(PConfig::get(local_user(), 'blogger', 'post_by_default'))) { $bl_enable = 1; } @@ -155,12 +160,13 @@ function blogger_post_local(&$a,&$b) { -function blogger_send(&$a,&$b) { +function blogger_send(&$a, &$b) +{ if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; } - if (! strstr($b['postopts'],'blogger')) { + if (! strstr($b['postopts'], 'blogger')) { return; } @@ -168,12 +174,11 @@ function blogger_send(&$a,&$b) { return; } - $bl_username = xmlify(PConfig::get($b['uid'],'blogger','bl_username')); - $bl_password = xmlify(PConfig::get($b['uid'],'blogger','bl_password')); - $bl_blog = PConfig::get($b['uid'],'blogger','bl_blog'); + $bl_username = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_username')); + $bl_password = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_password')); + $bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog'); if ($bl_username && $bl_password && $bl_blog) { - require_once('include/bbcode.php'); $title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . ''; @@ -199,9 +204,9 @@ EOT; logger('blogger: data: ' . $xml, LOGGER_DATA); if ($bl_blog !== 'test') { - $x = post_url($bl_blog,$xml); + $x = post_url($bl_blog, $xml); } logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG); } -} \ No newline at end of file +} diff --git a/buffer/buffer.php b/buffer/buffer.php index c788d4aa..9c36f7c4 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -55,22 +55,24 @@ function buffer_content(&$a) { return $o; } -function buffer_plugin_admin(&$a, &$o){ - $t = get_markup_template( "admin.tpl", "addon/buffer/" ); +function buffer_addon_admin(&$a, &$o) +{ + $t = get_markup_template("admin.tpl", "addon/buffer/"); $o = replace_macros($t, [ '$submit' => t('Save Settings'), - // name, label, value, help, [extra values] - '$client_id' => ['client_id', t('Client ID'), Config::get('buffer', 'client_id' ), ''], - '$client_secret' => ['client_secret', t('Client Secret'), Config::get('buffer', 'client_secret' ), ''], + // name, label, value, help, [extra values] + '$client_id' => ['client_id', t('Client ID'), Config::get('buffer', 'client_id'), ''], + '$client_secret' => ['client_secret', t('Client Secret'), Config::get('buffer', 'client_secret'), ''], ]); } -function buffer_plugin_admin_post(&$a){ - $client_id = ((x($_POST,'client_id')) ? notags(trim($_POST['client_id'])) : ''); - $client_secret = ((x($_POST,'client_secret')) ? notags(trim($_POST['client_secret'])): ''); - Config::set('buffer','client_id',$client_id); - Config::set('buffer','client_secret',$client_secret); - info( t('Settings updated.'). EOL ); +function buffer_addon_admin_post(&$a) +{ + $client_id = ((x($_POST, 'client_id')) ? notags(trim($_POST['client_id'])) : ''); + $client_secret = ((x($_POST, 'client_secret')) ? notags(trim($_POST['client_secret'])): ''); + Config::set('buffer', 'client_id', $client_id); + Config::set('buffer', 'client_secret', $client_secret); + info(t('Settings updated.'). EOL); } function buffer_connect(&$a) { @@ -155,7 +157,7 @@ function buffer_settings(&$a,&$s) { $s .= '
'; } else { $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/communityhome/communityhome.php b/communityhome/communityhome.php index f3e4783e..169d2416 100644 --- a/communityhome/communityhome.php +++ b/communityhome/communityhome.php @@ -33,25 +33,28 @@ function communityhome_getopts() { ]; } -function communityhome_plugin_admin(&$a, &$o) { - $tpl = get_markup_template( 'settings.tpl', 'addon/communityhome/' ); +function communityhome_addon_admin(&$a, &$o) +{ + $tpl = get_markup_template('settings.tpl', 'addon/communityhome/'); $opts = communityhome_getopts(); $ctx = [ '$submit' => t("Submit"), '$fields' => [], ]; - foreach($opts as $k=>$v) { + + foreach ($opts as $k => $v) { $ctx['fields'][] = ['communityhome_'.$k, $v, Config::get('communityhome', $k)]; } $o = replace_macros($tpl, $ctx); } -function communityhome_plugin_admin_post(&$a,&$b) { - if(x($_POST,'communityhome-submit')) { +function communityhome_addon_admin_post(&$a, &$b) +{ + if (x($_POST, 'communityhome-submit')) { $opts = communityhome_getopts(); - foreach($opts as $k=>$v) { - Config::set('communityhome', $k, x($_POST,'communityhome_'.$k)); + foreach ($opts as $k => $v) { + Config::set('communityhome', $k, x($_POST, 'communityhome_'.$k)); } } } diff --git a/curweather/curweather.php b/curweather/curweather.php index bcbba91d..dc9f9bb8 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -66,16 +66,17 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0) return $r; } -function curweather_install() { +function curweather_install() +{ Addon::registerHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init'); - Addon::registerHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings'); - Addon::registerHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post'); + Addon::registerHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post'); } function curweather_uninstall() { Addon::unregisterHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init'); - Addon::unregisterHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post'); } function curweather_network_mod_init(&$fk_app,&$b) { @@ -141,7 +142,7 @@ function curweather_network_mod_init(&$fk_app,&$b) { } -function curweather_plugin_settings_post($a,$post) { +function curweather_addon_settings_post($a,$post) { if(! local_user() || (! x($_POST,'curweather-settings-submit'))) return; PConfig::set(local_user(),'curweather','curweather_loc',trim($_POST['curweather_loc'])); @@ -152,7 +153,7 @@ function curweather_plugin_settings_post($a,$post) { } -function curweather_plugin_settings(&$a,&$s) { +function curweather_addon_settings(&$a,&$s) { if(! local_user()) return; @@ -186,7 +187,7 @@ function curweather_plugin_settings(&$a,&$s) { } // Config stuff for the admin panel to let the admin of the node set a APPID // for accessing the API of openweathermap -function curweather_plugin_admin_post (&$a) { +function curweather_addon_admin_post (&$a) { if(! is_site_admin()) return; if ($_POST['curweather-submit']) { @@ -195,7 +196,7 @@ function curweather_plugin_admin_post (&$a) { info( t('Curweather settings saved.'.EOL)); } } -function curweather_plugin_admin (&$a, &$o) { +function curweather_addon_admin (&$a, &$o) { if(! is_site_admin()) return; $appid = Config::get('curweather','appid'); diff --git a/dav/friendica/main.php b/dav/friendica/main.php index afeadcf0..d73edfd3 100644 --- a/dav/friendica/main.php +++ b/dav/friendica/main.php @@ -203,7 +203,7 @@ function dav_content() } } } catch (DAVVersionMismatchException $e) { - $x = t("The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."); + $x = t("The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."); } return $x; } @@ -302,9 +302,9 @@ function dav_cron(&$a, &$b) * @param App $a * @param null|object $o */ -function dav_plugin_admin_post(&$a = null, &$o = null) +function dav_addon_admin_post(&$a = null, &$o = null) { - check_form_security_token_redirectOnErr('/admin/plugins/dav', 'dav_admin_save'); + check_form_security_token_redirectOnErr('/admin/addons/dav', 'dav_admin_save'); dav_include_files(); require_once(__DIR__ . "/database-init.inc.php"); @@ -327,7 +327,7 @@ function dav_plugin_admin_post(&$a = null, &$o = null) * @param App $a * @param string $o */ -function dav_plugin_admin(&$a, &$o) +function dav_addon_admin(&$a, &$o) { dav_include_files(); require_once(__DIR__ . "/database-init.inc.php"); diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index 4872e2a0..32234d15 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -12,8 +12,8 @@ use Friendica\Core\PConfig; function fromapp_install() { Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook'); - Addon::registerHook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); - Addon::registerHook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); + Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); + Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); logger("installed fromapp"); } @@ -22,8 +22,8 @@ function fromapp_install() { function fromapp_uninstall() { Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); logger("removed fromapp"); diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index b8910d5d..c028ea85 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -30,8 +30,8 @@ function fromgplus_uninstall() { Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron'); // Old hooks - Addon::unregisterHook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); } function fromgplus_addon_settings(&$a,&$s) { @@ -94,19 +94,21 @@ function fromgplus_addon_settings_post(&$a,&$b) { } } -function fromgplus_plugin_admin(&$a, &$o){ - $t = get_markup_template("admin.tpl", "addon/fromgplus/"); +function fromgplus_addon_admin(&$a, &$o) +{ + $t = get_markup_template("admin.tpl", "addon/fromgplus/"); - $o = replace_macros($t, [ - '$submit' => t('Save Settings'), - '$key' => ['key', t('Key'), trim(Config::get('fromgplus', 'key')), t('')], - ]); + $o = replace_macros($t, [ + '$submit' => t('Save Settings'), + '$key' => ['key', t('Key'), trim(Config::get('fromgplus', 'key')), t('')], + ]); } -function fromgplus_plugin_admin_post(&$a){ - $key = ((x($_POST,'key')) ? trim($_POST['key']) : ''); - Config::set('fromgplus','key',$key); - info( t('Settings updated.'). EOL ); +function fromgplus_addon_admin_post(&$a) +{ + $key = ((x($_POST, 'key')) ? trim($_POST['key']) : ''); + Config::set('fromgplus', 'key', $key); + info(t('Settings updated.'). EOL); } function fromgplus_cron($a,$b) { diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php index 714b8d81..fa72c2a8 100644 --- a/geocoordinates/geocoordinates.php +++ b/geocoordinates/geocoordinates.php @@ -81,24 +81,24 @@ function geocoordinates_post_hook($a, &$item) geocoordinates_resolve_item($item); } -function geocoordinates_plugin_admin(&$a, &$o) +function geocoordinates_addon_admin(&$a, &$o) { $t = get_markup_template("admin.tpl", "addon/geocoordinates/"); $o = replace_macros($t, [ '$submit' => t('Save Settings'), - '$api_key' => ['api_key', t('API Key'), Config::get('geocoordinates', 'api_key' ), ''], - '$language' => ['language', t('Language code (IETF format)'), Config::get('geocoordinates', 'language' ), ''], + '$api_key' => ['api_key', t('API Key'), Config::get('geocoordinates', 'api_key'), ''], + '$language' => ['language', t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''], ]); } -function geocoordinates_plugin_admin_post(&$a) +function geocoordinates_addon_admin_post(&$a) { - $api_key = ((x($_POST,'api_key')) ? notags(trim($_POST['api_key'])) : ''); - Config::set('geocoordinates','api_key',$api_key); + $api_key = ((x($_POST, 'api_key')) ? notags(trim($_POST['api_key'])) : ''); + Config::set('geocoordinates', 'api_key', $api_key); - $language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : ''); - Config::set('geocoordinates','language',$language); + $language = ((x($_POST, 'language')) ? notags(trim($_POST['language'])) : ''); + Config::set('geocoordinates', 'language', $language); info(t('Settings updated.'). EOL); } diff --git a/geonames/geonames.php b/geonames/geonames.php index 55ae1920..45d8fde5 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -12,7 +12,7 @@ * $a->config['geonames']['username'] = 'your_username'; * Also visit http://geonames.org/manageaccount and enable access to the free web services * - * When plugin is installed, the system calls the plugin + * When addon is installed, the system calls the addon * name_install() function, located in 'addon/name/name.php', * where 'name' is the name of the addon. * If the addon is removed from the configuration list, the @@ -27,7 +27,7 @@ function geonames_install() { /** * - * Our plugin will attach in three places. + * Our addon will attach in three places. * The first is just prior to storing a local post. * */ @@ -36,14 +36,14 @@ function geonames_install() { /** * - * Then we'll attach into the plugin settings page, and also the + * Then we'll attach into the addon settings page, and also the * settings post hook so that we can create and update * user preferences. * */ - Addon::registerHook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin'); - Addon::registerHook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post'); + Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin'); + Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post'); logger("installed geonames"); } @@ -60,8 +60,8 @@ function geonames_uninstall() { */ Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin'); - Addon::unregisterHook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post'); + Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin'); + Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post'); logger("removed geonames"); @@ -76,7 +76,7 @@ function geonames_post_hook($a, &$item) { * An item was posted on the local system. * We are going to look for specific items: * - A status post by a profile owner - * - The profile owner must have allowed our plugin + * - The profile owner must have allowed our addon * */ @@ -137,7 +137,7 @@ function geonames_post_hook($a, &$item) { * */ -function geonames_plugin_admin_post($a,$post) { +function geonames_addon_admin_post($a,$post) { if(! local_user() || (! x($_POST,'geonames-submit'))) return; PConfig::set(local_user(),'geonames','enable',intval($_POST['geonames'])); @@ -148,14 +148,14 @@ function geonames_plugin_admin_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ -function geonames_plugin_admin(&$a,&$s) { +function geonames_addon_admin(&$a,&$s) { if(! local_user()) return; @@ -180,7 +180,7 @@ function geonames_plugin_admin(&$a,&$s) { $s .= '
'; $s .= '

' . t('Geonames Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/gnot/gnot.php b/gnot/gnot.php index 70f422b6..38fb3069 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -12,8 +12,8 @@ use Friendica\Core\PConfig; function gnot_install() { - Addon::registerHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings'); - Addon::registerHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); + Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings'); + Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); logger("installed gnot"); @@ -22,8 +22,8 @@ function gnot_install() { function gnot_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); @@ -52,7 +52,7 @@ function gnot_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ @@ -80,7 +80,7 @@ function gnot_settings(&$a,&$s) { $s .= '

' . t('Gnot Settings') . '

'; $s .= '
'; $s .= '
' . t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index 731129c0..840b361b 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -1,7 +1,7 @@ */ @@ -9,7 +9,7 @@ use Friendica\Core\Addon; use Friendica\Core\Config; /** - * Installs the plugin hook + * Installs the addon hook */ function gravatar_install() { Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup'); @@ -18,7 +18,7 @@ function gravatar_install() { } /** - * Removes the plugin hook + * Removes the addon hook */ function gravatar_uninstall() { Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup'); @@ -56,7 +56,7 @@ function gravatar_lookup($a, &$b) { /** * Display admin settings for this addon */ -function gravatar_plugin_admin (&$a, &$o) { +function gravatar_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/gravatar/" ); $default_avatar = Config::get('gravatar', 'default_img'); @@ -103,7 +103,7 @@ function gravatar_plugin_admin (&$a, &$o) { /** * Save admin settings */ -function gravatar_plugin_admin_post (&$a) { +function gravatar_addon_admin_post (&$a) { check_form_security_token('gravatarsave'); $default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon'); diff --git a/group_text/group_text.php b/group_text/group_text.php index 27bd173b..d5163e73 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -10,8 +10,8 @@ use Friendica\Core\PConfig; function group_text_install() { - Addon::registerHook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings'); - Addon::registerHook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); + Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings'); + Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); logger("installed group_text"); } @@ -19,8 +19,8 @@ function group_text_install() { function group_text_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); logger("removed group_text"); @@ -48,7 +48,7 @@ function group_text_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ diff --git a/impressum/impressum.php b/impressum/impressum.php index 15e33869..df508868 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -1,7 +1,7 @@ * License: 3-clause BSD license @@ -16,13 +16,13 @@ use Friendica\Core\Config; function impressum_install() { Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show'); Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer'); - logger("installed impressum plugin"); + logger("installed impressum Addon"); } function impressum_uninstall() { Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show'); Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer'); - logger("uninstalled impressum plugin"); + logger("uninstalled impressum Addon"); } function impressum_module() { @@ -74,7 +74,7 @@ function impressum_show($a,&$b) { } } -function impressum_plugin_admin_post (&$a) { +function impressum_addon_admin_post (&$a) { $owner = ((x($_POST, 'owner')) ? notags(trim($_POST['owner'])) : ''); $ownerprofile = ((x($_POST, 'ownerprofile')) ? notags(trim($_POST['ownerprofile'])) : ''); $postal = ((x($_POST, 'postal')) ? (trim($_POST['postal'])) : ''); @@ -89,7 +89,7 @@ function impressum_plugin_admin_post (&$a) { Config::set('impressum','footer_text',strip_tags($footer_text)); info( t('Settings updated.'). EOL ); } -function impressum_plugin_admin (&$a, &$o) { +function impressum_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/impressum/" ); $o = replace_macros($t, [ '$submit' => t('Save Settings'), diff --git a/irc/irc.php b/irc/irc.php index e2fd50ba..288f65ca 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -1,6 +1,6 @@ @@ -12,13 +12,13 @@ use Friendica\Core\PConfig; function irc_install() { Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu'); - Addon::registerHook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post'); } function irc_uninstall() { Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu'); - Addon::unregisterHook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings'); + Addon::unregisterHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings'); } @@ -120,7 +120,7 @@ return $o; } -function irc_plugin_admin_post (&$a) { +function irc_addon_admin_post (&$a) { if(! is_site_admin()) return; @@ -131,7 +131,7 @@ function irc_plugin_admin_post (&$a) { info( t('IRC settings saved.') . EOL); } } -function irc_plugin_admin (&$a, &$o) { +function irc_addon_admin (&$a, &$o) { $sitechats = Config::get('irc','sitechats'); /* popular channels */ $autochans = Config::get('irc','autochans'); /* auto connect chans */ $t = get_markup_template( "admin.tpl", "addon/irc/" ); diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index 2e3cbc77..dc40840a 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -70,8 +70,8 @@ use Friendica\Model\User; function jappixmini_install() { - Addon::registerHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings'); - Addon::registerHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post'); + Addon::registerHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings'); + Addon::registerHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post'); Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script'); Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login'); @@ -104,8 +104,8 @@ function jappixmini_install() function jappixmini_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post'); Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script'); Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login'); @@ -115,7 +115,7 @@ function jappixmini_uninstall() Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source'); } -function jappixmini_plugin_admin(App $a, &$o) +function jappixmini_addon_admin(App $a, &$o) { // display instructions and warnings on addon settings page for admin if (!file_exists("addon/jappixmini.tgz")) { @@ -159,7 +159,7 @@ function jappixmini_plugin_admin(App $a, &$o) $o .= ''; } -function jappixmini_plugin_admin_post(App $a) +function jappixmini_addon_admin_post(App $a) { // set info text $submit = $_REQUEST['jappixmini-admin-settings']; @@ -230,7 +230,7 @@ function jappixmini_init() } - // do not return an address if user deactivated plugin + // do not return an address if user deactivated addon $activated = PConfig::get($uid, 'jappixmini', 'activate'); if (!$activated) { killme(); diff --git a/krynn/krynn.php b/krynn/krynn.php index 93082419..6d47bc5f 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -16,7 +16,7 @@ function krynn_install() { /** * - * Our demo plugin will attach in three places. + * Our demo addon will attach in three places. * The first is just prior to storing a local post. * */ @@ -25,14 +25,14 @@ function krynn_install() { /** * - * Then we'll attach into the plugin settings page, and also the + * Then we'll attach into the addon settings page, and also the * settings post hook so that we can create and update * user preferences. * */ - Addon::registerHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); - Addon::registerHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); logger("installed krynn"); } @@ -49,8 +49,8 @@ function krynn_uninstall() { */ Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); logger("removed krynn"); @@ -65,7 +65,7 @@ function krynn_post_hook($a, &$item) { * An item was posted on the local system. * We are going to look for specific items: * - A status post by a profile owner - * - The profile owner must have allowed our plugin + * - The profile owner must have allowed our addon * */ @@ -126,7 +126,7 @@ function krynn_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the addon Setting form. * Add our own settings info to the page. * */ @@ -162,7 +162,7 @@ function krynn_settings(&$a,&$s) { $s .= '
'; $s .= '

' . t('Krynn Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index 4bc1b232..e569ed37 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -20,15 +20,15 @@ use Friendica\Core\PConfig; function langfilter_install() { Addon::registerHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body', 10); - Addon::registerHook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post'); } function langfilter_uninstall() { Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body'); - Addon::unregisterHook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post'); } /* The settings diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 3979416f..bba5a881 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -1,7 +1,7 @@ = 5.3) + * Description: If there is no avatar image for a new user or contact this addon will look for one at Libravatar. Please disable Gravatar addon if you use this one. (requires PHP >= 5.3) * Version: 1.1 * Author: Klaus Weidenbach */ @@ -9,7 +9,7 @@ use Friendica\Core\Addon; use Friendica\Core\Config; /** - * Installs the plugin hook + * Installs the addon hook */ function libravatar_install() { if (! version_compare(PHP_VERSION, '5.3.0', '>=')) { @@ -23,7 +23,7 @@ function libravatar_install() { } /** - * Removes the plugin hook + * Removes the addon hook */ function libravatar_uninstall() { Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup'); @@ -61,7 +61,7 @@ function libravatar_lookup($a, &$b) { /** * Display admin settings for this addon */ -function libravatar_plugin_admin (&$a, &$o) { +function libravatar_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/libravatar" ); $default_avatar = Config::get('libravatar', 'default_img'); @@ -106,7 +106,7 @@ function libravatar_plugin_admin (&$a, &$o) { /** * Save admin settings */ -function libravatar_plugin_admin_post (&$a) { +function libravatar_addon_admin_post (&$a) { check_form_security_token('libravatarrsave'); $default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon'); diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index c427ae76..d40fdb7a 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -11,8 +11,8 @@ use Friendica\Core\PConfig; use Friendica\Database\DBM; function mailstream_install() { - Addon::registerHook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings'); - Addon::registerHook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post'); + Addon::registerHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post'); Addon::registerHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook'); Addon::registerHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook'); Addon::registerHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron'); @@ -52,8 +52,8 @@ function mailstream_install() { } function mailstream_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post'); Addon::unregisterHook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook'); Addon::unregisterHook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook'); Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook'); @@ -66,7 +66,7 @@ function mailstream_uninstall() { function mailstream_module() {} -function mailstream_plugin_admin(&$a,&$o) { +function mailstream_addon_admin(&$a,&$o) { $frommail = Config::get('mailstream', 'frommail'); $template = get_markup_template('admin.tpl', 'addon/mailstream/'); $config = ['frommail', @@ -78,7 +78,7 @@ function mailstream_plugin_admin(&$a,&$o) { '$submit' => t('Save Settings')]); } -function mailstream_plugin_admin_post ($a) { +function mailstream_addon_admin_post ($a) { if (x($_POST, 'frommail')) { Config::set('mailstream', 'frommail', $_POST['frommail']); } @@ -266,7 +266,7 @@ function mailstream_send($a, $message_id, $item, $user) { } $mail = new PHPmailer; try { - $mail->XMailer = 'Friendica Mailstream Plugin'; + $mail->XMailer = 'Friendica Mailstream Addon'; $mail->SetFrom($frommail, mailstream_sender($item)); $mail->AddAddress($address, $user['username']); $mail->MessageID = $message_id; @@ -346,7 +346,7 @@ function mailstream_cron($a, $b) { mailstream_tidy(); } -function mailstream_plugin_settings(&$a,&$s) { +function mailstream_addon_settings(&$a,&$s) { $enabled = PConfig::get(local_user(), 'mailstream', 'enabled'); $address = PConfig::get(local_user(), 'mailstream', 'address'); $nolikes = PConfig::get(local_user(), 'mailstream', 'nolikes'); @@ -376,7 +376,7 @@ function mailstream_plugin_settings(&$a,&$s) { '$submit' => t('Save Settings')]); } -function mailstream_plugin_settings_post($a,$post) { +function mailstream_addon_settings_post($a,$post) { if ($_POST['mailstream_address'] != "") { PConfig::set(local_user(), 'mailstream', 'address', $_POST['mailstream_address']); } diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index fc18b51d..8308651f 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -13,14 +13,14 @@ use Friendica\Core\PConfig; function mathjax_install() { Addon::registerHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header'); - Addon::registerHook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); - Addon::registerHook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); - logger('installed js_math plugin'); + Addon::registerHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); + Addon::registerHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); + logger('installed js_math addon'); } function mathjax_uninstall() { Addon::unregisterHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header'); - Addon::unregisterHook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); } function mathjax_settings_post ($a, $post) { if (! local_user()) @@ -68,12 +68,12 @@ function mathjax_page_header($a, &$b) { } } } -function mathjax_plugin_admin_post (&$a) { +function mathjax_addon_admin_post (&$a) { $baseurl = ((x($_POST, 'baseurl')) ? trim($_POST['baseurl']) : 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'); Config::set('mathjax','baseurl',$baseurl); info( t('Settings updated.'). EOL); } -function mathjax_plugin_admin (&$a, &$o) { +function mathjax_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/mathjax/" ); if (Config::get('mathjax','baseurl','') == '') { Config::set('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'); diff --git a/membersince/membersince.php b/membersince/membersince.php index 3b454fa3..14669e35 100644 --- a/membersince/membersince.php +++ b/membersince/membersince.php @@ -1,21 +1,30 @@ - * + * */ use Friendica\Core\Addon; -require_once('include/datetime.php'); +require_once 'include/datetime.php'; + +function membersince_install() +{ + Addon::registerHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); +} -function membersince_install(){ Addon::registerHook('profile_advanced','addon/membersince/membersince.php','membersince_display'); } +function membersince_uninstall() +{ + Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); +} -function membersince_uninstall(){ Addon::unregisterHook('profile_advanced','addon/membersince/membersince.php','membersince_display'); } +function membersince_display(&$a, &$b) +{ + // Works in Vier + $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . t('Member since:') . "
\n
" . datetime_convert('UTC', date_default_timezone_get(), $a->profile['register_date']) . "
\n
", $b, 1); -function membersince_display(&$a,&$b) { -$b = preg_replace('/<\/dl>/',"\n\n\n
\n
" . t('Member since:') . "
\n
" . datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date']) . "
\n
" ,$b, 1); -//$b = str_replace('
' . "\n" . '
',sprintf( t(' - Member since: %s') . EOL, datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date'])) . '' . "\n" . '
',$b); -} \ No newline at end of file + // Trying for Frio + //$b = preg_replace('/<\/div>/', "

" . t('Member since:') . "
" . datetime_convert('UTC', date_default_timezone_get(), $a->profile['register_date']) . "
", $b, 1); +} diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index b912b074..516a472e 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -37,7 +37,7 @@ function newmemberwidget_network_mod_init ( $a, $b) { } } -function newmemberwidget_plugin_admin_post( &$a ) { +function newmemberwidget_addon_admin_post( &$a ) { $ft = ((x($_POST, 'freetext')) ? trim($_POST['freetext']) : ""); $lsn = ((x($_POST, 'localsupportname')) ? notags(trim($_POST['localsupportname'])) : ""); $gs = intval($_POST['linkglobalsupport']); @@ -48,7 +48,7 @@ function newmemberwidget_plugin_admin_post( &$a ) { Config::set ( 'newmemberwidget', 'localsupport', trim($lsn)); } -function newmemberwidget_plugin_admin(&$a, &$o){ +function newmemberwidget_addon_admin(&$a, &$o){ $t = get_markup_template('admin.tpl','addon/newmemberwidget'); $o = replace_macros($t, [ '$submit' => t('Save Settings'), diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index a667f6a6..cdaa1815 100644 --- a/notifyall/notifyall.php +++ b/notifyall/notifyall.php @@ -21,7 +21,7 @@ function notifyall_uninstall() { function notifyall_module() {} -function notifyall_plugin_admin(&$a, &$o) { +function notifyall_addon_admin(&$a, &$o) { $o = '
    ' . t('Send email to all members') . '
'; diff --git a/notimeline/notimeline.php b/notimeline/notimeline.php index bc06f78b..a1acd72c 100644 --- a/notimeline/notimeline.php +++ b/notimeline/notimeline.php @@ -12,15 +12,15 @@ use Friendica\Core\PConfig; function notimeline_install() { - Addon::registerHook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); - Addon::registerHook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); + Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); + Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); } function notimeline_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); } diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 7c37fc2e..e43f0b51 100644 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -11,16 +11,16 @@ use Friendica\Core\PConfig; function nsfw_install() { Addon::registerHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body', 10); - Addon::registerHook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post'); } function nsfw_uninstall() { Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body'); - Addon::unregisterHook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post'); } @@ -83,7 +83,7 @@ function nsfw_addon_settings(&$a,&$s) { $s .= ''; $s .= '
'; - $s .= '

' . t ('This plugin looks in posts for the words/text you specify below, and collapses any content containing those keywords so it is not displayed at inappropriate times, such as sexual innuendo that may be improper in a work setting. It is polite and recommended to tag any content containing nudity with #NSFW. This filter can also match any other word/text you specify, and can thereby be used as a general purpose content filter.') . '

'; + $s .= '

' . t ('This addon looks in posts for the words/text you specify below, and collapses any content containing those keywords so it is not displayed at inappropriate times, such as sexual innuendo that may be improper in a work setting. It is polite and recommended to tag any content containing nudity with #NSFW. This filter can also match any other word/text you specify, and can thereby be used as a general purpose content filter.') . '

'; $s .= ''; $s .= ''; $s .= '
'; diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index 9e3463c3..5d6575c4 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -10,8 +10,8 @@ use Friendica\Core\PConfig; function numfriends_install() { - Addon::registerHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); - Addon::registerHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); + Addon::registerHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); + Addon::registerHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); logger("installed numfriends"); } @@ -19,15 +19,13 @@ function numfriends_install() { function numfriends_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); logger("removed numfriends"); } - - /** * * Callback from the settings post function. @@ -36,7 +34,6 @@ function numfriends_uninstall() { * and if so set our configuration setting for this person. * */ - function numfriends_settings_post($a,$post) { if(! local_user() || (! x($_POST,'numfriends-submit'))) return; @@ -48,13 +45,10 @@ function numfriends_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ - - - function numfriends_settings(&$a, &$s) { if (! local_user()) { diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index d61d0020..29ada924 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -163,7 +163,7 @@ function openstreetmap_generate_map(&$a, &$b) } -function openstreetmap_plugin_admin(&$a, &$o) +function openstreetmap_addon_admin(&$a, &$o) { $t = get_markup_template("admin.tpl", "addon/openstreetmap/"); $tmsserver = Config::get('openstreetmap', 'tmsserver'); @@ -192,7 +192,7 @@ function openstreetmap_plugin_admin(&$a, &$o) ]); } -function openstreetmap_plugin_admin_post(&$a) +function openstreetmap_addon_admin_post(&$a) { $urltms = ((x($_POST, 'tmsserver')) ? notags(trim($_POST['tmsserver'])) : ''); $urlnom = ((x($_POST, 'nomserver')) ? notags(trim($_POST['nomserver'])) : ''); diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 0a293103..96ad3630 100644 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -12,16 +12,16 @@ use Friendica\Core\Config; function pageheader_install() { Addon::registerHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); - Addon::registerHook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); } function pageheader_uninstall() { Addon::unregisterHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); - Addon::unregisterHook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post'); // hook moved, uninstall the old one if still there. Addon::unregisterHook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch'); diff --git a/piwik/piwik.php b/piwik/piwik.php index ddba2dd9..326b931f 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -1,13 +1,13 @@ * Author: Klaus Weidenbach */ -/* Piwik Analytics Plugin for Friendica +/* Piwik Analytics Addon for Friendica * * Author: Tobias Diekershoff * tobias.diekershoff@gmx.net @@ -35,19 +35,19 @@ use Friendica\Core\Config; function piwik_install() { Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics'); - logger("installed piwik plugin"); + logger("installed piwik addon"); } function piwik_uninstall() { Addon::unregisterHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics'); - logger("uninstalled piwik plugin"); + logger("uninstalled piwik addon"); } function piwik_analytics($a,&$b) { /* - * styling of every HTML block added by this plugin is done in the + * styling of every HTML block added by this addon is done in the * associated CSS file. We just have to tell Friendica to get it * into the page header. */ @@ -85,7 +85,7 @@ function piwik_analytics($a,&$b) { $b .= "
"; } } -function piwik_plugin_admin (&$a, &$o) { +function piwik_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/piwik/" ); $o = replace_macros( $t, [ '$submit' => t('Save Settings'), @@ -95,7 +95,7 @@ function piwik_plugin_admin (&$a, &$o) { '$async' => ['async', t('Asynchronous tracking'), Config::get('piwik','async' ), ''], ]); } -function piwik_plugin_admin_post (&$a) { +function piwik_addon_admin_post (&$a) { $url = ((x($_POST, 'baseurl')) ? notags(trim($_POST['baseurl'])) : ''); $id = ((x($_POST, 'siteid')) ? trim($_POST['siteid']) : ''); $optout = ((x($_POST, 'optout')) ? trim($_POST['optout']) : ''); diff --git a/planets/planets.php b/planets/planets.php index 794d1f02..04fb72ca 100644 --- a/planets/planets.php +++ b/planets/planets.php @@ -1,7 +1,7 @@ * Author: Tony Baldwin @@ -13,7 +13,7 @@ function planets_install() { /** * - * Our demo plugin will attach in three places. + * Our demo addon will attach in three places. * The first is just prior to storing a local post. * */ @@ -22,14 +22,14 @@ function planets_install() { /** * - * Then we'll attach into the plugin settings page, and also the + * Then we'll attach into the addon settings page, and also the * settings post hook so that we can create and update * user preferences. * */ - Addon::registerHook('plugin_settings', 'addon/planets/planets.php', 'planets_settings'); - Addon::registerHook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post'); + Addon::registerHook('addon_settings', 'addon/planets/planets.php', 'planets_settings'); + Addon::registerHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post'); logger("installed planets"); } @@ -46,8 +46,8 @@ function planets_uninstall() { */ Addon::unregisterHook('post_local', 'addon/planets/planets.php', 'planets_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/planets/planets.php', 'planets_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/planets/planets.php', 'planets_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post'); logger("removed planets"); @@ -62,7 +62,7 @@ function planets_post_hook($a, &$item) { * An item was posted on the local system. * We are going to look for specific items: * - A status post by a profile owner - * - The profile owner must have allowed our plugin + * - The profile owner must have allowed our addon * */ @@ -123,7 +123,7 @@ function planets_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ @@ -158,7 +158,7 @@ function planets_settings(&$a,&$s) { $s .= '
'; $s .= '

' . t('Planets Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/pledgie/pledgie.php b/pledgie/pledgie.php index 27897e52..2b75268b 100644 --- a/pledgie/pledgie.php +++ b/pledgie/pledgie.php @@ -12,14 +12,14 @@ use Friendica\Core\Config; function pledgie_install() { Addon::registerHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); - Addon::registerHook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); } function pledgie_uninstall() { Addon::unregisterHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); - Addon::unregisterHook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post'); } function pledgie_addon_settings(&$a,&$s) { diff --git a/public_server/public_server.php b/public_server/public_server.php index 422746f0..2c096568 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -1,7 +1,7 @@ */ @@ -141,8 +141,8 @@ function public_server_login($a,$b) { ); } -function public_server_plugin_admin_post ( &$a ) { - check_form_security_token_redirectOnErr('/admin/plugins/publicserver', 'publicserver'); +function public_server_addon_admin_post ( &$a ) { + check_form_security_token_redirectOnErr('/admin/addons/publicserver', 'publicserver'); $expiredays = (( x($_POST, 'expiredays') ) ? notags(trim($_POST['expiredays'] )) : ''); $expireposts = (( x($_POST, 'expireposts') ) ? notags(trim($_POST['expireposts'] )) : ''); $nologin = (( x($_POST, 'nologin') ) ? notags(trim($_POST['nologin'] )) : ''); @@ -157,7 +157,7 @@ function public_server_plugin_admin_post ( &$a ) { Config::set( 'public_server','flagpostsexpire',$flagpostsexpire ); info( t('Settings saved').EOL ); } -function public_server_plugin_admin ( &$a, &$o) { +function public_server_addon_admin ( &$a, &$o) { $token = get_form_security_token("publicserver"); $t = get_markup_template( "admin.tpl", "addon/public_server"); $o = replace_macros($t, [ diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php index 2e1783c0..447f8abf 100644 --- a/qcomment/qcomment.php +++ b/qcomment/qcomment.php @@ -9,7 +9,7 @@ * * Provides a set of text "snippets" which can be inserted into a comment window by clicking on them. * First enable the addon in the system admin panel. - * Then each person can tailor their choice of words in Settings->Plugin Settings in the Qcomment + * Then each person can tailor their choice of words in Settings->Addon Settings in the Qcomment * pane. Initially no qcomments are provided, but on viewing the settings page, a default set of * of words is suggested. These can be accepted (click Submit) or edited first. Each text line represents * a different qcomment. @@ -23,15 +23,15 @@ use Friendica\Core\Addon; use Friendica\Core\PConfig; function qcomment_install() { - Addon::registerHook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post'); } function qcomment_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post'); } diff --git a/randplace/randplace.php b/randplace/randplace.php index a6a639ec..96e549a6 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -1,7 +1,7 @@ * @@ -11,7 +11,7 @@ * Addons are registered with the system through the admin * panel. * - * When registration is detected, the system calls the plugin + * When registration is detected, the system calls the addon * name_install() function, located in 'addon/name/name.php', * where 'name' is the name of the addon. * If the addon is removed from the configuration list, the @@ -25,7 +25,7 @@ function randplace_install() { /** * - * Our demo plugin will attach in three places. + * Our demo addon will attach in three places. * The first is just prior to storing a local post. * */ @@ -34,14 +34,14 @@ function randplace_install() { /** * - * Then we'll attach into the plugin settings page, and also the + * Then we'll attach into the addon settings page, and also the * settings post hook so that we can create and update * user preferences. * */ - Addon::registerHook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings'); - Addon::registerHook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); + Addon::registerHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); + Addon::registerHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); logger("installed randplace"); } @@ -58,8 +58,8 @@ function randplace_uninstall() { */ Addon::unregisterHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); logger("removed randplace"); @@ -74,7 +74,7 @@ function randplace_post_hook($a, &$item) { * An item was posted on the local system. * We are going to look for specific items: * - A status post by a profile owner - * - The profile owner must have allowed our plugin + * - The profile owner must have allowed our addon * */ @@ -142,7 +142,7 @@ function randplace_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ @@ -169,7 +169,7 @@ function randplace_settings(&$a,&$s) { $s .= '
'; $s .= '

' . t('Randplace Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/remote_permissions/remote_permissions.php b/remote_permissions/remote_permissions.php index 7c74df9f..408316e6 100644 --- a/remote_permissions/remote_permissions.php +++ b/remote_permissions/remote_permissions.php @@ -12,14 +12,14 @@ use Friendica\Core\PConfig; function remote_permissions_install() { Addon::registerHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content'); - Addon::registerHook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings'); - Addon::registerHook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post'); + Addon::registerHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings'); + Addon::registerHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post'); } function remote_permissions_uninstall() { Addon::unregisterHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content'); - Addon::unregisterHook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post'); } function remote_permissions_settings(&$a,&$o) { @@ -192,7 +192,7 @@ function remote_permissions_content($a, $item_copy) { return; } -function remote_permissions_plugin_admin(&$a, &$o){ +function remote_permissions_addon_admin(&$a, &$o){ $t = get_markup_template( "admin.tpl", "addon/remote_permissions/" ); $o = replace_macros($t, [ '$submit' => t('Save Settings'), @@ -201,7 +201,7 @@ function remote_permissions_plugin_admin(&$a, &$o){ ]); } -function remote_permissions_plugin_admin_post(&$a){ +function remote_permissions_addon_admin_post(&$a){ $choice = ((x($_POST,'remotepermschoice')) ? notags(trim($_POST['remotepermschoice'])) : ''); Config::set('remote_perms','global',($choice == 1 ? 1 : 0)); info( t('Settings updated.'). EOL ); diff --git a/securemail/securemail.php b/securemail/securemail.php index 33bbf030..e62b6076 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -24,8 +24,8 @@ require_once 'openpgp_crypt_symmetric.php'; function securemail_install() { - Addon::registerHook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings'); - Addon::registerHook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post'); + Addon::registerHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings'); + Addon::registerHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post'); Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare'); @@ -33,8 +33,8 @@ function securemail_install() { } function securemail_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post'); Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare'); @@ -44,7 +44,7 @@ function securemail_uninstall() { /** * @brief Build user settings form * - * @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#plugin_settings 'plugin_settings' hook + * @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#addon_settings 'addon_settings' hook * * @param App $a App instance * @param string $s output html @@ -73,7 +73,7 @@ function securemail_settings(App &$a, &$s){ /** * @brief Handle data from user settings form * - * @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#plugin_settings_post 'plugin_settings_post' hook + * @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#addon_settings_post 'addon_settings_post' hook * * @param App $a App instance * @param array $b hook data @@ -138,7 +138,7 @@ function securemail_settings_post(App &$a, array &$b){ /** * @brief Encrypt notification emails text * - * @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#emailer_send_prepare 'emailer_send_prepare' hook + * @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#emailer_send_prepare 'emailer_send_prepare' hook * * @param App $a App instance * @param array $b hook data diff --git a/showmore/showmore.php b/showmore/showmore.php index 8f0e6693..f6e5028c 100644 --- a/showmore/showmore.php +++ b/showmore/showmore.php @@ -12,14 +12,14 @@ use Friendica\Core\PConfig; function showmore_install() { Addon::registerHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body'); - Addon::registerHook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post'); } function showmore_uninstall() { Addon::unregisterHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body'); - Addon::unregisterHook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post'); } function showmore_addon_settings(&$a,&$s) { diff --git a/startpage/startpage.php b/startpage/startpage.php index 263ec395..872fb234 100644 --- a/startpage/startpage.php +++ b/startpage/startpage.php @@ -11,15 +11,15 @@ use Friendica\Core\PConfig; function startpage_install() { Addon::registerHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init'); - Addon::registerHook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings'); - Addon::registerHook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); + Addon::registerHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings'); + Addon::registerHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); } function startpage_uninstall() { Addon::unregisterHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init'); - Addon::unregisterHook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); } @@ -54,7 +54,7 @@ function startpage_settings_post($a,$post) { /** * - * Called from the Plugin Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index e867ea46..3d708389 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -170,8 +170,8 @@ function statusnet_uninstall() // old setting - remove only Addon::unregisterHook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post'); } function statusnet_check_item_notification(App $a, &$notification_data) @@ -707,7 +707,7 @@ function statusnet_post_hook(App $a, &$b) } } -function statusnet_plugin_admin_post(App $a) +function statusnet_addon_admin_post(App $a) { $sites = []; @@ -739,7 +739,7 @@ function statusnet_plugin_admin_post(App $a) $sites = Config::set('statusnet', 'sites', $sites); } -function statusnet_plugin_admin(App $a, &$o) +function statusnet_addon_admin(App $a, &$o) { $sites = Config::get('statusnet', 'sites'); $sitesform = []; diff --git a/superblock/superblock.php b/superblock/superblock.php index 2e1004a1..b6d19de4 100644 --- a/superblock/superblock.php +++ b/superblock/superblock.php @@ -13,8 +13,8 @@ use Friendica\Core\PConfig; function superblock_install() { - Addon::registerHook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post'); Addon::registerHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start'); Addon::registerHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu'); Addon::registerHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store'); @@ -24,8 +24,8 @@ function superblock_install() { function superblock_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post'); Addon::unregisterHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start'); Addon::unregisterHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu'); Addon::unregisterHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store'); diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php index df47a8e3..ff218d0a 100644 --- a/tumblr/tumblr.php +++ b/tumblr/tumblr.php @@ -58,7 +58,7 @@ function tumblr_content(&$a) { return $o; } -function tumblr_plugin_admin(&$a, &$o){ +function tumblr_addon_admin(&$a, &$o){ $t = get_markup_template( "admin.tpl", "addon/tumblr/" ); $o = replace_macros($t, [ @@ -69,7 +69,7 @@ function tumblr_plugin_admin(&$a, &$o){ ]); } -function tumblr_plugin_admin_post(&$a){ +function tumblr_addon_admin_post(&$a){ $consumer_key = ((x($_POST,'consumer_key')) ? notags(trim($_POST['consumer_key'])) : ''); $consumer_secret = ((x($_POST,'consumer_secret')) ? notags(trim($_POST['consumer_secret'])): ''); Config::set('tumblr','consumer_key',$consumer_key); @@ -218,7 +218,7 @@ function tumblr_settings(&$a,&$s) { $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/twitter/twitter.php b/twitter/twitter.php index 1b475801..a33415d8 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -33,7 +33,7 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -/* Twitter Plugin for Friendica +/* Twitter Addon for Friendica * * Author: Tobias Diekershoff * tobias.diekershoff@gmx.net @@ -41,7 +41,7 @@ * License:3-clause BSD license * * Configuration: - * To use this plugin you need a OAuth Consumer key pair (key & secret) + * To use this addon you need a OAuth Consumer key pair (key & secret) * you can get it from Twitter at https://twitter.com/apps * * Register your Friendica site as "Client" application with "Read & Write" access @@ -53,9 +53,9 @@ * $a->config['twitter']['consumerkey'] = 'your consumer_key here'; * $a->config['twitter']['consumersecret'] = 'your consumer_secret here'; * - * To activate the plugin itself add it to the $a->config['system']['addon'] + * To activate the addon itself add it to the $a->config['system']['addon'] * setting. After this, your user can configure their Twitter account settings - * from "Settings -> Plugin Settings". + * from "Settings -> Addon Settings". * * Requirements: PHP5, curl [Slinky library] */ @@ -109,8 +109,8 @@ function twitter_uninstall() // old setting - remove only Addon::unregisterHook('post_local_end', 'addon/twitter/twitter.php', 'twitter_post_hook'); - Addon::unregisterHook('plugin_settings', 'addon/twitter/twitter.php', 'twitter_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/twitter/twitter.php', 'twitter_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post'); } function twitter_check_item_notification(App $a, &$notification_data) @@ -301,7 +301,7 @@ function twitter_settings(App $a, &$s) /* * * * make some nice form */ - $s .= '

' . t('At this Friendica instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '

'; + $s .= '

' . t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '

'; $s .= '' . t('Log in with Twitter') . ''; $s .= '
'; $s .= ''; @@ -641,7 +641,7 @@ function twitter_post_hook(App $a, &$b) } } -function twitter_plugin_admin_post(App $a) +function twitter_addon_admin_post(App $a) { $consumerkey = x($_POST, 'consumerkey') ? notags(trim($_POST['consumerkey'])) : ''; $consumersecret = x($_POST, 'consumersecret') ? notags(trim($_POST['consumersecret'])) : ''; @@ -650,7 +650,7 @@ function twitter_plugin_admin_post(App $a) info(t('Settings updated.') . EOL); } -function twitter_plugin_admin(App $a, &$o) +function twitter_addon_admin(App $a, &$o) { $t = get_markup_template("admin.tpl", "addon/twitter/"); diff --git a/webrtc/webrtc.php b/webrtc/webrtc.php index fe12248e..a71bac2a 100644 --- a/webrtc/webrtc.php +++ b/webrtc/webrtc.php @@ -22,14 +22,14 @@ function webrtc_app_menu($a,&$b) { $b['app_menu'][] = ''; } -function webrtc_plugin_admin (&$a, &$o) { +function webrtc_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/webrtc/" ); $o = replace_macros( $t, [ '$submit' => t('Save Settings'), '$webrtcurl' => ['webrtcurl', t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')], ]); } -function webrtc_plugin_admin_post (&$a) { +function webrtc_addon_admin_post (&$a) { $url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : ''); Config::set('webrtc', 'webrtcurl', $url); info( t('Settings updated.'). EOL); diff --git a/widgets/widgets.php b/widgets/widgets.php index 69f03a8e..9867b884 100644 --- a/widgets/widgets.php +++ b/widgets/widgets.php @@ -9,13 +9,13 @@ use Friendica\Core\Addon; use Friendica\Core\PConfig; function widgets_install() { - Addon::registerHook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings'); - Addon::registerHook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post'); + Addon::registerHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings'); + Addon::registerHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post'); logger("installed widgets"); } function widgets_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post'); } @@ -122,7 +122,7 @@ function widgets_content(&$a) { if (isset($_GET['p']) && local_user()==$conf['uid'] ) { $o .= ""; $o .= "

Preview Widget

"; - $o .= ''. t("Plugin Settings") .''; + $o .= ''. t("Addon Settings") .''; $o .= "

".call_user_func($a->argv[1].'_widget_name')."

"; $o .= call_user_func($a->argv[1].'_widget_help'); diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 377d2cd4..861bb7af 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -10,7 +10,7 @@ * Pre-requisite: Windows Phone mobile device (at least WP 7.0) * Friendica mobile app on Windows Phone * - * When plugin is installed, the system calls the plugin + * When addon is installed, the system calls the addon * name_install() function, located in 'addon/name/name.php', * where 'name' is the name of the addon. * If the addon is removed from the configuration list, the @@ -32,19 +32,19 @@ use Friendica\Model\User; function windowsphonepush_install() { - /* Our plugin will attach in three places. + /* Our addon will attach in three places. * The first is within cron - so the push notifications will be * sent every 10 minutes (or whatever is set in crontab). */ Addon::registerHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron'); - /* Then we'll attach into the plugin settings page, and also the + /* Then we'll attach into the addon settings page, and also the * settings post hook so that we can create and update - * user preferences. User shall be able to activate the plugin and + * user preferences. User shall be able to activate the addon and * define whether he allows pushing first characters of item text */ - Addon::registerHook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings'); - Addon::registerHook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post'); + Addon::registerHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings'); + Addon::registerHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post'); logger("installed windowsphonepush"); } @@ -55,8 +55,8 @@ function windowsphonepush_uninstall() * during install. Don't delete data in table `pconfig`. */ Addon::unregisterHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron'); - Addon::unregisterHook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post'); logger("removed windowsphonepush"); } @@ -89,7 +89,7 @@ function windowsphonepush_settings_post($a, $post) info(t('WindowsPhonePush settings updated.') . EOL); } -/* Called from the Plugin Setting form. +/* Called from the Addon Setting form. * Add our own settings info to the page. */ function windowsphonepush_settings(&$a, &$s) @@ -115,7 +115,7 @@ function windowsphonepush_settings(&$a, &$s) $s .= '

' . t('WindowsPhonePush Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; @@ -136,12 +136,12 @@ function windowsphonepush_settings(&$a, &$s) return; } -/* Cron function used to regularly check all users on the server with active windowsphonepushplugin and send +/* Cron function used to regularly check all users on the server with active windowsphonepushaddon and send * notifications to the Microsoft servers and consequently to the Windows Phone device */ function windowsphonepush_cron() { - // retrieve all UID's for which the plugin windowsphonepush is enabled and loop through every user + // retrieve all UID's for which the addon windowsphonepush is enabled and loop through every user $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'windowsphonepush' AND `k` = 'enable' AND `v` = 1"); if (count($r)) { foreach ($r as $rr) { @@ -152,7 +152,7 @@ function windowsphonepush_cron() // pushing only possible if device_url (the URI on Microsoft server) is available or not "NA" (which will be sent // by app if user has switched the server setting in app - sending blank not possible as this would return an update error) if (( $device_url == "" ) || ( $device_url == "NA" )) { - // no Device-URL for the user availabe, but plugin is enabled --> write info to Logger + // no Device-URL for the user availabe, but addon is enabled --> write info to Logger logger("WARN: windowsphonepush is enable for user " . $rr['uid'] . ", but no Device-URL is specified for the user."); } else { // retrieve the number of unseen items and the id of the latest one (if there are more than @@ -393,7 +393,7 @@ function windowsphonepush_updatesettings() return "Not Authenticated"; } - // no updating if user hasn't enabled the plugin + // no updating if user hasn't enabled the addon $enable = PConfig::get(local_user(), 'windowsphonepush', 'enable'); if (!$enable) { return "Plug-in not enabled"; @@ -434,7 +434,7 @@ function windowsphonepush_updatecounterunseen() return "Not Authenticated"; } - // no updating if user hasn't enabled the plugin + // no updating if user hasn't enabled the addon $enable = PConfig::get(local_user(), 'windowsphonepush', 'enable'); if (!$enable) { return "Plug-in not enabled"; diff --git a/wppost/wppost.php b/wppost/wppost.php index d73005a3..af371af1 100644 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -26,8 +26,8 @@ function wppost_uninstall() { // obsolete - remove Addon::unregisterHook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send'); - Addon::unregisterHook('plugin_settings', 'addon/wppost/wppost.php', 'wppost_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post'); } @@ -86,7 +86,7 @@ function wppost_settings(&$a,&$s) { $s .= '

'. t('Wordpress Export').'

'; $s .= ''; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index fc2d6bb5..2548005e 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -13,21 +13,21 @@ use Friendica\Core\PConfig; function xmpp_install() { - Addon::registerHook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings'); - Addon::registerHook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post'); + Addon::registerHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post'); Addon::registerHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script'); Addon::registerHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login'); } function xmpp_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post'); Addon::unregisterHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script'); Addon::unregisterHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login'); } -function xmpp_plugin_settings_post() +function xmpp_addon_settings_post() { if (!local_user() || (!x($_POST, 'xmpp-settings-submit'))) { return; @@ -39,7 +39,7 @@ function xmpp_plugin_settings_post() info(t('XMPP settings updated.') . EOL); } -function xmpp_plugin_settings(App $a, &$s) +function xmpp_addon_settings(App $a, &$s) { if (!local_user()) { return; @@ -100,7 +100,7 @@ function xmpp_login() } } -function xmpp_plugin_admin(App $a, &$o) +function xmpp_addon_admin(App $a, &$o) { $t = get_markup_template("admin.tpl", "addon/xmpp/"); @@ -111,7 +111,7 @@ function xmpp_plugin_admin(App $a, &$o) ]); } -function xmpp_plugin_admin_post() +function xmpp_addon_admin_post() { $bosh_proxy = ((x($_POST, 'bosh_proxy')) ? trim($_POST['bosh_proxy']) : ''); $central_userbase = ((x($_POST, 'central_userbase')) ? intval($_POST['central_userbase']) : false); diff --git a/yourls/yourls.php b/yourls/yourls.php index 96554bb5..84bfa8d7 100644 --- a/yourls/yourls.php +++ b/yourls/yourls.php @@ -3,7 +3,7 @@ /** * Name: Yourls - * Description: Defines a YourLS url shortener for the Statusnet & Twitter plugins + * Description: Defines a YourLS url shortener for the Statusnet & Twitter addons * Version: 1.0 * Author: Keith Fernie * @@ -12,15 +12,15 @@ use Friendica\Core\Addon; use Friendica\Core\Config; function yourls_install() { - Addon::registerHook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings'); - Addon::registerHook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post'); + Addon::registerHook('addon_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings'); + Addon::registerHook('addon_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post'); } function yourls_uninstall() { - Addon::unregisterHook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings'); - Addon::unregisterHook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post'); + Addon::unregisterHook('addon_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings'); + Addon::unregisterHook('addon_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post'); Config::set('yourls','url1',trim($_POST[''])); Config::set('yourls','username1',trim($_POST[''])); Config::set('yourls','password1',trim($_POST['']));