本文整理汇总了PHP中JBrowser::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP JBrowser::getVersion方法的具体用法?PHP JBrowser::getVersion怎么用?PHP JBrowser::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JBrowser
的用法示例。
在下文中一共展示了JBrowser::getVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例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: