当前位置: 首页>>代码示例>>PHP>>正文


PHP Piwik_View类代码示例

本文整理汇总了PHP中Piwik_View的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_View类的具体用法?PHP Piwik_View怎么用?PHP Piwik_View使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Piwik_View类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSearchEnginesAndKeywords

 function getSearchEnginesAndKeywords()
 {
     $view = new Piwik_View('Referers/templates/searchEngines_Keywords.tpl');
     $view->searchEngines = $this->getSearchEngines(true);
     $view->keywords = $this->getKeywords(true);
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:7,代码来源:Controller.php

示例2: searches

 /** Latest searches method */
 public function searches()
 {
     $view = new Piwik_View('LatestReferrers/templates/searches.tpl');
     $view->latestSearches = $this->latestSearches(true);
     $view->latestNewSearches = $this->latestNewSearches(true);
     echo $view->render();
 }
开发者ID:BeezyT,项目名称:piwik-latestreferrers,代码行数:8,代码来源:Controller.php

示例3: sendFeedback

 /**
  * send email to Piwik team and display nice thanks
  */
 function sendFeedback()
 {
     $body = Piwik_Common::getRequestVar('body', '', 'string');
     $email = Piwik_Common::getRequestVar('email', '', 'string');
     $view = new Piwik_View('Feedback/templates/sent.tpl');
     try {
         $minimumBodyLength = 35;
         if (strlen($body) < $minimumBodyLength) {
             throw new Exception(sprintf("Message must be at least %s characters long.", $minimumBodyLength));
         }
         if (!Piwik::isValidEmailString($email)) {
             throw new Exception(Piwik_Translate('UsersManager_ExceptionInvalidEmail'));
         }
         if (strpos($body, 'http://') !== false) {
             throw new Exception("The message cannot contain a URL, to avoid spams messages.");
         }
         $mail = new Piwik_Mail();
         $mail->setFrom($email);
         $mail->addTo('hello@piwik.org', 'Piwik Team');
         $mail->setSubject('[ Feedback form - Piwik ]');
         $mail->setBodyText($body);
         @$mail->send();
     } catch (Exception $e) {
         $view->ErrorString = $e->getMessage();
         $view->message = $body;
     }
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:Controller.php

示例4: index

 function index()
 {
     $view = new Piwik_View('VisitorInterest/templates/index.tpl');
     $view->dataTableNumberOfVisitsPerVisitDuration = $this->getNumberOfVisitsPerVisitDuration(true);
     $view->dataTableNumberOfVisitsPerPage = $this->getNumberOfVisitsPerPage(true);
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:7,代码来源:Controller.php

示例5: index

 function index()
 {
     $view = new Piwik_View('VisitTime/templates/index.tpl');
     $view->dataTableVisitInformationPerLocalTime = $this->getVisitInformationPerLocalTime(true);
     $view->dataTableVisitInformationPerServerTime = $this->getVisitInformationPerServerTime(true);
     echo $view->render();
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:7,代码来源:Controller.php

示例6: showLanguagesSelector

 function showLanguagesSelector()
 {
     $view = new Piwik_View("LanguagesManager/templates/languages.tpl");
     $view->languages = Piwik_LanguagesManager_API::getAvailableLanguageNames();
     $view->currentLanguageCode = self::getLanguageCodeForCurrentUser();
     $view->currentLanguageName = self::getLanguageNameForCurrentUser();
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:8,代码来源:LanguagesManager.php

示例7: index

 public function index()
 {
     $view = new Piwik_View('Actions/index.tpl');
     /* Actions, Downloads, Outlinks */
     $view->dataTableActions = $this->getActions(true);
     $view->dataTableDownloads = $this->getDownloads(true);
     $view->dataTableOutlinks = $this->getOutlinks(true);
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:9,代码来源:Controller.php

示例8: showLanguagesSelector

 /**
  * Show styled language selection drop-down list
  *
  * @param string $url The form action.  Default is to save language.
  */
 function showLanguagesSelector()
 {
     // don't use Piwik_View::factory() here
     $view = new Piwik_View("LanguagesManager/templates/languages.tpl");
     $view->languages = Piwik_LanguagesManager_API::getInstance()->getAvailableLanguageNames();
     $view->currentLanguageCode = self::getLanguageCodeForCurrentUser();
     $view->currentLanguageName = self::getLanguageNameForCurrentUser();
     Piwik_AddTopMenu('LanguageSelector', $view->render(), true, $order = 30, true);
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:14,代码来源:LanguagesManager.php

示例9: iframe

 function iframe()
 {
     $controllerName = Piwik_Common::getRequestVar('moduleToWidgetize');
     $actionName = Piwik_Common::getRequestVar('actionToWidgetize');
     $parameters = array($fetch = true);
     $outputDataTable = Piwik_FrontController::getInstance()->fetchDispatch($controllerName, $actionName, $parameters);
     $view = new Piwik_View('Widgetize/templates/iframe.tpl');
     $view->content = $outputDataTable;
     echo $view->render();
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:10,代码来源:Controller.php

示例10: displayJavascriptCode

 function displayJavascriptCode()
 {
     $idSite = Piwik_Common::getRequestVar('idsite', 1);
     Piwik::checkUserHasViewAccess($idSite);
     $jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
     $view = new Piwik_View('SitesManager/templates/DisplayJavascriptCode.tpl');
     $view->menu = Piwik_GetAdminMenu();
     $view->jsTag = $jsTag;
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:10,代码来源:Controller.php

示例11: feedburner

 /**
  * Simple feedburner statistics output
  *
  */
 function feedburner()
 {
     $view = new Piwik_View('ExampleFeedburner/templates/feedburner.tpl');
     $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
     $feedburnerFeedName = Piwik_FetchOne('SELECT feedburnerName FROM ' . Piwik::prefixTable('site') . ' WHERE idsite = ?', $idSite);
     if (empty($feedburnerFeedName)) {
         $feedburnerFeedName = 'Piwik';
     }
     $view->feedburnerFeedName = $feedburnerFeedName;
     $view->idSite = $idSite;
     echo $view->render();
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:16,代码来源:ExampleFeedburner.php

示例12: index

 function index()
 {
     $view = new Piwik_View('UserSettings/templates/index.tpl');
     $view->dataTablePlugin = $this->getPlugin(true);
     $view->dataTableResolution = $this->getResolution(true);
     $view->dataTableConfiguration = $this->getConfiguration(true);
     $view->dataTableOS = $this->getOS(true);
     $view->dataTableBrowser = $this->getBrowser(true);
     $view->dataTableBrowserType = $this->getBrowserType(true);
     $view->dataTableWideScreen = $this->getWideScreen(true);
     echo $view->render();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:12,代码来源:Controller.php

示例13: index

 /** The plugin index */
 public function index()
 {
     $view = new Piwik_View('SiteSearch/templates/index.tpl');
     $view->evolution = $this->evolution(true);
     $view->keywords = $this->keywords(true);
     $view->noResults = $this->noResults(true);
     $view->searchPercentage = $this->searchPercentage(true);
     if (isset($this->date)) {
         $view->period = $this->range->getLocalizedLongString();
     }
     echo $view->render();
 }
开发者ID:BeezyT,项目名称:piwik-sitesearch,代码行数:13,代码来源:Controller.php

示例14: index

 function index()
 {
     Piwik::checkUserIsSuperUser();
     $listPlugins = Piwik_PluginsManager::getInstance()->readPluginsDirectory();
     $loadedPlugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
     $plugins = array();
     foreach ($listPlugins as $pluginName) {
         $oPlugin = Piwik_PluginsManager::getInstance()->loadPlugin($pluginName);
         $plugins[$pluginName] = array('activated' => Piwik_PluginsManager::getInstance()->isPluginEnabled($pluginName), 'alwaysActivated' => Piwik_PluginsManager::getInstance()->isPluginAlwaysActivated($pluginName), 'info' => $oPlugin->getInformation());
     }
     $view = new Piwik_View('PluginsAdmin/templates/manage.tpl');
     $view->pluginsName = $plugins;
     echo $view->render();
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:14,代码来源:Controller.php

示例15: index

 public function index()
 {
     Piwik::checkUserIsNotAnonymous();
     $view = Piwik_View::factory('index');
     $this->setGeneralVariablesView($view);
     $view->currentUserEmail = Piwik::getCurrentUserEmail();
     $availableReports = Piwik_API_API::getInstance()->getReportMetadata($this->idSite);
     $reportsByCategory = array();
     foreach ($availableReports as $report) {
         $reportsByCategory[$report['category']][] = $report;
     }
     unset($reportsByCategory['API']);
     $reports = Piwik_PDFReports_API::getInstance()->getReports($this->idSite, $period = false, $idReport = false, $ifSuperUserReturnOnlySuperUserReports = true);
     $reportsById = array();
     foreach ($reports as &$report) {
         $report['additional_emails'] = str_replace(',', "\n", $report['additional_emails']);
         $report['reports'] = explode(',', str_replace('.', '_', $report['reports']));
         $reportsById[$report['idreport']] = $report;
     }
     $view->downloadOutputType = Piwik_PDFReports_API::OUTPUT_DOWNLOAD;
     $columnsCount = 2;
     $view->newColumnAfter = ceil(count($reportsByCategory) / $columnsCount);
     $view->reportsByCategory = $reportsByCategory;
     $view->reportsJSON = Piwik_Common::json_encode($reportsById);
     $view->periods = array_merge(array('never' => Piwik_Translate('General_Never')), Piwik_PDFReports_API::getPeriodToFrequency());
     $view->defaultFormat = Piwik_PDFReports::DEFAULT_FORMAT;
     $view->formats = Piwik_ReportRenderer::$availableReportRenderers;
     $view->aggregateReportsFormats = Piwik_PDFReports_API::getAggregateReportsFormats();
     $view->reports = $reports;
     $view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
     echo $view->render();
 }
开发者ID:neolf,项目名称:PIWIK4MOBILE,代码行数:32,代码来源:Controller.php


注:本文中的Piwik_View类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。