diff --git a/calc/calc.php b/calc/calc.php index f60682b0..61e9c5db 100644 --- a/calc/calc.php +++ b/calc/calc.php @@ -1,363 +1,364 @@ - - */ -use Friendica\Core\Hook; - -function calc_install() { - Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); -} - -function calc_uninstall() { - Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); - -} - -function calc_app_menu($a,&$b) { - $b['app_menu'][] = '
Calculator
'; -} - - -function calc_module() {} - - - - -function calc_init($a) { - -$x = <<< EOT - - - -EOT; -$a->page['htmlhead'] .= $x; -} - -function calc_content($app) { - -$o = ''; - -$o .= <<< EOT - -

Calculator

-

- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- -EOT; -return $o; - -} + + */ +use Friendica\Core\Hook; +use Friendica\DI; + +function calc_install() { + Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); +} + +function calc_uninstall() { + Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); + +} + +function calc_app_menu($a,&$b) { + $b['app_menu'][] = '
Calculator
'; +} + + +function calc_module() {} + + + + +function calc_init($a) { + +$x = <<< EOT + + + +EOT; +DI::page()['htmlhead'] .= $x; +} + +function calc_content($app) { + +$o = ''; + +$o .= <<< EOT + +

Calculator

+

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +EOT; +return $o; + +} diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index dd48e740..4e832506 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -49,7 +49,7 @@ function fromapp_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/gnot/gnot.php b/gnot/gnot.php index 46012e5e..c89b3aba 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -70,7 +70,7 @@ function gnot_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/group_text/group_text.php b/group_text/group_text.php index 6d14b6f5..3e636091 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -65,7 +65,7 @@ function group_text_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 1ba936a2..f49fa214 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -62,7 +62,7 @@ function ijpost_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/impressum/impressum.php b/impressum/impressum.php index 0bc4d6e3..190afc2c 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -47,7 +47,7 @@ function impressum_footer($a, &$b) { $text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); if (! $text == '') { - $a->page['htmlhead'] .= ''; + DI::page()['htmlhead'] .= ''; $b .= '
'; $b .= ''; } diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php index 0450a7c7..6a4fbab7 100644 --- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php +++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php @@ -36,7 +36,7 @@ function infiniteimprobabilitydrive_content(&$a) $baseurl = DI::baseUrl()->get() . '/addon/infiniteimprobabilitydrive'; $o = ''; - $a->page['htmlhead'] .= ''; + DI::page()['htmlhead'] .= ''; $baseurl = DI::baseUrl()->get(); diff --git a/irc/irc.php b/irc/irc.php index d7eaed62..528189ed 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -33,7 +33,7 @@ function irc_addon_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ -// $a->page['htmlhead'] .= '' . "\r\n"; +// DI::page()['htmlhead'] .= '' . "\r\n"; /* setting popular channels, auto connect channels */ $sitechats = PConfig::get( local_user(), 'irc','sitechats'); /* popular channels */ @@ -98,11 +98,11 @@ function irc_content(&$a) { $chats = ['friendica','chat','chatback','hottub','ircbar','dateroom','debian']; - $a->page['aside'] .= '

' . L10n::t('Popular Channels') . '

'; /* setting the channel(s) to auto connect */ if (local_user()) { diff --git a/krynn/krynn.php b/krynn/krynn.php index fe5c1975..2a941580 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -143,7 +143,7 @@ function krynn_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/libertree/libertree.php b/libertree/libertree.php index 11036d5c..442fa90b 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -62,7 +62,7 @@ function libertree_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 6d347b27..e8732de6 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -62,7 +62,7 @@ function ljpost_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 1b49a179..11e8e12e 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -50,7 +50,7 @@ function newmemberwidget_network_mod_init ($a, $b) } $t .= '
'; - $a->page['aside'] = $t . $a->page['aside']; + DI::page()['aside'] = $t . DI::page()['aside']; } function newmemberwidget_addon_admin_post(&$a) diff --git a/notimeline/notimeline.php b/notimeline/notimeline.php index da9ec693..ea5521fd 100644 --- a/notimeline/notimeline.php +++ b/notimeline/notimeline.php @@ -42,7 +42,7 @@ function notimeline_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 29b95fcb..ba59f007 100644 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -66,7 +66,7 @@ function nsfw_addon_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; $enable_checked = (intval(PConfig::get(local_user(), 'nsfw', 'disable')) ? '' : ' checked="checked" '); $words = PConfig::get(local_user(), 'nsfw', 'words'); diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index bd4f8184..5fa40e50 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -60,7 +60,7 @@ function numfriends_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 1d219c3a..c2c0a7c9 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -57,7 +57,7 @@ function openstreetmap_load_config(\Friendica\App $a, ConfigFileLoader $loader) function openstreetmap_alterheader($a, &$navHtml) { $addScriptTag = '' . "\r\n"; - $a->page['htmlhead'] .= $addScriptTag; + DI::page()['htmlhead'] .= $addScriptTag; } /** diff --git a/piwik/piwik.php b/piwik/piwik.php index 5d3da5c0..2076ff7a 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -66,7 +66,7 @@ function piwik_analytics($a,&$b) { * associated CSS file. We just have to tell Friendica to get it * into the page header. */ - $a->page['htmlhead'] .= ''; + DI::page()['htmlhead'] .= ''; /* * Get the configuration variables from the config/addon.config.php file. diff --git a/planets/planets.php b/planets/planets.php index 59d0f49a..2453ffee 100644 --- a/planets/planets.php +++ b/planets/planets.php @@ -140,7 +140,7 @@ function planets_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php index a411354c..6e2218ec 100644 --- a/qcomment/qcomment.php +++ b/qcomment/qcomment.php @@ -43,7 +43,7 @@ function qcomment_addon_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; $words = PConfig::get(local_user(), 'qcomment', 'words', L10n::t(':-)') . "\n" . L10n::t(':-(') . "\n" . L10n::t('lol')); diff --git a/randplace/randplace.php b/randplace/randplace.php index 65eb0133..af41405f 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -159,7 +159,7 @@ function randplace_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/remote_permissions/remote_permissions.php b/remote_permissions/remote_permissions.php index a985bf37..8011d5c3 100644 --- a/remote_permissions/remote_permissions.php +++ b/remote_permissions/remote_permissions.php @@ -39,7 +39,7 @@ function remote_permissions_settings(&$a,&$o) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/showmore/showmore.php b/showmore/showmore.php index 7a446ec8..dcc9e2f9 100644 --- a/showmore/showmore.php +++ b/showmore/showmore.php @@ -35,7 +35,7 @@ function showmore_addon_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= ''."\r\n"; + DI::page()['htmlhead'] .= ''."\r\n"; $enable_checked = (intval(PConfig::get(local_user(), 'showmore', 'disable')) ? '' : ' checked="checked"'); $chars = PConfig::get(local_user(), 'showmore', 'chars', 1100); diff --git a/startpage/startpage.php b/startpage/startpage.php index c2ade1d3..11633d40 100644 --- a/startpage/startpage.php +++ b/startpage/startpage.php @@ -72,7 +72,7 @@ function startpage_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/superblock/superblock.php b/superblock/superblock.php index 99f4a4dc..aae1b132 100644 --- a/superblock/superblock.php +++ b/superblock/superblock.php @@ -38,7 +38,7 @@ function superblock_addon_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; $words = PConfig::get(local_user(), 'system', 'blocked'); if (!$words) { @@ -112,7 +112,7 @@ function superblock_conversation_start(&$a, &$b) if ($words) { $a->data['superblock'] = explode(',', $words); } - $a->page['htmlhead'] .= <<< EOT + DI::page()['htmlhead'] .= <<< EOT