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


PHP JBrowser::getBrowser方法代码示例

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


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

示例1: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     /*
      * Check for evil IE
      * sry - no support for this in penguin land =;)
      */
     jimport('joomla.environment.browser');
     $browser = new JBrowser();
     if ($browser->getBrowser() == 'msie') {
         JFactory::getApplication()->enqueueMessage(jgettext('This extension is not compatible with MS internet explorer R'), 'warning');
     }
     //-- Check if we are on localhost - otherwise display a warning
     if (JComponentHelper::getParams('com_easycreator')->get('warn_livesite')) {
         $ip = getenv('REMOTE_ADDR');
         if ($ip && false == in_array($ip, array('127.0.0.1', '::1'))) {
             JFactory::getApplication()->enqueueMessage(jgettext('Please use this extension only in local development environments.'), 'warning');
             JFactory::getApplication()->enqueueMessage(sprintf(jgettext("See: <a href=\"%s\">docs.joomla.org/Setting up your workstation for Joomla! development</a>"), 'http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development'), 'warning');
             JFactory::getApplication()->enqueueMessage(jgettext('You may suppress this message in the configuration settings if you\'re shure'), 'warning');
         }
     }
     parent::display($tpl);
     EcrHtml::formEnd();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:30,代码来源:view.html.php

示例2: die

* @version $Id: mod_customquickicons.php 2008/10/01 17:10:10 mic $
* @version 2.1.0
* @package Custom QuickIcons
* @copyright (C) 2006/07/08 mic / http://www.joomx.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* based on the Joomla/Mambo mod_quickicon
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$language =& JFactory::getLanguage();
$language->load('mod_customquickicons');
// get browser (needed for accesskey tip)
global $isMoz;
jimport('joomla.environment.browser');
$browser = new JBrowser();
$isMoz = $browser->getBrowser() == 'mozilla';
if (!defined('_QUICKICON_MODULE')) {
    // ensure that functions are declared only once
    define('_QUICKICON_MODULE', 1);
    function MOD_quickiconButton($row, $parm)
    {
        global $live_site, $isMoz;
        ?>

	    <div style="float:left;<?php 
        echo $parm->style;
        ?>
">
	        <div class="<?php 
        echo $parm->css;
        ?>
开发者ID:rafarubert,项目名称:megafiltros,代码行数:31,代码来源:mod_customquickicons.php

示例3: getBrowser

 /**
  * Get current user Browser
  **/
 function getBrowser()
 {
     jimport('joomla.environment.browser');
     $browser = new JBrowser();
     $this->user_browser = $browser->getBrowser() . ' ' . $browser->getVersion();
     $this->user_agent = $browser->getAgentString();
     $this->user_platform = $browser->getPlatform();
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:11,代码来源:jyaml.helper.php

示例4: JBrowser

// No direct access.
defined('_JEXEC') or die;
$version = "v{$this->version}";
JHTML::_('behavior.mootools');
// Check if "System - Mootools Upgrade" is enabled
$mtupgrade = JPluginHelper::isEnabled('system', 'mtupgrade');
// get params
$params = $this->params;
// get document to add scripts
$document = JFactory::getDocument();
$document->addScript('components/com_jupgrade/js/functions.js');
$document->addScript('components/com_jupgrade/js/dwProgressBar.js');
// Checking for IE
jimport('joomla.environment.browser');
$browser = new JBrowser();
$version = $browser->getBrowser();
if ($version == 'msie') {
    $document->addScript('components/com_jupgrade/js/migrate.ie.js');
} else {
    $document->addScript('components/com_jupgrade/js/migrate.js');
}
$document->addStyleSheet("components/com_jupgrade/css/jupgrade.css");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Orbitron");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Puritan");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Tinos");
?>
<script type="text/javascript">

window.addEvent('domready', function() {

	$('checks').setStyle('display', 'none');
开发者ID:sangkasi,项目名称:joomla,代码行数:31,代码来源:default.php


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