diff options
Diffstat (limited to 'plugins/Live/Live.php')
-rw-r--r-- | plugins/Live/Live.php | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php index 4fbec02c54..f659a8ae0e 100644 --- a/plugins/Live/Live.php +++ b/plugins/Live/Live.php @@ -1,16 +1,30 @@ <?php /** * Piwik - Open source web analytics - * + * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ - * + * * @category Piwik_Plugins * @package Piwik_Live */ /** + TODO Live! Plugin + ==== + - api propre + - html + - jquery spy + - make sure only one query is launched at once or what if requests takes more than 10s to succeed? + - simple stats above in TEXT + - Security review + - blog post, push version + +//TODO add api to get actions name/count/first/last/etc + */ + +/** * * @package Piwik_Live */ @@ -19,34 +33,13 @@ class Piwik_Live extends Piwik_Plugin public function getInformation() { return array( - 'description' => Piwik_Translate('Live_PluginDescription'), + 'name' => 'Live Visitors', + 'description' => 'Live Visitors!', 'author' => 'Piwik', - 'author_homepage' => 'http://piwik.org/', - 'version' => Piwik_Version::VERSION, - ); - } - - function getListHooksRegistered() - { - return array( - 'template_css_import' => 'css', - 'WidgetsList.add' => 'addWidget', - 'Menu.add' => 'addMenu', + 'homepage' => 'http://piwik.org/', + 'version' => '0.1', ); } - - function css() - { - echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/default/styles.css\" />\n"; - } - - function addMenu() - { - Piwik_AddMenu('General_Visitors', 'Live_VisitorLog', array('module' => 'Live', 'action' => 'getLastVisitsDetails')); - } - - public function addWidget() { - Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget'); - } - } + +Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget'); |