本文整理汇总了PHP中Piwik_AddWidget函数的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_AddWidget函数的具体用法?PHP Piwik_AddWidget怎么用?PHP Piwik_AddWidget使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Piwik_AddWidget函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addWidgets
function addWidgets()
{
Piwik_AddWidget('General_Visitors', 'VisitorInterest_WidgetLengths', 'VisitorInterest', 'getNumberOfVisitsPerVisitDuration');
Piwik_AddWidget('General_Visitors', 'VisitorInterest_WidgetPages', 'VisitorInterest', 'getNumberOfVisitsPerPage');
Piwik_AddWidget('General_Visitors', 'VisitorInterest_visitsByVisitCount', 'VisitorInterest', 'getNumberOfVisitsByVisitCount');
Piwik_AddWidget('General_Visitors', 'VisitorInterest_VisitsByDaysSinceLast', 'VisitorInterest', 'getNumberOfVisitsByDaysSinceLast');
}
示例2: addWidget
function addWidget()
{
$widgets = array('getDeviceMobile' => 'Mobile vs. Desktop', 'getDeviceName' => 'Devices by Model Name', 'getDeviceBrand' => 'Devices by Brand Name', 'getDeviceBrowser' => 'Mobile Browsers', 'getDeviceResolution' => 'Screen Resolutions', 'getDeviceJS' => 'JavaScript Support', 'getDeviceAJAX' => 'AJAX Support', 'getDeviceFlash' => 'Flash Support', 'getDeviceOS' => 'Operating System');
foreach ($widgets as $method => $label) {
Piwik_AddWidget('Mobile Analytics', $label, 'MobileAnalytics', $method);
}
}
示例3: addWidgets
function addWidgets()
{
$widgetContinentLabel = Piwik_Translate('UserCountry_WidgetLocation') . ' (' . Piwik_Translate('UserCountry_Continent') . ')';
$widgetCountryLabel = Piwik_Translate('UserCountry_WidgetLocation') . ' (' . Piwik_Translate('UserCountry_Country') . ')';
Piwik_AddWidget('General_Visitors', $widgetContinentLabel, 'UserCountry', 'getContinent');
Piwik_AddWidget('General_Visitors', $widgetCountryLabel, 'UserCountry', 'getCountry');
}
示例4: postLoad
function postLoad()
{
// we register the widgets so they appear in the "Add a new widget" window in the dashboard
// Note that the first two parameters can be either a normal string, or an index to a translation string
Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_exampleWidget', 'ExamplePlugin', 'exampleWidget');
Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_blogPiwikRss', 'ExamplePlugin', 'blogPiwik');
Piwik_AddWidget('ExamplePlugin_exampleWidgets', 'ExamplePlugin_photostreamMatt', 'ExamplePlugin', 'photostreamMatt');
}
示例5: addWidgets
function addWidgets()
{
Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetKeywords', 'Referers', 'getKeywords');
Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetCampaigns', 'Referers', 'getCampaigns');
Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetExternalWebsites', 'Referers', 'getWebsites');
Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetSearchEngines', 'Referers', 'getSearchEngines');
Piwik_AddWidget( 'Referers_Referers', 'Referers_WidgetOverview', 'Referers', 'getRefererType');
}
示例6: addWidgets
function addWidgets()
{
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetResolutions', 'UserSettings', 'getResolution');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetBrowsers', 'UserSettings', 'getBrowser');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetPlugins', 'UserSettings', 'getPlugin');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetWidescreen', 'UserSettings', 'getWideScreen');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetBrowserFamilies', 'UserSettings', 'getBrowserType');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetOperatingSystems', 'UserSettings', 'getOS');
Piwik_AddWidget('UserSettings_VisitorSettings', 'UserSettings_WidgetGlobalVisitors', 'UserSettings', 'getConfiguration');
}
示例7: addWidgets
/**
* Adds Referer widgets
*/
function addWidgets()
{
Piwik_AddWidget('Referers_Referers', 'Referers_WidgetKeywords', 'Referers', 'getKeywords');
Piwik_AddWidget('Referers_Referers', 'Referers_WidgetExternalWebsites', 'Referers', 'getWebsites');
Piwik_AddWidget('Referers_Referers', 'Referers_WidgetSearchEngines', 'Referers', 'getSearchEngines');
Piwik_AddWidget('Referers_Referers', 'Referers_WidgetCampaigns', 'Referers', 'getCampaigns');
Piwik_AddWidget('Referers_Referers', 'Referers_WidgetOverview', 'Referers', 'getRefererType');
if (Piwik_Archive::isSegmentationEnabled()) {
Piwik_AddWidget('SEO', 'Top Keywords for Page URL', 'Referers', 'getKeywordsForPage');
}
}
示例8: addWidget
function addWidget()
{
Piwik_AddWidget('General_Visitors', 'IntranetSubNetwork_WidgetIntranetSubNetwork', 'IntranetSubNetwork', 'getIntranetSubNetwork');
}
示例9: addWidgets
function addWidgets()
{
$idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
// Ecommerce widgets
$site = new Piwik_Site($idSite);
if ($site->isEcommerceEnabled()) {
Piwik_AddWidget('Goals_Ecommerce', 'Goals_EcommerceOverview', 'Goals', 'widgetGoalReport', array('idGoal' => Piwik_Archive::LABEL_ECOMMERCE_ORDER));
Piwik_AddWidget('Goals_Ecommerce', 'Goals_EcommerceLog', 'Goals', 'getEcommerceLog');
foreach ($this->ecommerceReports as $widget) {
Piwik_AddWidget('Goals_Ecommerce', $widget[0], $widget[1], $widget[2]);
}
}
// Goals widgets
Piwik_AddWidget('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview');
$goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
if (count($goals) > 0) {
foreach ($goals as $goal) {
Piwik_AddWidget('Goals_Goals', Piwik_Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
}
}
}
示例10: getInformation
{
public function getInformation()
{
return array('name' => 'Example Rss Widget', 'description' => 'Example Plugin: How to create a new widget that reads a RSS feed?', 'author' => 'Piwik', 'homepage' => 'http://piwik.org/', 'version' => '0.1');
}
public function getListHooksRegistered()
{
return array('template_css_import' => 'css');
}
function css()
{
echo '<link rel="stylesheet" type="text/css" href="plugins/ExampleRssWidget/templates/styles.css" />';
}
}
Piwik_AddWidget('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik');
Piwik_AddWidget('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog');
class Piwik_ExampleRssWidget_Controller extends Piwik_Controller
{
function rssPiwik()
{
$rss = new Piwik_ExampleRssWidget_Rss('http://feeds.feedburner.com/Piwik');
$rss->showDescription(true);
echo $rss->get();
}
function rssChangelog()
{
$rss = new Piwik_ExampleRssWidget_Rss('http://feeds.feedburner.com/PiwikReleases');
$rss->setCountPosts(1);
$rss->showDescription(false);
$rss->showContent(true);
echo $rss->get();
示例11: addWidget
public function addWidget()
{
Piwik_AddWidget('Live!', 'Live_VisitorsInRealTime', 'Live', 'widget');
}
示例12: addWidget
public function addWidget() {
Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget');
}
示例13: getInformation
* @version $Id: Live.php 1420 2009-08-22 13:23:16Z vipsoft $
*
* @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
*/
class Piwik_Live extends Piwik_Plugin
{
public function getInformation()
{
return array('name' => 'Live Visitors', 'description' => 'Live Visitors!', 'author' => 'Piwik', 'homepage' => 'http://piwik.org/', 'version' => '0.1');
}
}
Piwik_AddWidget('Live!', 'Live Visitors!', 'Live', 'widget');
示例14: addWidgets
function addWidgets()
{
Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuPages', 'Actions', 'getPageUrls');
Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPageTitles', 'Actions', 'getPageTitles');
Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuOutlinks', 'Actions', 'getOutlinks');
Piwik_AddWidget('Actions_Actions', 'Actions_SubmenuDownloads', 'Actions', 'getDownloads');
Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPagesEntry', 'Actions', 'getEntryPageUrls');
Piwik_AddWidget('Actions_Actions', 'Actions_WidgetPagesExit', 'Actions', 'getExitPageUrls');
Piwik_AddWidget('Actions_Actions', 'Actions_WidgetEntryPageTitles', 'Actions', 'getEntryPageTitles');
Piwik_AddWidget('Actions_Actions', 'Actions_WidgetExitPageTitles', 'Actions', 'getExitPageTitles');
if ($this->isSiteSearchEnabled()) {
Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchKeywords', 'Actions', 'getSiteSearchKeywords');
if (self::isCustomVariablesPluginsEnabled()) {
Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchCategories', 'Actions', 'getSiteSearchCategories');
}
Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetSearchNoResultKeywords', 'Actions', 'getSiteSearchNoResultKeywords');
Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetPageUrlsFollowingSearch', 'Actions', 'getPageUrlsFollowingSiteSearch');
Piwik_AddWidget('Actions_SubmenuSitesearch', 'Actions_WidgetPageTitlesFollowingSearch', 'Actions', 'getPageTitlesFollowingSiteSearch');
}
}
示例15: addWidgets
/** Provide Widgets */
public function addWidgets()
{
Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_MostPopularInternalSearches'), 'SiteSearch', 'keywordsWidget');
Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_InternalSearchEvolution'), 'SiteSearch', 'evolutionWidget');
Piwik_AddWidget('Site Search', Piwik_Translate('SiteSearch_PercentageOfSearchUsers'), 'SiteSearch', 'searchPercentageWidget');
}