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


PHP Piwik::getJavascriptCode方法代码示例

本文整理汇总了PHP中Piwik::getJavascriptCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::getJavascriptCode方法的具体用法?PHP Piwik::getJavascriptCode怎么用?PHP Piwik::getJavascriptCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik的用法示例。


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

示例1: 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

示例2: displayJavascriptCode

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

示例3: getJavascriptTag

 /**
  * Returns the javascript tag for the given idSite.
  * This tag must be included on every page to be tracked by Piwik
  *
  * @param int $idSite
  * @param string $customTitle Custom title given to the pageview
  * @return string The Javascript tag ready to be included on the HTML pages
  */
 public function getJavascriptTag($idSite, $piwikUrl = '')
 {
     Piwik::checkUserHasViewAccess($idSite);
     if (empty($piwikUrl)) {
         $piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName();
     }
     $piwikUrl = Piwik_Common::sanitizeInputValues($piwikUrl);
     $htmlEncoded = Piwik::getJavascriptCode($idSite, $piwikUrl);
     $htmlEncoded = str_replace(array('<br>', '<br />', '<br/>'), '', $htmlEncoded);
     return $htmlEncoded;
 }
开发者ID:0h546f6f78696342756e4e59,项目名称:piwik,代码行数:19,代码来源:API.php

示例4: getJavascriptTag

 /**
  * Returns the javascript tag for the given idSite.
  * This tag must be included on every page to be tracked by Piwik
  *
  * @param int $idSite
  * @return string The Javascript tag ready to be included on the HTML pages
  */
 public static function getJavascriptTag($idSite, $piwikUrl = '', $actionName = '')
 {
     Piwik::checkUserHasViewAccess($idSite);
     $actionName = "'" . addslashes(Piwik_Common::sanitizeInputValues($actionName)) . "'";
     if (empty($piwikUrl)) {
         $piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName();
     }
     $piwikUrl = addslashes(Piwik_Common::sanitizeInputValues($piwikUrl));
     $htmlEncoded = Piwik::getJavascriptCode($idSite, $piwikUrl, $actionName);
     $htmlEncoded = str_replace(array('<br>', '<br />', '<br/>'), '', $htmlEncoded);
     return html_entity_decode($htmlEncoded);
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:API.php

示例5: displayJavascriptCode

 /**
  * Displays the admin UI page showing all tracking tags
  * @return unknown_type
  */
 function displayJavascriptCode()
 {
     $idSite = Piwik_Common::getRequestVar('idSite');
     Piwik::checkUserHasViewAccess($idSite);
     $jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
     $view = Piwik_View::factory('Tracking');
     $this->setBasicVariablesView($view);
     $view->menu = Piwik_GetAdminMenu();
     $view->idSite = $idSite;
     $site = new Piwik_Site($idSite);
     $view->displaySiteName = $site->getName();
     $view->jsTag = $jsTag;
     echo $view->render();
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:18,代码来源:Controller.php

示例6: displayJavascriptCode

	/**
	 * Installation Step 8: Display JavaScript tracking code
	 */
	public function displayJavascriptCode()
	{
		$this->checkPreviousStepIsValid( __FUNCTION__ );

		$view = new Piwik_Installation_View(
						$this->pathView . 'displayJavascriptCode.tpl',
						$this->getInstallationSteps(),
						__FUNCTION__
					);
		$this->skipThisStep( __FUNCTION__ );

		if( !isset($this->session->firstWebsiteSetupSuccessMessage))
		{
			$view->displayfirstWebsiteSetupSuccess = true;
			$this->session->firstWebsiteSetupSuccessMessage = true;
		}
		$siteName = $this->session->site_name;
		$idSite = $this->session->site_idSite;

		// Load the Tracking code and help text from the SitesManager 
		$viewTrackingHelp = new Piwik_View('SitesManager/templates/DisplayJavascriptCode.tpl');
		$viewTrackingHelp->displaySiteName = $siteName;
		$viewTrackingHelp->jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
		$viewTrackingHelp->idSite = $idSite;

		// Assign the html output to a smarty variable
		$view->trackingHelp = $viewTrackingHelp->render();
		$view->displaySiteName = urldecode($siteName);
		
		$view->showNextStep = true;

		$this->session->currentStepDone = __FUNCTION__;
		echo $view->render();
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:37,代码来源:Controller.php


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