]> git.mxchange.org Git - friendica-addons.git/blobdiff - piwik/piwik.php
Merge pull request #172 from annando/master
[friendica-addons.git] / piwik / piwik.php
index c4d384678b0dd2fb54b741990575774bb38d9560..21bc7af204940dd63b6e678325752bf77cba38e1 100755 (executable)
@@ -3,7 +3,7 @@
  * Name: Piwik Analytics
  * Description: Piwik Analytics Plugin for Friendica
  * Version: 1.1
- * Author: Tobias Diekershoff <http://diekershoff.homeunix.net/friendika/profile/tobias>
+ * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  * Author: Klaus Weidenbach
  */
 
@@ -26,8 +26,6 @@
  *     installation has. Alter the baseurl to fit your needs, don't care
  *     about http/https but beware to put the trailing / at the end of your
  *     setting.
- *
- *     Documentation see http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Piwik_Plugin
  */
 
 function piwik_install() {
@@ -78,15 +76,15 @@ function piwik_analytics($a,&$b) {
                $b .= "<div id='piwik-optout-link'>";
                $b .= t("This website is tracked using the <a href='http://www.piwik.org'>Piwik</a> analytics tool.");
                $b .= " ";
-               $the_url =  "//".$baseurl ."index.php?module=CoreAdminHome&action=optOut";
+               $the_url =  "http://".$baseurl ."index.php?module=CoreAdminHome&action=optOut";
                $b .= sprintf(t("If you do not want that your visits are logged this way you <a href='%s'>can set a cookie to prevent Piwik from tracking further visits of the site</a> (opt-out)."), $the_url);
                $b .= "</div>";
        }
 }
 function piwik_plugin_admin (&$a, &$o) {
-       $t = file_get_contents( dirname(__file__)."/admin.tpl");
+       $t = get_markup_template( "admin.tpl", "addon/piwik/" );
        $o = replace_macros( $t, array(
-               '$submit' => t('Submit'),
+               '$submit' => t('Save Settings'),
                '$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' ), ''),
                '$optout' => array('optout', t('Show opt-out cookie link?'), get_config('piwik','optout' ), ''),