Update function names
authorAdam Magness <adam.magness@gmail.com>
Sat, 20 Jan 2018 13:57:41 +0000 (08:57 -0500)
committerAdam Magness <adam.magness@gmail.com>
Sat, 20 Jan 2018 13:57:41 +0000 (08:57 -0500)
update function names and hook calls

50 files changed:
blackout/blackout.php
blockem/blockem.php
blogger/blogger.php
buffer/buffer.php
communityhome/communityhome.php
curweather/curweather.php
dav/friendica/main.php
fromapp/fromapp.php
fromgplus/fromgplus.php
geocoordinates/geocoordinates.php
geonames/geonames.php
gnot/gnot.php
gravatar/gravatar.php
group_text/group_text.php
impressum/impressum.php
irc/irc.php
jappixmini/jappixmini.php
krynn/krynn.php
langfilter/langfilter.php
libravatar/libravatar.php
mailstream/mailstream.php
mathjax/mathjax.php
membersince/membersince.php
newmemberwidget/newmemberwidget.php
notifyall/notifyall.php
notimeline/notimeline.php
nsfw/nsfw.php
numfriends/numfriends.php
openstreetmap/openstreetmap.php
pageheader/pageheader.php
piwik/piwik.php
planets/planets.php
pledgie/pledgie.php
public_server/public_server.php
qcomment/qcomment.php
randplace/randplace.php
remote_permissions/remote_permissions.php
securemail/securemail.php
showmore/showmore.php
startpage/startpage.php
statusnet/statusnet.php
superblock/superblock.php
tumblr/tumblr.php
twitter/twitter.php
webrtc/webrtc.php
widgets/widgets.php
windowsphonepush/windowsphonepush.php
wppost/wppost.php
xmpp/xmpp.php
yourls/yourls.php

index 94e081ce3cf95cf3ad12de06a2af931612b47530..1c34862b28cc55d8551482574d5444a955131c46 100644 (file)
@@ -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 = '<p>Please double check that the current settings for the blackout. Begin will be <strong>'.$mystart.'</strong> and it will end <strong>'.$myend.'</strong>.</p>' . $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']);
index 2a2cd3d265b1a47d373fa09bef617ede73077701..d943f26c6456a37cc137cda500dc3ecdccc475e2 100644 (file)
@@ -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'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/blockem/blockem.css' . '" media="all" />' . "\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())
index 7c9e1c5d0b24d37ac3312933320d8784af52fd70..050aaa7a1734cfb0d28dae387163f5ba139fe8bc 100644 (file)
@@ -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 .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" ' . $selected . ' value="1" /> '
-                   . t('Post to blogger') . '</div>';
+               . t('Post to blogger') . '</div>';
        }
 }
 
 
-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 .= '</span>';
 
        $s .= '<div id="blogger-enable-wrapper">';
-       $s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . t('Enable Blogger Post Plugin') . '</label>';
+       $s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . t('Enable Blogger Post Addon') . '</label>';
        $s .= '<input id="blogger-checkbox" type="checkbox" name="blogger" value="1" ' . $checked . '/>';
        $s .= '</div><div class="clear"></div>';
 
@@ -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 = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . '</title>';
@@ -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
+}
index c788d4aa0817ea042c9f41e9bdef42b730411961..9c36f7c44089ce2dc9e4cc7ef964ae4d598aaf90 100644 (file)
@@ -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 .= '</div><div class="clear"></div>';
        } else {
                $s .= '<div id="buffer-enable-wrapper">';
-               $s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . t('Enable Buffer Post Plugin') . '</label>';
+               $s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . t('Enable Buffer Post Addon') . '</label>';
                $s .= '<input id="buffer-checkbox" type="checkbox" name="buffer" value="1" ' . $checked . '/>';
                $s .= '</div><div class="clear"></div>';
 
index f3e4783edb73eb9cb6ee24df775bf3ba6cc4c326..169d2416cd74811ffae54ce590dcd218ed78db24 100644 (file)
@@ -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));
                }
        }
 }
index bcbba91d83981872f75a0b5614bfa3d655619620..dc9f9bb833703469c15221974e67663756767fa9 100644 (file)
@@ -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');
index afeadcf013cbfe27acebcd9af064563c57fc4ad6..d73edfd3197b1f58baa0765585da68ec2fa4d6af 100644 (file)
@@ -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");
index 4872e2a08aaad26e01edbc0740729fcf0b05c398..32234d1594610b1cb75faa54b0c21b086ab996db 100644 (file)
@@ -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");
index b8910d5df98aff349ea80971b7db672a38c66dff..c028ea852ddef2beea32a59f72a090b6cf387868 100644 (file)
@@ -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) {
index 714b8d81cbfca0d0a491979bf52518e7dc8bcb6c..fa72c2a879a8091eadad46f5e39d9d5bc1bc5123 100644 (file)
@@ -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);
 }
index 55ae1920ba62c3309c1ca25e5ae36d186b62c835..45d8fde5774c9a84c8e066e3ac2f5aebb4b55eab 100644 (file)
@@ -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 .= '<div class="settings-block">';
        $s .= '<h3>' . t('Geonames Settings') . '</h3>';
        $s .= '<div id="geonames-enable-wrapper">';
-       $s .= '<label id="geonames-enable-label" for="geonames-checkbox">' . t('Enable Geonames Plugin') . '</label>';
+       $s .= '<label id="geonames-enable-label" for="geonames-checkbox">' . t('Enable Geonames Addon') . '</label>';
        $s .= '<input id="geonames-checkbox" type="checkbox" name="geonames" value="1" ' . $checked . '/>';
        $s .= '</div><div class="clear"></div>';
 
index 70f422b6a5c584b7a604955c20ac9a1d32cad41d..38fb3069a3df6d4efb208b0b2969f5f4bcadde13 100644 (file)
@@ -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 .= '<h3>' . t('Gnot Settings') . '</h3>';
        $s .= '<div id="gnot-wrapper">';
        $s .= '<div id="gnot-desc">' . t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '</div>';
-       $s .= '<label id="gnot-label" for="gnot">' . t('Enable this plugin/addon?') . '</label>';
+       $s .= '<label id="gnot-label" for="gnot">' . t('Enable this addon?') . '</label>';
        $s .= '<input id="gnot-input" type="checkbox" name="gnot" value="1"'.  $gnot_checked . '/>';
        $s .= '</div><div class="clear"></div>';
 
index 731129c0754e50d2c0c79b8e3ac5e0203717de6c..840b361b45ffd81839fad3b9184159d9b85f6dfc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Gravatar Support
- * Description: If there is no avatar image for a new user or contact this plugin will look for one at Gravatar.
+ * Description: If there is no avatar image for a new user or contact this addon will look for one at Gravatar.
  * Version: 1.1
  * Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
  */
@@ -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');
index 27bd173bb4166cc606994c34aa9b5f98c01aeaeb..d5163e7397006d22108e322be6d27f0e9e442bb5 100644 (file)
@@ -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.
  *
  */
index 15e338696836b05f9cc5882540f835968d6bbe91..df508868d9da0e77d86f93d1f6d0ad877f6d6fa8 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Impressum
- * Description: Plugin to add contact information to the about page (/friendica)
+ * Description: Addon to add contact information to the about page (/friendica)
  * Version: 1.3
  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  * 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'),
index e2fd50ba263b22d674b80b6bbc95b19636c10cd6..288f65ca8c6102d827e99af84a08bc9250403955 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
-* Name: IRC Chat Plugin
+* Name: IRC Chat Addon
 * Description: add an Internet Relay Chat chatroom on freenode
 * Version: 1.1
 * Author: tony baldwin <https://free-haven.org/profile/tony>
@@ -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/" );
index 2e3cbc77f5fb100234f4fc1734caa391a4c007ee..dc40840ab429f734b60dd11ddc6fb2c0e56f29e7 100644 (file)
@@ -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 .= '<input type="submit" name="jappixmini-admin-settings" value="OK" />';
 }
 
-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();
index 93082419c3535b4cd2dd4f121be002ffeaa92acf..6d47bc5f3577cc04ac5a33f77751f4bd9cca2f6d 100644 (file)
@@ -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 .= '<div class="settings-block">';
        $s .= '<h3>' . t('Krynn Settings') . '</h3>';
        $s .= '<div id="krynn-enable-wrapper">';
-       $s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . t('Enable Krynn Plugin') . '</label>';
+       $s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . t('Enable Krynn Addon') . '</label>';
        $s .= '<input id="krynn-checkbox" type="checkbox" name="krynn" value="1" ' . $checked . '/>';
         $s .= '</div><div class="clear"></div></div>';
        /* provide a submit button */
index 4bc1b23200d699ec1c5254f5203f80c2f622a225..e569ed37db8646277f540d634be95a58d0e449a6 100644 (file)
@@ -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
index 3979416f154f8ee74d6c549c2e20dec77b049a11..bba5a88197fba24ef1bfed022d55b6d750a71538 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Libravatar Support
- * Description: If there is no avatar image for a new user or contact this plugin will look for one at Libravatar. Please disable Gravatar addon if you use this one. (requires PHP >= 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 <http://friendica.dszdw.net/profile/klaus>
  */
@@ -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');
index c427ae76158b1181072a773c9b7a8143bc0110bf..d40fdb7a7067375b22ea63d66d8d49c4fb3f6b84 100644 (file)
@@ -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']);
        }
index fc18b51d7e0654ba84904e9c27bdad07b193dc41..8308651ffe67ac42301e753adc6ce2fe5044ebb8 100644 (file)
@@ -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');
index 3b454fa3df41961952fd49d1f37c6ef4b9ade60c..14669e35e5a5501c6fbbb74ba8f56f075d3f6c2c 100644 (file)
@@ -1,21 +1,30 @@
 <?php
-
 /**
  * Name: MemberSince
  * Description: Display membership date in profile
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
- * 
+ *
  */
 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>/', "</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . t('Member since:') . "</dt>\n<dd>" . datetime_convert('UTC', date_default_timezone_get(), $a->profile['register_date']) . "</dd>\n</dl>", $b, 1);
 
-function membersince_display(&$a,&$b) { 
-$b = preg_replace('/<\/dl>/',"</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . t('Member since:') . "</dt>\n<dd>" . datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date']) . "</dd>\n</dl>" ,$b, 1); 
-//$b = str_replace('</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',sprintf( t(' - Member since: %s') . EOL, datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date'])) . '</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',$b); 
-}
\ No newline at end of file
+       // Trying for Frio
+       //$b = preg_replace('/<\/div>/', "<div id=\"aprofile-membersince\" class=\"aprofile\"><hr class=\"profile-separator\"><div class=\"profile-label-name\">" . t('Member since:') . "</div><div class=\"profile-entry\">" . datetime_convert('UTC', date_default_timezone_get(), $a->profile['register_date']) . "</div></div>", $b, 1);
+}
index b912b0744ab49c41e73dda6434d3402e82fbc6b5..516a472e91ca91fedcb274d19288774c2a291d24 100644 (file)
@@ -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'),
index a667f6a68e717c97ffedc0a36a519801dd7969a9..cdaa1815c99861e92a10ea500b1d2d84ce4ddd14 100644 (file)
@@ -21,7 +21,7 @@ function notifyall_uninstall() {
 
 function notifyall_module() {}
 
-function notifyall_plugin_admin(&$a, &$o) {
+function notifyall_addon_admin(&$a, &$o) {
 
        $o = '<div></div>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . z_root() . '/notifyall">' . t('Send email to all members') . '</a></br/>';
 
index bc06f78bd36e5ae971abf11d0649e05106ee38fd..a1acd72cb812852e3d271d2fb778c34a2153c2fe 100644 (file)
@@ -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');
 
 }
 
index 7c37fc2e87cdc23a3d5a91a86da615642373286e..e43f0b51cd7f59327332e6d6cd19dca56eb4af4c 100644 (file)
@@ -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 .= '</span>';
 
     $s .= '<div id="nsfw-wrapper">';
-    $s .= '<p>' . 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.') . '</p>';
+    $s .= '<p>' . 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.') . '</p>';
     $s .= '<label id="nsfw-enable-label" for="nsfw-enable">' . t('Enable Content filter') . ' </label>';
     $s .= '<input id="nsfw-enable" type="checkbox" name="nsfw-enable" value="1"' . $enable_checked . ' />';
        $s .= '<div class="clear"></div>';
index 9e3463c377e2c1854e93e076c0ecbd253041e5d2..5d6575c44a2b865888764e98b6803e0fc5b9e592 100644 (file)
@@ -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()) {
index d61d0020ddfa2cdc636dce3493f2b64695a3c430..29ada924602069df100eb89fff8fbe5bb1fe9597 100644 (file)
@@ -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'])) : '');
index 0a29310397e2a2247eaa95c6b8ab06c81174fd60..96ad36301738d61bf9589b5933064e9df5f3fbbc 100644 (file)
@@ -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');
index ddba2dd91dd67702fff6f722f9844eb7b56bf3ba..326b931f56d67b3cd2acdc555d7abe2808715dfe 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**
  * Name: Piwik Analytics
- * Description: Piwik Analytics Plugin for Friendica
+ * Description: Piwik Analytics Addon for Friendica
  * Version: 1.3
  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  * 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 .= "</div>";
        }
 }
-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']) : '');
index 794d1f0238bd03fb06102f95ee78c1248951d667..04fb72ca77ef2a5b7bb8094cc0ca483fe65b44fe 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Random Planet, Empirial Version
- * Description: Sample Friendica plugin/addon. Set a random planet from the Emprire when posting.
+ * Description: Sample Friendica addon. Set a random planet from the Emprire when posting.
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Author: Tony Baldwin <https://free-haven.org/profile/tony>
@@ -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 .= '<div class="settings-block">';
        $s .= '<h3>' . t('Planets Settings') . '</h3>';
        $s .= '<div id="planets-enable-wrapper">';
-       $s .= '<label id="planets-enable-label" for="planets-checkbox">' . t('Enable Planets Plugin') . '</label>';
+       $s .= '<label id="planets-enable-label" for="planets-checkbox">' . t('Enable Planets Addon') . '</label>';
        $s .= '<input id="planets-checkbox" type="checkbox" name="planets" value="1" ' . $checked . '/>';
        $s .= '</div><div class="clear"></div></div>';
 
index 27897e52974c767927d5ac133deac7b183af7073..2b75268bafd91294bf54d89948251b93866a5bfb 100644 (file)
@@ -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) {
index 422746f0f0c23fa8bc79ad2287eca535c6a8fc4f..2c09656811ad53867325c3cfb0c93a68d4f50066 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: public_server
- * Description: Friendica plugin/addon with functions suitable for a public server.
+ * Description: Friendica addon with functions suitable for a public server.
  * Version: 1.1
  * Author: Keith Fernie <http://friendika.me4.it/profile/keith>
  */
@@ -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, [
index 2e1783c09b5e32dd59d777dbbe573bfb2b268241..447f8abf1d9f4d8a3526b713c5e32cd7593cbd9f 100644 (file)
@@ -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');
 
 }
 
index a6a639ecf501b6b5174798dbc225b77f68aaf69b..96e549a67470af2831313d147dbd9884eac6d8d8 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Random place
- * Description: Sample Friendica plugin/addon. Set a random place when posting.
+ * Description: Sample Friendica addon. Set a random place when posting.
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
@@ -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 .= '<div class="settings-block">';
        $s .= '<h3>' . t('Randplace Settings') . '</h3>';
        $s .= '<div id="randplace-enable-wrapper">';
-       $s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . t('Enable Randplace Plugin') . '</label>';
+       $s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . t('Enable Randplace Addon') . '</label>';
        $s .= '<input id="randplace-checkbox" type="checkbox" name="randplace" value="1" ' . $checked . '/>';
        $s .= '</div><div class="clear"></div>';
 
index 7c74df9f59b848740b3cc16a8ea1b94e779cac16..408316e691a2e642c738844a588525315cdf8b31 100644 (file)
@@ -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 );
index 33bbf03030a7e6c3b76901c61aec0cd5c7bb4e95..e62b607675da0a8286ba4c32f344cb847bca8944 100644 (file)
@@ -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
index 8f0e6693c89c87cf647061a3ec21cd2da4a8df68..f6e5028c68bd70d1027a49acf234cf3566d93796 100644 (file)
@@ -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) {
index 263ec39548790705704d8bbf91ed5364dae9593d..872fb234d1298d5c02d469e3f987e9cd1129ead8 100644 (file)
@@ -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.
  *
  */
index e867ea465f3728f3d97877ba3374e44e2c74bbb9..3d7083893418ad6870476e07624a4f8ef37807d9 100644 (file)
@@ -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 = [];
index 2e1004a148142d999eb42df2d07f014e45449e20..b6d19de456b90f1208f757f7ff75d6e47105f9e7 100644 (file)
@@ -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');
index df47a8e3c61a21f012e2491b472208b3b325ea28..ff218d0a7763ef31978386cb751495a840e63e5b 100644 (file)
@@ -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 .= '</div><div class="clear"></div>';
 
        $s .= '<div id="tumblr-enable-wrapper">';
-       $s .= '<label id="tumblr-enable-label" for="tumblr-checkbox">' . t('Enable Tumblr Post Plugin') . '</label>';
+       $s .= '<label id="tumblr-enable-label" for="tumblr-checkbox">' . t('Enable Tumblr Post Addon') . '</label>';
        $s .= '<input id="tumblr-checkbox" type="checkbox" name="tumblr" value="1" ' . $checked . '/>';
        $s .= '</div><div class="clear"></div>';
 
index 1b4758018c0b359d12333e5ab8f81f3709ffca05..a33415d8c98df4920db5f82b9418e5a631b4f026 100644 (file)
@@ -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 .= '<p>' . 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 <strong>public</strong> posts will be posted to Twitter.') . '</p>';
+                       $s .= '<p>' . 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 <strong>public</strong> posts will be posted to Twitter.') . '</p>';
                        $s .= '<a href="' . $connection->getAuthorizeURL($token) . '" target="_twitter"><img src="addon/twitter/lighter.png" alt="' . t('Log in with Twitter') . '"></a>';
                        $s .= '<div id="twitter-pin-wrapper">';
                        $s .= '<label id="twitter-pin-label" for="twitter-pin">' . t('Copy the PIN from Twitter here') . '</label>';
@@ -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/");
 
index fe12248e33d2ac7595121301bf97a332c8f713cd..a71bac2afba551ca2b5c6de525f5831eec93c100 100644 (file)
@@ -22,14 +22,14 @@ function webrtc_app_menu($a,&$b) {
        $b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . t('WebRTC Videochat') . '</a></div>';
 }
 
-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);
index 69f03a8ee4341c535bc5a9b5953ef7bef9b4e8b5..9867b884a08275e421c7e6416746a750e258ca7f 100644 (file)
@@ -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 .= "<style>.f9k_widget { float: left;border:1px solid black; }</style>";
                        $o .= "<h1>Preview Widget</h1>";
-                       $o .= '<a href="'.$a->get_baseurl().'/settings/addon">'. t("Plugin Settings") .'</a>';
+                       $o .= '<a href="'.$a->get_baseurl().'/settings/addon">'. t("Addon Settings") .'</a>';
 
                        $o .=  "<h4>".call_user_func($a->argv[1].'_widget_name')."</h4>";
                        $o .=  call_user_func($a->argv[1].'_widget_help');
index 377d2cd4f1b1e76babe60d50f46eb8879cd5933f..861bb7afa7a45dbc66f8b6942e303babc5d4b9f6 100644 (file)
@@ -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 .= '<h3>' . t('WindowsPhonePush Settings') . '</h3>';
 
        $s .= '<div id="windowsphonepush-enable-wrapper">';
-       $s .= '<label id="windowsphonepush-enable-label" for="windowsphonepush-enable-chk">' . t('Enable WindowsPhonePush Plugin') . '</label>';
+       $s .= '<label id="windowsphonepush-enable-label" for="windowsphonepush-enable-chk">' . t('Enable WindowsPhonePush Addon') . '</label>';
        $s .= '<input id="windowsphonepush-enable-chk" type="checkbox" name="windowsphonepush" value="1" ' . $checked_enabled . '/>';
        $s .= '</div><div class="clear"></div>';
 
@@ -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";
index d73005a3ff54dccb4c86eb5629c89d59e93d3a81..af371af1141800d551b39c667236392dadbc4760 100644 (file)
@@ -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 .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. t('Wordpress Export').'</h3>';
     $s .= '</span>';
     $s .= '<div id="wppost-enable-wrapper">';
-    $s .= '<label id="wppost-enable-label" for="wppost-checkbox">' . t('Enable WordPress Post Plugin') . '</label>';
+    $s .= '<label id="wppost-enable-label" for="wppost-checkbox">' . t('Enable WordPress Post Addon') . '</label>';
     $s .= '<input id="wppost-checkbox" type="checkbox" name="wppost" value="1" ' . $checked . '/>';
     $s .= '</div><div class="clear"></div>';
 
index fc2d6bb5c0d347e469ebfed2456dab7b1c85d368..2548005ee7564042bc472b429fa764cdfaef52cb 100644 (file)
@@ -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);
index 96554bb58a92276ece30da3243bef8b94a9c6b70..84bfa8d701adb4c488c9977fee2f1103424a2826 100644 (file)
@@ -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 <http://friendika.me4.it/profile/keith>
  * 
@@ -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['']));