X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=piwik%2Fpiwik.php;h=a0dd1c257c7f15d663c3ba9a796517289d302ba2;hb=3da6f1471cc8482e626fa3ad4530ee7cd858f813;hp=dbb1f45a257ea99a672d4aef7eaeff9914decfd4;hpb=7360ccafe7b9d76493b4d2c5a76d70d6dd2c3c00;p=friendica-addons.git diff --git a/piwik/piwik.php b/piwik/piwik.php index dbb1f45a..a0dd1c25 100755 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -3,7 +3,7 @@ * Name: Piwik Analytics * Description: Piwik Analytics Plugin for Friendica * Version: 1.1 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * Author: Klaus Weidenbach */ @@ -49,7 +49,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'] .= '' . "\r\n"; + $a->page['htmlhead'] .= ''; /* * Get the configuration variables from the .htconfig file. @@ -65,9 +65,9 @@ function piwik_analytics($a,&$b) { */ if ($async) { $a->page['htmlhead'] .= " \r\n\r\n"; - $b .= "
\r\n\r\n
"; + $b .= "
\r\n\r\n
"; } else { - $b .= "
\r\n \r\n\r\n\r\n
"; + $b .= "
\r\n \r\n\r\n\r\n
"; } /* @@ -84,8 +84,16 @@ function piwik_analytics($a,&$b) { } } function piwik_plugin_admin (&$a, &$o) { - $t = file_get_contents( dirname(__file__)."/admin.tpl"); - $o = replace_macros( $t, array( +# $t = file_get_contents( dirname(__file__)."/admin.tpl"); + $t = get_markup_template( "admin.tpl", "addon/piwik/" ); + + $includes = array( + '$field_input' => 'field_input.tpl', + '$field_checkbox' => 'field_select.tpl', + ); + $includes = set_template_includes($a->theme['template_engine'], $includes); + + $o = replace_macros( $t, $includes + array( '$submit' => t('Submit'), '$baseurl' => array('baseurl', t('Piwik Base URL'), get_config('piwik','baseurl' ), t('Absolute path to your Piwik installation. (without protocol (http/s), with trailing slash)')), '$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''),