diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/api_internal_call.php | 44 | ||||
-rw-r--r-- | misc/api_rest_call.php | 12 | ||||
-rw-r--r-- | misc/generateVisits.php | 74 | ||||
-rwxr-xr-x | misc/phpdoc-config.ini | 128 | ||||
-rw-r--r-- | misc/testJavascriptTracker/index.php | 80 | ||||
-rw-r--r-- | misc/testJavascriptTracker/page2.php | 88 |
6 files changed, 213 insertions, 213 deletions
diff --git a/misc/api_internal_call.php b/misc/api_internal_call.php index 1b02b272b2..99486cf872 100644 --- a/misc/api_internal_call.php +++ b/misc/api_internal_call.php @@ -1,23 +1,23 @@ -<?php
-define('PIWIK_INCLUDE_PATH', '..');
-define('ENABLE_DISPATCH', false);
-require_once PIWIK_INCLUDE_PATH . "/index.php";
-require_once PIWIK_INCLUDE_PATH . "/modules/API/Request.php";
-
-// We call the API from a php code
-// it will check that you have the necessary rights
-// - either you are loggued in piwik and have a cookie in your browser
-// - or you will have to add the token_auth=XXX to the request string to authenticate
-// beware that the token_auth changes every time you change your password
-$request = new Piwik_API_Request('
- method=UserSettings.getResolution
- &idSite=1
- &date=yesterday
- &period=week
- &format=XML
- &filter_limit=3
-');
-$result = $request->process();
-echo $result;
-
+<?php +define('PIWIK_INCLUDE_PATH', '..'); +define('ENABLE_DISPATCH', false); +require_once PIWIK_INCLUDE_PATH . "/index.php"; +require_once PIWIK_INCLUDE_PATH . "/modules/API/Request.php"; + +// We call the API from a php code +// it will check that you have the necessary rights +// - either you are loggued in piwik and have a cookie in your browser +// - or you will have to add the token_auth=XXX to the request string to authenticate +// beware that the token_auth changes every time you change your password +$request = new Piwik_API_Request(' + method=UserSettings.getResolution + &idSite=1 + &date=yesterday + &period=week + &format=XML + &filter_limit=3 +'); +$result = $request->process(); +echo $result; + ?>
\ No newline at end of file diff --git a/misc/api_rest_call.php b/misc/api_rest_call.php index f02db78f85..2176c03d7f 100644 --- a/misc/api_rest_call.php +++ b/misc/api_rest_call.php @@ -1,13 +1,13 @@ -<?php
-// this token is used to authenticate your API request.
-// You can get the token on the API page inside your Piwik interface
-$token_auth = 'anonymous';
+<?php +// this token is used to authenticate your API request. +// You can get the token on the API page inside your Piwik interface +$token_auth = 'anonymous'; // we call the REST API and request the 100 first keywords for the last month for the idsite=1 $url = "http://piwik.org/demo/"; -$url .= "?module=API&method=Referers.getKeywords";
+$url .= "?module=API&method=Referers.getKeywords"; $url .= "&idSite=1&period=month&date=yesterday"; -$url .= "&format=PHP&filter_limit=20";
+$url .= "&format=PHP&filter_limit=20"; $url .= "&token_auth=$token_auth"; $fetched = file_get_contents($url); diff --git a/misc/generateVisits.php b/misc/generateVisits.php index e021566623..dcf8e066eb 100644 --- a/misc/generateVisits.php +++ b/misc/generateVisits.php @@ -1,34 +1,34 @@ -<?php
+<?php error_reporting(E_ALL|E_NOTICE); -define('PIWIK_INCLUDE_PATH', '..');
-
-ignore_user_abort(true);
-set_time_limit(0);
-
-set_include_path(PIWIK_INCLUDE_PATH
- . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs/'
- . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins/'
- . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/modules'
- . PATH_SEPARATOR . get_include_path() );
-
-$GLOBALS['DEBUGPIWIK'] = false;
-
-ob_start();
-
-// first check that user has privileges to create some random data in the DB -> he must be super user
-define('ENABLE_DISPATCH', false);
-require_once PIWIK_INCLUDE_PATH . "/index.php";
+define('PIWIK_INCLUDE_PATH', '..'); + +ignore_user_abort(true); +set_time_limit(0); + +set_include_path(PIWIK_INCLUDE_PATH + . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs/' + . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins/' + . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/modules' + . PATH_SEPARATOR . get_include_path() ); + +$GLOBALS['DEBUGPIWIK'] = false; + +ob_start(); + +// first check that user has privileges to create some random data in the DB -> he must be super user +define('ENABLE_DISPATCH', false); +require_once PIWIK_INCLUDE_PATH . "/index.php"; require_once "FrontController.php"; $controller = Piwik_FrontController::getInstance(); $controller->init(); -
-Piwik::checkUserIsSuperUser();
-// end check that user was super user
-
-require_once "PluginsManager.php";
-require_once "Timer.php";
+ +Piwik::checkUserIsSuperUser(); +// end check that user was super user + +require_once "PluginsManager.php"; +require_once "Timer.php"; require_once "Cookie.php"; require_once "LogStats.php"; require_once "LogStats/Config.php"; @@ -37,8 +37,8 @@ require_once "LogStats/Db.php"; require_once "LogStats/Visit.php"; require_once "LogStats/Generator.php"; -// unload all loaded plugins
-//Piwik_PluginsManager::getInstance()->unloadPlugins();
+// unload all loaded plugins +//Piwik_PluginsManager::getInstance()->unloadPlugins(); // we unload the Provider plugin otherwise it tries to lookup the IP for ahostname, and there is no dns server here Piwik_PluginsManager::getInstance()->unloadPlugin('Provider'); @@ -57,28 +57,28 @@ $maxVisits = 9; $nbActions = 15; $daysToCompute = 1; -$nbActionsTotal = 0;
-
+$nbActionsTotal = 0; + //$generator->emptyAllLogTables(); -$generator->init();
+$generator->init(); $t = new Piwik_Timer; /* * Generate visits / actions for the last 31 days */ -
-// do NOT edit this line
+ +// do NOT edit this line $startTime = time() - ($daysToCompute-1)*86400; while($startTime <= time()) { - $visits = rand($minVisits,$maxVisits);
+ $visits = rand($minVisits,$maxVisits); $actions=$nbActions; - $generator->setTimestampToUse($startTime);
-
- // we add silent fail because of headers already sent error.
- // although this should'nt happen because we use a OB_START at the top of this page...
+ $generator->setTimestampToUse($startTime); + + // we add silent fail because of headers already sent error. + // although this should'nt happen because we use a OB_START at the top of this page... // but I couldnt find where those headers were sent... $nbActionsTotalThisDay = @$generator->generate($visits,$actions); diff --git a/misc/phpdoc-config.ini b/misc/phpdoc-config.ini index 69301e0b44..67b34b6c1e 100755 --- a/misc/phpdoc-config.ini +++ b/misc/phpdoc-config.ini @@ -1,64 +1,64 @@ -[Parse Data]
-;; title of all the documentation
-;; legal values: any string
-title = Piwik Documentation
-
-;; parse files that start with a . like .bash_profile
-;; legal values: true, false
-hidden = false
-
-;; show elements marked @access private in documentation by setting this to on
-;; legal values: on, off
-parseprivate = on
-
-;; parse with javadoc-like description (first sentence is always the short description)
-;; legal values: on, off
-javadocdesc = off
-
-;; This is only used by the XML:DocBook/peardoc2 converter
-defaultcategoryname = Documentation
-
-;; what is the main package?
-;; legal values: alphanumeric string plus - and _
-defaultpackagename = Piwik
-
-;; where should the documentation be written?
-;; legal values: a legal path
-;target = /home/cellog/output
-target = documentation
-
-;; Which files should be parsed out as special documentation files, such as README,
-;; INSTALL and CHANGELOG? This overrides the default files found in
-;; phpDocumentor.ini (this file is not a user .ini file, but the global file)
-readmeinstallchangelog = README, INSTALL, FAQ, LICENSE
-
-;; limit output to the specified packages, even if others are parsed
-;; legal values: package names separated by commas
-;packageoutput = package1,package2
-
-;; comma-separated list of files to parse
-;; legal values: paths separated by commas
-;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory
-
-;; comma-separated list of directories to parse
-;; legal values: directory paths separated by commas
-directory = modules,plugins
-
-;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore
-;; legal values: any wildcard strings separated by commas
-;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
-ignore = pear-*,Documentation/,test*.php,Lexer.inc
-
-;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format
-;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,
-;; HTML:frames:earthli,
-;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,
-;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli
-;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS
-;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default
-output=HTML:frames:earthli
-;output=HTML:Smarty:HandS
-
-;; turn this option on if you want highlighted source code for every file
-;; legal values: on/off
-sourcecode = off
+[Parse Data] +;; title of all the documentation +;; legal values: any string +title = Piwik Documentation + +;; parse files that start with a . like .bash_profile +;; legal values: true, false +hidden = false + +;; show elements marked @access private in documentation by setting this to on +;; legal values: on, off +parseprivate = on + +;; parse with javadoc-like description (first sentence is always the short description) +;; legal values: on, off +javadocdesc = off + +;; This is only used by the XML:DocBook/peardoc2 converter +defaultcategoryname = Documentation + +;; what is the main package? +;; legal values: alphanumeric string plus - and _ +defaultpackagename = Piwik + +;; where should the documentation be written? +;; legal values: a legal path +;target = /home/cellog/output +target = documentation + +;; Which files should be parsed out as special documentation files, such as README, +;; INSTALL and CHANGELOG? This overrides the default files found in +;; phpDocumentor.ini (this file is not a user .ini file, but the global file) +readmeinstallchangelog = README, INSTALL, FAQ, LICENSE + +;; limit output to the specified packages, even if others are parsed +;; legal values: package names separated by commas +;packageoutput = package1,package2 + +;; comma-separated list of files to parse +;; legal values: paths separated by commas +;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory + +;; comma-separated list of directories to parse +;; legal values: directory paths separated by commas +directory = modules,plugins + +;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore +;; legal values: any wildcard strings separated by commas +;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/ +ignore = pear-*,Documentation/,test*.php,Lexer.inc + +;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format +;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib, +;; HTML:frames:earthli, +;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de, +;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli +;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS +;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default +output=HTML:frames:earthli +;output=HTML:Smarty:HandS + +;; turn this option on if you want highlighted source code for every file +;; legal values: on/off +sourcecode = off diff --git a/misc/testJavascriptTracker/index.php b/misc/testJavascriptTracker/index.php index a3e3f7dc41..c3f012ffaf 100644 --- a/misc/testJavascriptTracker/index.php +++ b/misc/testJavascriptTracker/index.php @@ -1,55 +1,55 @@ -<?php
-
-require_once '../../modules/Url.php';
-$url = Piwik_Url::getCurrentUrlWithoutFileName();
+<?php + +require_once '../../modules/Url.php'; +$url = Piwik_Url::getCurrentUrlWithoutFileName(); $urlPiwik = join("/", array_slice(split("/", $url), 0, -3)); -
-?>
-
-<div>
-You should update the piwik javascript code at the bottom of this page if needed.<br />
-And test the tracker by clicking all the links below, with several browsers...<br />
-<br />
-</div>
+ +?> + +<div> +You should update the piwik javascript code at the bottom of this page if needed.<br /> +And test the tracker by clicking all the links below, with several browsers...<br /> +<br /> +</div> <a href="mailto:test@test.com"> mailto test@test.com</a> <br /> <a href="http://www.yahoo.fr"> yahoo france website</a> <br /> -<a href="http://www.yahoo.fr/index?test=test2&p_______=idugiduagi8*&*$&%(*^"> yahoo france website</a> <br />
+<a href="http://www.yahoo.fr/index?test=test2&p_______=idugiduagi8*&*$&%(*^"> yahoo france website</a> <br /> <a href="http://www.google.com"> google world website </a> <br /> <a href="ftp://parcftp.xerox.com"> FTP xerox</a> <br /> -<a href="news://news.eclipse.org"> News::eclipse</a> <br />
+<a href="news://news.eclipse.org"> News::eclipse</a> <br /> <a href="http://piwik.org"> piwik website </a> <br /> <a href="http://www.testWithImageAndText.com"><img border=0 src="../../plugins/UserCountry/flags/fr.png"> Test with image + text </a> <br /> -<a href="http://www.testWithImageOnly.com"><img border=0 src="../../plugins/UserCountry/flags/pl.png"></a> <br />
-
+<a href="http://www.testWithImageOnly.com"><img border=0 src="../../plugins/UserCountry/flags/pl.png"></a> <br /> + <br /> <a class="piwik_ignore" href="./THIS_PDF_SHOULD_NOT_BE_COUNTED.pdf"> PDF wthdownload pdf </a> <br /> <a href="./test.pdf"> download pdf (rel) </a> <br /> <a href="./dir_test/test.pdf"> download pdf + directory (rel) </a> <br /> -<a href="../testJavascriptTracker/dir_test/test.pdf"> download pdf + parent directory (rel) </a> <br />
+<a href="../testJavascriptTracker/dir_test/test.pdf"> download pdf + parent directory (rel) </a> <br /> <a href="./test.jpg"> download jpg (rel) </a> <br /> <a href="./test.zip"> download zip (rel) </a> <br /> -<a href="./test.php?fileToDownload=test.zip"> download strange URL ?file=test.zip</a> <br />
-<a href="
-<?php echo $url; ?>
-test.rar"> download rar (abs) </a> <br />
-<br />
-<a href="./page2.php"> Next (rel)</a> <br />
-<a href="<?php echo $url; ?>page2.php"> Next (abs)</a> <br />
-
-
-
-<!-- Piwik -->
-<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);">
-<script language="javascript" src="<?php echo $urlPiwik; ?>/piwik.js" type="text/javascript"></script>
-<script type="text/javascript">
-<!--
-piwik_action_name = '';
-piwik_idsite = 1;
-piwik_url = '<?php echo $urlPiwik; ?>/piwik.php';
-piwik_log(piwik_action_name, piwik_idsite,piwik_url);
-//-->
-</script><object>
-<noscript><p>Web analytics <img src="<?php echo $urlPiwik; ?>/piwik.php" style="border:0" alt="piwik"/></p>
-</noscript></object></a>
+<a href="./test.php?fileToDownload=test.zip"> download strange URL ?file=test.zip</a> <br /> +<a href=" +<?php echo $url; ?> +test.rar"> download rar (abs) </a> <br /> +<br /> +<a href="./page2.php"> Next (rel)</a> <br /> +<a href="<?php echo $url; ?>page2.php"> Next (abs)</a> <br /> + + + +<!-- Piwik --> +<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);"> +<script language="javascript" src="<?php echo $urlPiwik; ?>/piwik.js" type="text/javascript"></script> +<script type="text/javascript"> +<!-- +piwik_action_name = ''; +piwik_idsite = 1; +piwik_url = '<?php echo $urlPiwik; ?>/piwik.php'; +piwik_log(piwik_action_name, piwik_idsite,piwik_url); +//--> +</script><object> +<noscript><p>Web analytics <img src="<?php echo $urlPiwik; ?>/piwik.php" style="border:0" alt="piwik"/></p> +</noscript></object></a> <!-- /Piwik -->
\ No newline at end of file diff --git a/misc/testJavascriptTracker/page2.php b/misc/testJavascriptTracker/page2.php index a7534f5c96..01d74cd1b7 100644 --- a/misc/testJavascriptTracker/page2.php +++ b/misc/testJavascriptTracker/page2.php @@ -1,45 +1,45 @@ -<?php
-
-require_once '../../modules/Url.php';
-$url = Piwik_Url::getCurrentUrlWithoutFileName();
-$urlPiwik = join("/", array_slice(split("/", $url), 0, -3));
-?>
-
-<div>
-You should update the piwik javascript code at the bottom of this page if needed.<br />
-And test the tracker by clicking all the links below, with several browsers...<br />
-<br />
-</div>
-
-<a href="http://www.google.fr"> Site web de google france </a> <br />
-<a href="http://www.yahoo.fr"> Site web de yahoo france </a> <br />
-<a href="http://www.google.com"> Site web de google monde </a> <br />
-<a href="http://maps.google.fr"> Site web de google maps </a> <br />
-<a href="http://piwik.org"> Site web de piwik </a> <br />
-<a href="http://piwik.org/blog"> Site web de piwik </a> <br />
-<br />
-<a href="./test.pdf"> download pdf (rel) </a> <br />
-<a href="./test.jpg"> download jpg (rel) </a> <br />
-<a href="./test.zip"> download zip (rel) </a> <br />
-<a href="
-<?php echo $url; ?>
-test.rar"> download rar (abs) </a> <br />
-<br />
-<a href="./index.php"> Prev (rel)</a> <br />
-<a href="<?php echo $url; ?>index.php"> Prev (abs)</a> <br />
-
-
-<!-- Piwik -->
-<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);">
-<script language="javascript" src="<?php echo $urlPiwik; ?>/piwik.js" type="text/javascript"></script>
-<script type="text/javascript">
-<!--
-piwik_action_name = '';
-piwik_idsite = 1;
-piwik_url = '<?php echo $urlPiwik; ?>/piwik.php';
-piwik_log(piwik_action_name, piwik_idsite,piwik_url);
-//-->
-</script><object>
-<noscript><p>Web analytics <img src="<?php echo $urlPiwik; ?>/piwik.php" style="border:0" alt="piwik"/></p>
-</noscript></object></a>
+<?php + +require_once '../../modules/Url.php'; +$url = Piwik_Url::getCurrentUrlWithoutFileName(); +$urlPiwik = join("/", array_slice(split("/", $url), 0, -3)); +?> + +<div> +You should update the piwik javascript code at the bottom of this page if needed.<br /> +And test the tracker by clicking all the links below, with several browsers...<br /> +<br /> +</div> + +<a href="http://www.google.fr"> Site web de google france </a> <br /> +<a href="http://www.yahoo.fr"> Site web de yahoo france </a> <br /> +<a href="http://www.google.com"> Site web de google monde </a> <br /> +<a href="http://maps.google.fr"> Site web de google maps </a> <br /> +<a href="http://piwik.org"> Site web de piwik </a> <br /> +<a href="http://piwik.org/blog"> Site web de piwik </a> <br /> +<br /> +<a href="./test.pdf"> download pdf (rel) </a> <br /> +<a href="./test.jpg"> download jpg (rel) </a> <br /> +<a href="./test.zip"> download zip (rel) </a> <br /> +<a href=" +<?php echo $url; ?> +test.rar"> download rar (abs) </a> <br /> +<br /> +<a href="./index.php"> Prev (rel)</a> <br /> +<a href="<?php echo $url; ?>index.php"> Prev (abs)</a> <br /> + + +<!-- Piwik --> +<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);"> +<script language="javascript" src="<?php echo $urlPiwik; ?>/piwik.js" type="text/javascript"></script> +<script type="text/javascript"> +<!-- +piwik_action_name = ''; +piwik_idsite = 1; +piwik_url = '<?php echo $urlPiwik; ?>/piwik.php'; +piwik_log(piwik_action_name, piwik_idsite,piwik_url); +//--> +</script><object> +<noscript><p>Web analytics <img src="<?php echo $urlPiwik; ?>/piwik.php" style="border:0" alt="piwik"/></p> +</noscript></object></a> <!-- /Piwik -->
\ No newline at end of file |