]> git.mxchange.org Git - friendica.git/commitdiff
fixed a typo
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 23 Jun 2011 19:44:25 +0000 (21:44 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 23 Jun 2011 19:44:25 +0000 (21:44 +0200)
addon/piwik/admin.tpl
addon/piwik/piwik.php

index e7a281e3a51e81b28c0554d34e98a8b5343d890c..0edd062104bca003f54f0f8264df8e6ec9e4c637 100644 (file)
@@ -1,4 +1,4 @@
 {{ inc field_input.tpl with $field=$baseurl }}{{ endinc }}
-{{ inc field_input.tpl with $field=$sideid }}{{ endinc }}
+{{ inc field_input.tpl with $field=$siteid }}{{ endinc }}
 {{ inc field_checkbox.tpl with $field=$optout }}{{ endinc }}
 <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
index 94aa9b55c0d5dd1c43d1825e81487597df3bf1e2..3cc136d2999db5f266c484ded44e68fdf91ed049 100644 (file)
  *     Add the following two lines to your .htconfig.php file:
  *
  *     $a->config['piwik']['baseurl'] = 'www.example.com/piwik/';
- *     $a->config['piwik']['sideid'] = '1';
+ *     $a->config['piwik']['siteid'] = '1';
  *     $a->config['piwik']['optout'] = true;  // set to false to disable
  *
- *     Change the sideid to the ID that the Piwik tracker for your Friendika
+ *     Change the siteid to the ID that the Piwik tracker for your Friendika
  *     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.
@@ -54,13 +54,13 @@ function piwik_analytics($a,&$b) {
         *   Get the configuration variables from the .htconfig file.
         */
        $baseurl = get_config('piwik','baseurl');
-       $sideod  = get_config('piwik','sideid');
+       $siteid  = get_config('piwik','siteid');
        $optout  = get_config('piwik','optout');
 
        /*
-        *   Add the Piwik code for the side.
+        *   Add the Piwik code for the site.
         */
-       $b .= "<div id='piwik-code-block'> <!-- Piwik -->\r\n <script type=\"text/javascript\">\r\n var pkBaseURL = ((\"https:\" == document.location.protocol) ? \"https://".$baseurl."\" : \"http://".$baseurl."\");\r\n document.write(unescape(\"%3Cscript src='\" + pkBaseURL + \"piwik.js' type='text/javascript'%3E%3C/script%3E\"));\r\n </script>\r\n<script type=\"text/javascript\">\r\n try {\r\n var piwikTracker = Piwik.getTracker(pkBaseURL + \"piwik.php\", 8);\r\n piwikTracker.trackPageView();\r\n piwikTracker.enableLinkTracking();\r\n }\r\n catch( err ) {}\r\n </script>\r\n<noscript><p><img src=\"http://".$baseurl."/piwik.php?idsite=8\" style=\"border:0\" alt=\"\" /></p></noscript>\r\n <!-- End Piwik Tracking Tag --> </div>";
+       $b .= "<div id='piwik-code-block'> <!-- Piwik -->\r\n <script type=\"text/javascript\">\r\n var pkBaseURL = ((\"https:\" == document.location.protocol) ? \"https://".$baseurl."\" : \"http://".$baseurl."\");\r\n document.write(unescape(\"%3Cscript src='\" + pkBaseURL + \"piwik.js' type='text/javascript'%3E%3C/script%3E\"));\r\n </script>\r\n<script type=\"text/javascript\">\r\n try {\r\n var piwikTracker = Piwik.getTracker(pkBaseURL + \"piwik.php\", ".$siteid.");\r\n piwikTracker.trackPageView();\r\n piwikTracker.enableLinkTracking();\r\n }\r\n catch( err ) {}\r\n </script>\r\n<noscript><p><img src=\"http://".$baseurl."/piwik.php?idsite=".$siteid."\" style=\"border:0\" alt=\"\" /></p></noscript>\r\n <!-- End Piwik Tracking Tag --> </div>";
        /*
         *   If the optout variable is set to true then display the notice
         *   otherwise just include the above code into the page.
@@ -75,16 +75,16 @@ function piwik_plugin_admin (&$a, &$o) {
     $o = replace_macros( $t, array(
             '$submit' => t('Submit'),
             '$baseurl' => array('baseurl', t('Piwik Base URL'), get_config('piwik','baseurl' ), ''),
-            '$sideid' => array('sideid', t('Side ID'), get_config('piwik','sideid' ), ''),
+            '$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''),
             '$optout' => array('optout', t('Show opt-out cookie link?'), get_config('piwik','optout' ), ''),
         ));
 }
 function piwik_plugin_admin_post (&$a) {
     $url = ((x($_POST, 'baseurl')) ? notags(trim($_POST['baseurl'])) : '');
-    $id = ((x($_POST, 'sideid')) ? trim($_POST['sideid']) : '');
+    $id = ((x($_POST, 'siteid')) ? trim($_POST['siteid']) : '');
     $optout = ((x($_POST, 'optout')) ? trim($_POST['optout']) : '');
     set_config('piwik', 'baseurl', $url);
-    set_config('piwik', 'sideid', $id);
+    set_config('piwik', 'siteid', $id);
     set_config('piwik', 'optout', $optout);
     info( t('Settings updated.'). EOL);
 }