本文整理匯總了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: