本文整理汇总了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();
}
示例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;
?>
示例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();
}
示例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');