X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=piwik%2Fpiwik.php;h=bbec1f6fc5f3853342635a233a950e5130340409;hb=7ab24791667ab0ab1a04d01802e0a3ff47110c24;hp=279c82e2ab243b4650b6f43de91bc2e9de4f836b;hpb=12777e0a8798b126bc4a886dedfb39b3f3c3cbaf;p=friendica-addons.git diff --git a/piwik/piwik.php b/piwik/piwik.php old mode 100755 new mode 100644 index 279c82e2..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 .= "