Browse Source

Addon class

plugin moved to Addon src class
pull/492/head
Adam Magness 4 years ago
parent
commit
0afd633346
  1. 5
      blackout/blackout.php
  2. 32
      blockem/blockem.php
  3. 29
      blogger/blogger.php
  4. 21
      buffer/buffer.php
  5. 6
      buglink/buglink.php
  6. 6
      calc/calc.php
  7. 6
      communityhome/communityhome.php
  8. 5
      convert/convert.php
  9. 13
      curweather/curweather.php
  10. 17
      dav/friendica/main.php
  11. 25
      diaspora/diaspora.php
  12. 23
      dwpost/dwpost.php
  13. 5
      fortunate/fortunate.php
  14. 11
      forumdirectory/forumdirectory.php
  15. 14
      fromapp/fromapp.php
  16. 17
      fromgplus/fromgplus.php
  17. 10
      geocoordinates/geocoordinates.php
  18. 14
      geonames/geonames.php
  19. 14
      gnot/gnot.php
  20. 6
      googlemaps/googlemaps.php
  21. 6
      gravatar/gravatar.php
  22. 12
      group_text/group_text.php
  23. 9
      ifttt/ifttt.php
  24. 23
      ijpost/ijpost.php
  25. 9
      impressum/impressum.php
  26. 5
      infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
  27. 12
      irc/irc.php
  28. 25
      jappixmini/jappixmini.php
  29. 18
      js_upload/js_upload.php
  30. 14
      krynn/krynn.php
  31. 13
      langfilter/langfilter.php
  32. 5
      ldapauth/ldapauth.php
  33. 14
      leistungsschutzrecht/leistungsschutzrecht.php
  34. 22
      libertree/libertree.php
  35. 6
      libravatar/libravatar.php
  36. 23
      ljpost/ljpost.php
  37. 6
      mahjongg/mahjongg.php
  38. 32
      mailstream/mailstream.php
  39. 14
      mathjax/mathjax.php
  40. 5
      membersince/membersince.php
  41. 16
      morechoice/morechoice.php
  42. 5
      morepokes/morepokes.php
  43. 7
      namethingy/namethingy.php
  44. 5
      newmemberwidget/newmemberwidget.php
  45. 10
      notimeline/notimeline.php
  46. 16
      nsfw/nsfw.php
  47. 12
      numfriends/numfriends.php
  48. 18
      openstreetmap/openstreetmap.php
  49. 18
      pageheader/pageheader.php
  50. 6
      piwik/piwik.php
  51. 14
      planets/planets.php
  52. 14
      pledgie/pledgie.php
  53. 19
      public_server/public_server.php
  54. 33
      pumpio/pumpio.php
  55. 10
      qcomment/qcomment.php
  56. 14
      randplace/randplace.php
  57. 14
      remote_permissions/remote_permissions.php
  58. 10
      rendertime/rendertime.php
  59. 13
      securemail/securemail.php
  60. 14
      showmore/showmore.php
  61. 9
      smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
  62. 5
      smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
  63. 8
      smiley_pack/smiley_pack.php
  64. 6
      smileybutton/smileybutton.php
  65. 5
      smilies_adult/smilies_adult.php
  66. 6
      sniper/sniper.php
  67. 14
      startpage/startpage.php
  68. 39
      statusnet/statusnet.php
  69. 22
      superblock/superblock.php
  70. 18
      testdrive/testdrive.php
  71. 6
      tictac/tictac.php
  72. 21
      tumblr/tumblr.php
  73. 51
      twitter/twitter.php
  74. 6
      unicode_smilies/unicode_smilies.php
  75. 11
      viewsrc/viewsrc.php
  76. 6
      webrtc/webrtc.php
  77. 10
      widgets/widgets.php
  78. 13
      windowsphonepush/windowsphonepush.php
  79. 28
      wppost/wppost.php
  80. 17
      xmpp/xmpp.php
  81. 10
      yourls/yourls.php

5
blackout/blackout.php

@ -50,13 +50,14 @@
*/
use Friendica\Core\Config;
use Friendica\Core\Addon;
function blackout_install() {
register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_uninstall() {
unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_redirect ($a, $b) {
// if we have a logged in user, don't throw her out

32
blockem/blockem.php

@ -1,6 +1,4 @@
<?php
/**
* Name: blockem
* Description: block people
@ -8,28 +6,28 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function blockem_install() {
register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
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('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' );
}
function blockem_uninstall() {
unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
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('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' );
}

29
blogger/blogger.php

@ -1,33 +1,32 @@
<?php
/**
* Name: Blogger Post Connector
* Description: Post to Blogger (or anything else which uses blogger XMLRPC API)
* Version: 1.0
*
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function blogger_install() {
register_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
register_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
register_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
register_hook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
register_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
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');
Addon::registerHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}
function blogger_uninstall() {
unregister_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
unregister_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
unregister_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
unregister_hook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
unregister_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
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');
Addon::unregisterHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
// obsolete - remove
unregister_hook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
unregister_hook('plugin_settings', 'addon/blogger/blogger.php', 'blogger_settings');
unregister_hook('plugin_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
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');
}

21
buffer/buffer.php

@ -8,23 +8,24 @@
require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function buffer_install() {
register_hook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
register_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
register_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
register_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
register_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::registerHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_uninstall() {
unregister_hook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
unregister_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
unregister_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
unregister_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
unregister_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_module() {}

6
buglink/buglink.php

@ -5,11 +5,11 @@
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
*/
use Friendica\Core\Addon;
function buglink_install() { Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_install() { register_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_uninstall() { unregister_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_uninstall() { Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_active(&$a,&$b) { $b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . t('Report Bug') . '" /></a></div>'; }

6
calc/calc.php

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
function calc_install() {
register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}

6
communityhome/communityhome.php

@ -5,7 +5,7 @@
* Version: 2.0
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrixxm>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Module\Login;
@ -13,12 +13,12 @@ require_once('mod/community.php');
function communityhome_install() {
register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
Addon::registerHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("installed communityhome");
}
function communityhome_uninstall() {
unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
Addon::unregisterHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("removed communityhome");
}

5
convert/convert.php

@ -5,13 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
function convert_install() {
register_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_uninstall() {
unregister_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_app_menu($a,&$b) {

13
curweather/curweather.php

@ -13,6 +13,7 @@ require_once('include/network.php');
require_once("mod/proxy.php");
require_once('include/text.php');
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@ -66,15 +67,15 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
}
function curweather_install() {
register_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
register_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
register_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
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');
}
function curweather_uninstall() {
unregister_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
unregister_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
unregister_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
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');
}
function curweather_network_mod_init(&$fk_app,&$b) {

17
dav/friendica/main.php

@ -1,5 +1,6 @@
<?php
use Friendica\Core\Addon;
use Friendica\Module\Login;
use Friendica\Util\Emailer;
@ -7,19 +8,19 @@ require_once('include/security.php');
function dav_install()
{
register_hook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
register_hook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
register_hook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
register_hook('cron', 'addon/dav/dav.php', 'dav_cron');
Addon::registerHook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
Addon::registerHook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
Addon::registerHook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
Addon::registerHook('cron', 'addon/dav/dav.php', 'dav_cron');
}
function dav_uninstall()
{
unregister_hook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
unregister_hook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
unregister_hook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
unregister_hook('cron', 'addon/dav/dav.php', 'dav_cron');
Addon::unregisterHook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
Addon::unregisterHook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
Addon::unregisterHook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
Addon::unregisterHook('cron', 'addon/dav/dav.php', 'dav_cron');
}

25
diaspora/diaspora.php

@ -9,24 +9,25 @@
require_once("addon/diaspora/Diaspora_Connection.php");
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function diaspora_install() {
register_hook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
register_hook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
register_hook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
register_hook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
register_hook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
register_hook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::registerHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::registerHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
function diaspora_uninstall() {
unregister_hook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
unregister_hook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
unregister_hook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
unregister_hook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
unregister_hook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
unregister_hook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::unregisterHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}

23
dwpost/dwpost.php

@ -1,5 +1,4 @@
<?php
/**
* Name: Dreamwidth Post Connector
* Description: Post to dreamwidth
@ -8,23 +7,23 @@
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function dwpost_install() {
register_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
register_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
register_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
register_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
register_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
Addon::registerHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::registerHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::registerHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
function dwpost_uninstall() {
unregister_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
unregister_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
unregister_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
unregister_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
unregister_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
Addon::unregisterHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::unregisterHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}

5
fortunate/fortunate.php

@ -5,20 +5,21 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
// IMPORTANT: SET THIS to your fortunate server
define ('FORTUNATE_SERVER', 'hostname.com');
function fortunate_install() {
register_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
if(FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
notice('Fortunate plugin requires configuration. See README');
}
}
function fortunate_uninstall() {
unregister_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
}

11
forumdirectory/forumdirectory.php

@ -9,17 +9,16 @@
use Friendica\Content\Nav;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Database\DBM;
function forumdirectory_install()
{
register_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
function forumdirectory_install() {
Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_uninstall()
{
unregister_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
function forumdirectory_uninstall() {
Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_module()

14
fromapp/fromapp.php

@ -6,14 +6,14 @@
* Author: Commander Zot
*
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function fromapp_install() {
register_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
register_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
register_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
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');
logger("installed fromapp");
}
@ -21,9 +21,9 @@ function fromapp_install() {
function fromapp_uninstall() {
unregister_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
unregister_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
unregister_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
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');
logger("removed fromapp");

17
fromgplus/fromgplus.php

@ -9,6 +9,7 @@
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Object\Image;
@ -18,19 +19,19 @@ require_once 'mod/parse_url.php';
require_once 'include/text.php';
function fromgplus_install() {
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
register_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
}
function fromgplus_uninstall() {
unregister_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
unregister_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
unregister_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
// Old hooks
unregister_hook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
unregister_hook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::unregisterHook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
}
function fromgplus_addon_settings(&$a,&$s) {

10
geocoordinates/geocoordinates.php

@ -5,21 +5,21 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
function geocoordinates_install()
{
register_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
register_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_uninstall()
{
unregister_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
unregister_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_resolve_item(&$item)

14
geonames/geonames.php

@ -19,7 +19,7 @@
* system will call the name_uninstall() function.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@ -32,7 +32,7 @@ function geonames_install() {
*
*/
register_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
/**
*
@ -42,8 +42,8 @@ function geonames_install() {
*
*/
register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
Addon::registerHook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
Addon::registerHook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
logger("installed geonames");
}
@ -59,9 +59,9 @@ function geonames_uninstall() {
*
*/
unregister_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
unregister_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
unregister_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
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');
logger("removed geonames");

14
gnot/gnot.php

@ -7,14 +7,14 @@
*
*
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function gnot_install() {
register_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
register_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
register_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Addon::registerHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::registerHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("installed gnot");
}
@ -22,9 +22,9 @@ function gnot_install() {
function gnot_uninstall() {
unregister_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
unregister_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
unregister_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Addon::unregisterHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::unregisterHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("removed gnot");

6
googlemaps/googlemaps.php

@ -6,19 +6,19 @@
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
function googlemaps_install()
{
register_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("installed googlemaps");
}
function googlemaps_uninstall()
{
unregister_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("removed googlemaps");
}

6
gravatar/gravatar.php

@ -5,14 +5,14 @@
* Version: 1.1
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
/**
* Installs the plugin hook
*/
function gravatar_install() {
register_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("registered gravatar in avatar_lookup hook");
}
@ -21,7 +21,7 @@ function gravatar_install() {
* Removes the plugin hook
*/
function gravatar_uninstall() {
unregister_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("unregistered gravatar in avatar_lookup hook");
}

12
group_text/group_text.php

@ -4,16 +4,14 @@
* Description: Disable images in group edit menu
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*
*
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function group_text_install() {
register_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
register_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
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');
logger("installed group_text");
}
@ -21,8 +19,8 @@ function group_text_install() {
function group_text_uninstall() {
unregister_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
unregister_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
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');
logger("removed group_text");

9
ifttt/ifttt.php

@ -11,19 +11,20 @@ require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function ifttt_install()
{
register_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
register_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
unregister_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
unregister_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_module()

23
ijpost/ijpost.php

@ -1,5 +1,4 @@
<?php
/**
* Name: Insanejournal Post Connector
* Description: Post to Insanejournal
@ -8,23 +7,23 @@
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function ijpost_install() {
register_hook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
register_hook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
register_hook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
register_hook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
register_hook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_uninstall() {
unregister_hook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
unregister_hook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
unregister_hook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
unregister_hook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
unregister_hook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}

9
impressum/impressum.php

@ -10,17 +10,18 @@
require_once('include/bbcode.php');
require_once('mod/proxy.php');
use Friendica\Core\Addon;
use Friendica\Core\Config;
function impressum_install() {
register_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
register_hook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("installed impressum plugin");
}
function impressum_uninstall() {
unregister_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
unregister_hook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("uninstalled impressum plugin");
}

5
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php

@ -5,13 +5,14 @@
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*/
use Friendica\Core\Addon;
function infiniteimprobabilitydrive_install() {
register_hook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_uninstall() {
unregister_hook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}

12
irc/irc.php

@ -6,19 +6,19 @@
* Author: tony baldwin <https://free-haven.org/profile/tony>
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function irc_install() {
register_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
register_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
register_hook('plugin_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
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');
}
function irc_uninstall() {
unregister_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
unregister_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Addon::unregisterHook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
}

25
jappixmini/jappixmini.php

@ -63,22 +63,23 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\User;
function jappixmini_install()
{
register_hook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
register_hook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::registerHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::registerHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
register_hook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
register_hook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
register_hook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
// Jappix source download as required by AGPL
register_hook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
// set standard configuration
$info_text = Config::get("jappixmini", "infotext");
@ -103,15 +104,15 @@ function jappixmini_install()
function jappixmini_uninstall()
{
unregister_hook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
unregister_hook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::unregisterHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::unregisterHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
unregister_hook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
unregister_hook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
unregister_hook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
unregister_hook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
}
function jappixmini_plugin_admin(App $a, &$o)

18
js_upload/js_upload.php

@ -15,23 +15,23 @@
* Module Author: Chris Case
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
function js_upload_install() {
register_hook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
register_hook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
register_hook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
register_hook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::registerHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::registerHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::registerHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}
function js_upload_uninstall() {
unregister_hook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
unregister_hook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
unregister_hook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
unregister_hook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Addon::unregisterHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::unregisterHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::unregisterHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::unregisterHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}

14
krynn/krynn.php

@ -9,7 +9,7 @@
*
*"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function krynn_install() {
@ -21,7 +21,7 @@ function krynn_install() {
*
*/
register_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
/**
*
@ -31,8 +31,8 @@ function krynn_install() {
*
*/
register_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
register_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Addon::registerHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::registerHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
logger("installed krynn");
}
@ -48,9 +48,9 @@ function krynn_uninstall() {
*
*/
unregister_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
unregister_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
unregister_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
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');
logger("removed krynn");

13
langfilter/langfilter.php

@ -9,6 +9,7 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
/* Define the hooks we want to use
@ -18,16 +19,16 @@ use Friendica\Core\PConfig;
function langfilter_install()
{
register_hook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body', 10);
register_hook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
register_hook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
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');
}
function langfilter_uninstall()
{
unregister_hook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
unregister_hook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
unregister_hook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
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');
}
/* The settings

5
ldapauth/ldapauth.php

@ -52,17 +52,18 @@
*
* ...etc.
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Model\User;
function ldapauth_install()
{
register_hook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_uninstall()
{
unregister_hook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_hook_authenticate($a, &$b)

14
leistungsschutzrecht/leistungsschutzrecht.php

@ -5,20 +5,20 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
function leistungsschutzrecht_install() {
register_hook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
register_hook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
register_hook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::registerHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::registerHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::registerHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
}
function leistungsschutzrecht_uninstall() {
unregister_hook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
unregister_hook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
unregister_hook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::unregisterHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::unregisterHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::unregisterHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
}
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {

22
libertree/libertree.php

@ -6,23 +6,23 @@
* Version: 1.0
* Author: Tony Baldwin <https://free-haven.org/u/tony>
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function libertree_install() {
register_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
register_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
register_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
register_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
register_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall() {
unregister_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
unregister_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
unregister_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
unregister_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
unregister_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}

6
libravatar/libravatar.php

@ -5,7 +5,7 @@
* Version: 1.1
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
/**
@ -17,7 +17,7 @@ function libravatar_install() {
// avoid registering the hook
return false;
}
register_hook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("registered libravatar in avatar_lookup hook");
}
@ -26,7 +26,7 @@ function libravatar_install() {
* Removes the plugin hook
*/
function libravatar_uninstall() {
unregister_hook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("unregistered libravatar in avatar_lookup hook");
}

23
ljpost/ljpost.php

@ -1,5 +1,4 @@
<?php
/**
* Name: LiveJournal Post Connector
* Description: Post to LiveJournal
@ -8,23 +7,23 @@
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function ljpost_install() {
register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Addon::registerHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
}
function ljpost_uninstall() {
unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
Addon::unregisterHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Addon::unregisterHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
}

6
mahjongg/mahjongg.php

@ -6,14 +6,14 @@
* Version: 1.0
* Author: Holger Froese
*/
use Friendica\Core\Addon;
function mahjongg_install() {
register_hook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
Addon::registerHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}
function mahjongg_uninstall() {
unregister_hook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
Addon::unregisterHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}

32
mailstream/mailstream.php

@ -5,17 +5,17 @@
* Version: 1.1
* Author: Matthew Exon <http://mat.exon.name>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function mailstream_install() {
register_hook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
register_hook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post');
register_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
register_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
register_hook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
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('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');
if (Config::get('mailstream', 'dbversion') == '0.1') {
q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
@ -52,16 +52,16 @@ function mailstream_install() {
}
function mailstream_uninstall() {
unregister_hook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
unregister_hook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post');
unregister_hook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
unregister_hook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
unregister_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
unregister_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
unregister_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
unregister_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
unregister_hook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
unregister_hook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
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('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');
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::unregisterHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
Addon::unregisterHook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
}
function mailstream_module() {}

14
mathjax/mathjax.php

@ -7,20 +7,20 @@
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
* License: 3-clause BSD license
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function mathjax_install() {
register_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
register_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
register_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
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');
}
function mathjax_uninstall() {
unregister_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
unregister_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
unregister_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
Addon::unregisterHook('page_header', 'addon/mathjax/mathjax.php',