コード例 #1
0
ファイル: VisitorInterest.php プロジェクト: ntulip/piwik
 function postLoad()
 {
     Piwik_AddAction('template_headerVisitsFrequency', array('Piwik_VisitorInterest', 'headerVisitsFrequency'));
     Piwik_AddAction('template_footerVisitsFrequency', array('Piwik_VisitorInterest', 'footerVisitsFrequency'));
 }
コード例 #2
0
ファイル: Provider.php プロジェクト: neolf/PIWIK4MOBILE
 function postLoad()
 {
     Piwik_AddAction('template_headerUserCountry', array('Piwik_Provider', 'headerUserCountry'));
     Piwik_AddAction('template_footerUserCountry', array('Piwik_Provider', 'footerUserCountry'));
 }
コード例 #3
0
 function postLoad()
 {
     Piwik_AddAction('template_headerMobileDevices', array('Piwik_MobileAnalytics', 'headerMobileDevices'));
     Piwik_AddAction('template_footerMobileDevices', array('Piwik_MobileAnalytics', 'footerMobileDevices'));
 }
コード例 #4
0
 /** Test no concurrency issues when deleting log data from log_action table. */
 public function test_purgeLogData_concurrency()
 {
     Piwik_AddAction("LogDataPurger.actionsToKeepInserted.olderThan", array($this, 'addReferenceToUnusedAction'));
     $this->addLogData();
     $purger = Piwik_PrivacyManager_LogDataPurger::make($this->settings, true);
     $this->unusedIdAction = Piwik_FetchOne("SELECT idaction FROM " . Piwik_Common::prefixTable('log_action') . " WHERE name = ?", array('whatever.com/_40'));
     $this->assertTrue($this->unusedIdAction);
     // purge data
     $purger->purgeData();
     // check that actions were purged
     $this->assertEqual(22, $this->getTableCount('log_action'));
     // January
     // check that the unused action still exists
     $count = Piwik_FetchOne("SELECT COUNT(*) FROM " . Piwik_Common::prefixTable('log_action') . " WHERE idaction = ?", array($this->unusedIdAction));
     $this->assertEqual(1, $count);
     $this->unusedIdAction = null;
     // so the hook won't get executed twice
 }
コード例 #5
0
ファイル: Widget.php プロジェクト: Doluci/tomatocart
<?php

Piwik_AddAction('Menu', 'Piwik_BuildMenu');
static $widgets = array();
function Piwik_GetListWidgets()
{
    global $widgets;
    return $widgets;
}
function Piwik_AddWidget($pluginName, $controllerMethodToCall, $widgetTitle)
{
    global $widgets;
    // get the plugin name from controller
    $widgets[$pluginName][] = array($widgetTitle, $controllerMethodToCall);
}