X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=piwik%2Fpiwik.php;h=bbec1f6fc5f3853342635a233a950e5130340409;hb=ecd62d5927c7394947fdc341416a7eade6ab48eb;hp=7a1cb5813776a001100e333a31122f2db2f1f42b;hpb=fff767089e462f98af477de8aa0d51da1e549f81;p=friendica-addons.git diff --git a/piwik/piwik.php b/piwik/piwik.php old mode 100755 new mode 100644 index 7a1cb581..bbec1f6f --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -1,13 +1,13 @@ * Author: Klaus Weidenbach */ -/* Piwik Analytics Plugin for Friendica +/* Piwik Analytics Addon for Friendica * * Author: Tobias Diekershoff * tobias.diekershoff@gmx.net @@ -29,23 +29,26 @@ * about http/https but beware to put the trailing / at the end of your * setting. */ +use Friendica\Core\Addon; +use Friendica\Core\Config; +use Friendica\Core\L10n; function piwik_install() { - register_hook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics'); + Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics'); - logger("installed piwik plugin"); + logger("installed piwik addon"); } function piwik_uninstall() { - unregister_hook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics'); + 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. */ @@ -54,10 +57,10 @@ function piwik_analytics($a,&$b) { /* * Get the configuration variables from the .htconfig file. */ - $baseurl = get_config('piwik','baseurl'); - $siteid = get_config('piwik','siteid'); - $optout = get_config('piwik','optout'); - $async = get_config('piwik','async'); + $baseurl = Config::get('piwik','baseurl'); + $siteid = Config::get('piwik','siteid'); + $optout = Config::get('piwik','optout'); + $async = Config::get('piwik','async'); /* * Add the Piwik tracking code for the site. @@ -76,31 +79,31 @@ function piwik_analytics($a,&$b) { */ if ($optout) { $b .= "