Files
sourceforge-ossez/oss/piwik/trunk/plugins/Live/Live.php
T
YuCheng Hu 171d362ecf 添加 Piwik 到代码库中。
+YUCHENG HU+

git-svn-id: https://svn.code.sf.net/p/hawebs/svn@475 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
2010-07-10 04:25:56 +00:00

53 lines
1.1 KiB
PHP

<?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: Live.php 2264 2010-06-03 16:53:43Z vipsoft $
*
* @category Piwik_Plugins
* @package Piwik_Live
*/
/**
*
* @package Piwik_Live
*/
class Piwik_Live extends Piwik_Plugin
{
public function getInformation()
{
return array(
'description' => Piwik_Translate('Live_PluginDescription'),
'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',
);
}
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');
}
}