本文整理汇总了PHP中JBrowser::isBrowser方法的典型用法代码示例。如果您正苦于以下问题:PHP JBrowser::isBrowser方法的具体用法?PHP JBrowser::isBrowser怎么用?PHP JBrowser::isBrowser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JBrowser
的用法示例。
在下文中一共展示了JBrowser::isBrowser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: JBrowser
if ($joomlaVersion->isCompatible('3')) {
JHtml::_('jquery.framework');
} else {
$document->addScript($jsPath . '/25/jquery.min.js');
}
}
if ($params->get('debug_mode', 0)) {
$browser = new JBrowser();
if ($browser->isBrowser('msie')) {
$document->addScript($jsPath . '/nomin/excanvas.js');
}
$document->addScript($jsPath . '/nomin/coolclock.js');
$document->addScript($jsPath . '/nomin/moreskins.js');
} else {
$browser = new JBrowser();
if ($browser->isBrowser('msie')) {
$document->addScript($jsPath . '/excanvas.min.js');
}
$document->addScript($jsPath . '/coolclock.min.js');
$document->addScript($jsPath . '/moreskins.min.js');
}
}
?>
<div class="datetime<?php
echo $params->get('class_sfx');
?>
" id="datetime_<?php
echo $module->id;
?>
">
示例2: JBrowser
/**
* @package Sibdiet.Administrator
* @subpackage com_sibdiet
* @checked 2020/01/01
* @copyright Copyright (C) 2012 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('jquery.framework');
$params = JComponentHelper::getParams('com_sibdiet');
$document = JFactory::getDocument();
// Load jqPlot
$document->addStyleSheet('components/com_sibdiet/assets/js/jqplot/jquery.jqplot.min.css');
$browser = new JBrowser();
if ($browser->isBrowser('msie') && $browser->getVersion() < 9) {
$document->addScript('components/com_sibdiet/assets/js/jqplot/excanvas.min.js');
}
$document->addScript('components/com_sibdiet/assets/js/jqplot/jquery.jqplot.min.js');
$document->addScript('components/com_sibdiet/assets/js/jqplot/jqplot.pieRenderer.min.js');
// Import CSS
$document->addStyleSheet('components/com_sibdiet/assets/css/sibdiet.css');
// Get feautered nutrients
$db = JFactory::getDbo();
$query = $db->getQuery(true)->select('n.id, n.title')->from('#__sibdiet_nutrients n')->where('n.featured = 1')->order('n.ordering, n.title');
$db->setQuery($query);
$fNutrients = $db->loadObjectList();
// get Standard Composition
$age = SibdietHelper::age($this->item->profile->birthday)->ym;
switch (true) {
case $age < 0.07000000000000001: