diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-27 08:18:16 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-27 08:18:16 +0400 |
commit | bfba0e7e3e0ad6814598d25852289024e8083c9d (patch) | |
tree | 6379b457ce107dc84454e26c2ce5938ff3befab2 /plugins/UserCountry | |
parent | 343f365af322f68d6ea86ea929041ce34e8957d6 (diff) |
- API CHANGE: the API for the function Piwik_AddWidget has changed. The new API is Piwik_AddWidget( $widgetCategory, $widgetName, $controllerName, $controllerAction, $customParameters = array()). See examples of calls in all the core Piwik plugins. This change was necessary to make widgets more modular (they now accept custom parameters).
- API CHANGE: a small number of CSV outputs for some API calls would change following the simplification of DataTable_Simple implementation. Affected calls are VisitsSummary.get, Goals.get, VisitFrequency.get. This is due to a change in the implementation of DataTable_Simple (we simplified implementation).
- FIXED #84 Added proper translations for all columns, in tables, and graphs.
- FIXED #322 piwik is now using open flash chart 2
- FIXED #126 all dates should be correctly displayed in all graphs. For example, evolution graph for days would show, on the X axis "Mon 29", "Wed 31". For months it would show "Aug 2009", etc.
- ADDED: when hovering any of the sparklines, the UI makes it clear that clicking will refresh the evolution graph. This feature was in Piwik for months, and even Google Analytics implemented this UI feature after Piwik. However in Piwik it wasn't clear to the user that the sparklines were clickable.
- ADDED: now widgets can be created with custom parameters. This makes it possible to create a widget that calls a controller->action with other custom parameters, this is used in Piwik to draw an evolution graph (module=VisitsSummary & action=getEvolutionGraph) for a given metric (&columns[]=nb_visits). These custom parameters are automatically forwarded to the sparkline url, the flash graph when clicked on sparkline, etc.
- The widget layout is now saved as a JSON string rather than a custom data structure. The dashboard code should be able to read & restore most of the layouts from the old format (except the evolution graphs widgets). Simplified the Dashboard.js, widgetMenu.js, cleaned up what was a messy code.
- Added sentence in Widgetize to let users know they can easily export the Piwik dashboard in an iframe.
- Changed the way translations used in Javascript are loaded: all translations strings finishing by _js will be loaded to be used in the templates when calling {loadJavascriptTranslations plugins='YOUR_PLUGIN_NAME'}
- Moved all templates in plugins under plugins/$PLUGIN/templates/
- 'Khtml (Konqueror, Safari)' now displayed as 'KHTML (Safari, Chrome)'
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/API.php | 2 | ||||
-rw-r--r-- | plugins/UserCountry/Controller.php | 2 | ||||
-rw-r--r-- | plugins/UserCountry/UserCountry.php | 4 | ||||
-rw-r--r-- | plugins/UserCountry/templates/index.tpl (renamed from plugins/UserCountry/index.tpl) | 0 |
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php index 976f649344..ac9f758fb0 100644 --- a/plugins/UserCountry/API.php +++ b/plugins/UserCountry/API.php @@ -62,7 +62,7 @@ class Piwik_UserCountry_API { Piwik::checkUserHasViewAccess( $idSite ); $archive = Piwik_Archive::build($idSite, $period, $date ); - return $archive->getDataTableFromNumeric('UserCountry_distinctCountries'); + return $archive->getNumeric('UserCountry_distinctCountries'); } diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php index ecf5c0548f..a7fadc8b17 100644 --- a/plugins/UserCountry/Controller.php +++ b/plugins/UserCountry/Controller.php @@ -5,7 +5,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller { function index() { - $view = new Piwik_View('UserCountry/index.tpl'); + $view = new Piwik_View('UserCountry/templates/index.tpl'); $view->urlSparklineCountries = $this->getUrlSparkline('getLastDistinctCountriesGraph'); $view->numberDistinctCountries = $this->getNumberOfDistinctCountries(true); diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php index 7f39f2a147..04b41463bd 100644 --- a/plugins/UserCountry/UserCountry.php +++ b/plugins/UserCountry/UserCountry.php @@ -40,8 +40,8 @@ class Piwik_UserCountry extends Piwik_Plugin function addWidgets() { - Piwik_AddWidget( 'UserCountry', 'getContinent', Piwik_Translate('UserCountry_WidgetContinents')); - Piwik_AddWidget( 'UserCountry', 'getCountry', Piwik_Translate('UserCountry_WidgetCountries')); + Piwik_AddWidget( 'General_Visitors', 'UserCountry_WidgetContinents', 'UserCountry', 'getContinent'); + Piwik_AddWidget( 'General_Visitors', 'UserCountry_WidgetCountries', 'UserCountry', 'getCountry'); } function addMenu() diff --git a/plugins/UserCountry/index.tpl b/plugins/UserCountry/templates/index.tpl index efea18c986..efea18c986 100644 --- a/plugins/UserCountry/index.tpl +++ b/plugins/UserCountry/templates/index.tpl |