diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-23 07:45:36 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-23 07:45:36 +0400 |
commit | 7e1b5d6b762340cbff1bb928d15815980c7649a7 (patch) | |
tree | e07da179b9e1372866d2349777bd1cc6b4c9e8cf /plugins/ExampleUI | |
parent | 999f46479294713104c962bfe7469e9b6e7a4bbf (diff) | |
parent | c98ea06f2cccec81c6ccce49162a583494e44d91 (diff) |
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r-- | plugins/ExampleUI/API.php | 12 | ||||
-rw-r--r-- | plugins/ExampleUI/Controller.php | 4 | ||||
-rw-r--r-- | plugins/ExampleUI/ExampleUI.php | 12 | ||||
-rw-r--r-- | plugins/ExampleUI/images/icons-planet/LICENSE | 4 |
4 files changed, 19 insertions, 13 deletions
diff --git a/plugins/ExampleUI/API.php b/plugins/ExampleUI/API.php index 1a606d0f16..8d741a8c2b 100644 --- a/plugins/ExampleUI/API.php +++ b/plugins/ExampleUI/API.php @@ -26,11 +26,11 @@ class Piwik_ExampleUI_API return self::$instance; } - function getTemperaturesEvolution($date, $period) + public function getTemperaturesEvolution($date, $period) { $period = new Piwik_Period_Range($period, 'last30'); - $dateStart = $period->getDateStart()->get('Y-m-d'); // eg. "2009-04-01" - $dateEnd = $period->getDateEnd()->get('Y-m-d'); // eg. "2009-04-30" + $dateStart = $period->getDateStart()->toString('Y-m-d'); // eg. "2009-04-01" + $dateEnd = $period->getDateEnd()->toString('Y-m-d'); // eg. "2009-04-30" // here you could select from your custom table in the database, eg. $query = "SELECT AVG(temperature) @@ -56,7 +56,7 @@ class Piwik_ExampleUI_API } // we generate an array of random server temperatures - function getTemperatures() + public function getTemperatures() { $xAxis = array( '0h', '1h', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', '10h', '11h', @@ -75,7 +75,7 @@ class Piwik_ExampleUI_API return $dataTable; } - function getPlanetRatios() + public function getPlanetRatios() { $planetRatios = array( 'Mercury' => 0.382, @@ -93,7 +93,7 @@ class Piwik_ExampleUI_API return $dataTable; } - function getPlanetRatiosWithLogos() + public function getPlanetRatiosWithLogos() { $planetsDataTable = $this->getPlanetRatios(); foreach($planetsDataTable->getRows() as $row) diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php index a1066a6abe..3fe44d43ef 100644 --- a/plugins/ExampleUI/Controller.php +++ b/plugins/ExampleUI/Controller.php @@ -77,11 +77,11 @@ class Piwik_ExampleUI_Controller extends Piwik_Controller echo "<h2>Simple tag cloud</h2>"; $this->echoSimpleTagClouds(); - echo "<br/><br/><h2>Advanced tag cloud: with logos and links</h2> + echo "<br /><br /><h2>Advanced tag cloud: with logos and links</h2> <ul style='list-style-type:disc;margin-left:50px'> <li>The logo size is proportional to the value returned by the API</li> <li>The logo is linked to a specific URL</li> - </ul><br/><br/>"; + </ul><br /><br />"; $this->echoAdvancedTagClouds(); } function echoSimpleTagClouds() diff --git a/plugins/ExampleUI/ExampleUI.php b/plugins/ExampleUI/ExampleUI.php index fd5caf430f..9f365fb367 100644 --- a/plugins/ExampleUI/ExampleUI.php +++ b/plugins/ExampleUI/ExampleUI.php @@ -26,13 +26,19 @@ */ class Piwik_ExampleUI extends Piwik_Plugin { + /** + * Return information about this plugin. + * + * @see Piwik_Plugin + * + * @return array + */ public function getInformation() { return array( - 'name' => 'Example User Interface', - 'description' => 'Example Plugin: This plugin shows how to work with the Piwik UI: create tables, graphs, etc.', + 'description' => Piwik_Translate('ExampleUI_PluginDescription'), 'author' => 'Piwik', - 'homepage' => 'http://piwik.org/', + 'author_homepage' => 'http://piwik.org/', 'version' => '0.1', ); } diff --git a/plugins/ExampleUI/images/icons-planet/LICENSE b/plugins/ExampleUI/images/icons-planet/LICENSE index 229295935c..cbaa1f23ed 100644 --- a/plugins/ExampleUI/images/icons-planet/LICENSE +++ b/plugins/ExampleUI/images/icons-planet/LICENSE @@ -1,3 +1,3 @@ -Author : Dan Wiersema
-License: Free for non-commercial use.
+Author : Dan Wiersema +License: Free for non-commercial use. http://www.iconspedia.com/icon/neptune-4672.html
\ No newline at end of file |