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/UserCountry | |
parent | 999f46479294713104c962bfe7469e9b6e7a4bbf (diff) | |
parent | c98ea06f2cccec81c6ccce49162a583494e44d91 (diff) |
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/API.php | 3 | ||||
-rw-r--r-- | plugins/UserCountry/UserCountry.php | 29 |
2 files changed, 24 insertions, 8 deletions
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php index 3b83786e9a..107c072b3d 100644 --- a/plugins/UserCountry/API.php +++ b/plugins/UserCountry/API.php @@ -10,9 +10,6 @@ * @package Piwik_UserCountry */ -// no direct access -defined('PIWIK_INCLUDE_PATH') or die; - /** * @see core/DataFiles/Countries.php * @see plugins/UserCountry/functions.php diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php index 5c502d872d..f397b0a379 100644 --- a/plugins/UserCountry/UserCountry.php +++ b/plugins/UserCountry/UserCountry.php @@ -19,11 +19,10 @@ class Piwik_UserCountry extends Piwik_Plugin public function getInformation() { $info = array( - 'name' => 'Visitors Country', - 'description' => 'Reports the Country of the visitors.', + 'description' => Piwik_Translate('UserCountry_PluginDescription'), 'author' => 'Piwik', - 'homepage' => 'http://piwik.org/', - 'version' => '0.1', + 'author_homepage' => 'http://piwik.org/', + 'version' => Piwik_Version::VERSION, ); return $info; } @@ -35,6 +34,7 @@ class Piwik_UserCountry extends Piwik_Plugin 'ArchiveProcessing_Period.compute' => 'archivePeriod', 'WidgetsList.add' => 'addWidgets', 'Menu.add' => 'addMenu', + 'Goals.getAvailableGoalSegments' => 'addGoalSegments', ); return $hooks; } @@ -47,7 +47,26 @@ class Piwik_UserCountry extends Piwik_Plugin function addMenu() { - Piwik_AddMenu('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry')); + Piwik_AddMenu('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry', 'action' => 'index')); + } + + function addGoalSegments( $notification ) + { + $segments =& $notification->getNotificationObject(); + $segments = array_merge($segments, array( + array( + 'group' => Piwik_Translate('UserCountry_Location'), + 'name' => Piwik_Translate('UserCountry_Country'), + 'module' => 'UserCountry', + 'action' => 'getCountry', + ), + array( + 'group' => Piwik_Translate('UserCountry_Location'), + 'name' => Piwik_Translate('UserCountry_Continent'), + 'module' => 'UserCountry', + 'action' => 'getContinent', + ), + )); } function archivePeriod( $notification ) |