本文整理匯總了PHP中VmConfig::getInstalledVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP VmConfig::getInstalledVersion方法的具體用法?PHP VmConfig::getInstalledVersion怎麽用?PHP VmConfig::getInstalledVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類VmConfig
的用法示例。
在下文中一共展示了VmConfig::getInstalledVersion方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
function __construct()
{
parent::__construct();
// Load the database and execute our sql file
$this->db = JFactory::getDBO();
// Get information of our plugin so we can pass it on to MDS Collivery for Logs
$sel_query = "SELECT * FROM `#__extensions` where type = 'plugin' and element = 'mds_shipping' and folder = 'vmshipment';";
$this->db->setQuery($sel_query);
$this->db->query();
$this->extension_id = $this->db->loadObjectList()[0]->extension_id;
$this->app_name = $this->db->loadObjectList()[0]->extension_id;
$this->app_info = json_decode($this->db->loadObjectList()[0]->manifest_cache);
// Get our login information
$config_query = "SELECT * FROM `#__mds_collivery_config` where id = 1;";
$this->db->setQuery($config_query);
$this->db->query();
$this->password = $this->db->loadObjectList()[0]->password;
$this->username = $this->db->loadObjectList()[0]->username;
$this->risk_cover = $this->db->loadObjectList()[0]->risk_cover;
$version = new JVersion();
require_once preg_replace('|com_installer|i', "", JPATH_COMPONENT_ADMINISTRATOR) . '/helpers/config.php';
$config = array('app_name' => $this->app_info->name, 'app_version' => $this->app_info->version, 'app_host' => "Joomla: " . $version->getShortVersion() . ' - Virtuemart: ' . VmConfig::getInstalledVersion(), 'app_url' => JURI::base(), 'user_email' => $this->username, 'user_password' => $this->password);
// Use the MDS API Files
require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Cache.php';
require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Collivery.php';
$this->collivery = new Mds\Collivery($config);
// Get some information from the API
$this->towns = $this->collivery->getTowns();
$this->services = $this->collivery->getServices();
$this->location_types = $this->collivery->getLocationTypes();
$this->suburbs = $this->collivery->getSuburbs(null);
}
示例2: getLatestVersion
/**
* Checks the VirtueMart Server for the latest available Version of VirtueMart
*
* @return string Example: 1.1.2
*/
function getLatestVersion()
{
if (!class_exists('VmConnector')) {
require VMPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'connection.php';
}
$url = "http://virtuemart.net/index2.php?option=com_versions&catid=1&myVersion={" . VmConfig::getInstalledVersion() . "}&task=latestversionastext";
$result = VmConnector::handleCommunication($url);
return $result;
}
示例3: __construct
public function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$varsToPush = array('downloadable_media_id' => array(0, 'int'), 'downloadable_order_states' => array(array('C', 'S'), 'char'), 'downloadable_expires_quantity' => array(0, 'int'), 'downloadable_expires_period' => array('years', 'string'));
$this->is_VM3 = (double) substr(VmConfig::getInstalledVersion(), 0, 3) > 2.6;
$this->setConfigParameterable($this->is_VM3 ? 'customfield_params' : 'custom_params', $varsToPush);
if ($this->params->get('show_in_cart_attrs', 1)) {
JFactory::getDocument()->addScriptDeclaration("\r\n\t\t\t\twindow.addEvent('domready', function(){\r\n\t\t\t\t\tjQuery('.vmshipment_downloadable_delivery_div').parent().parent().clone().css('margin-top', '10px').appendTo('.spacer-buy-area');\r\n\t\t\t\t});\r\n\t\t\t");
}
$this->is_VM3 = (double) substr(VmConfig::getInstalledVersion(), 0, 3) > 2.6;
}
示例4: __construct
public function __construct()
{
parent::__construct();
// Insert our standard javascript and css into the head
$document = JFactory::getDocument();
// Jquery validation
$document->addStyleSheet(JURI::base() . "components/com_virtuemart/views/mds/tmpl/css/screen.css");
$document->addScript(JURI::base() . "components/com_virtuemart/views/mds/tmpl/js/jquery.validate.min.js");
// Date Time Picker
$document->addStyleSheet(JURI::base() . "components/com_virtuemart/views/mds/tmpl/datetimepicker-master/jquery.datetimepicker.css");
$document->addScript(JURI::base() . "components/com_virtuemart/views/mds/tmpl/datetimepicker-master/jquery.datetimepicker.js");
// Our custom js and css
$document->addScript(JURI::base() . "components/com_virtuemart/views/mds/tmpl/js/mds_collivery.js");
$document->addStyleSheet(JURI::base() . "components/com_virtuemart/views/mds/tmpl/css/mds_collivery.css");
// Our base url
$document->addScriptDeclaration('base_url = "' . JURI::base() . '";');
// Load the database and execute our sql file
$this->db = JFactory::getDBO();
// Get information of our plugin so we can pass it on to MDS Collivery for Logs
$sel_query = "SELECT * FROM `#__extensions` where type = 'plugin' and element = 'mds_shipping' and folder = 'vmshipment';";
$this->db->setQuery($sel_query);
$this->db->query();
$this->extension_id = $this->db->loadObjectList()[0]->extension_id;
$this->app_name = $this->db->loadObjectList()[0]->extension_id;
$this->app_info = json_decode($this->db->loadObjectList()[0]->manifest_cache);
// Get our login information
$config_query = "SELECT * FROM `#__mds_collivery_config` where id = 1;";
$this->db->setQuery($config_query);
$this->db->query();
$this->password = $this->db->loadObjectList()[0]->password;
$this->username = $this->db->loadObjectList()[0]->username;
$this->risk_cover = $this->db->loadObjectList()[0]->risk_cover;
$version = new JVersion();
require_once preg_replace('|com_installer|i', "", JPATH_COMPONENT_ADMINISTRATOR) . '/helpers/config.php';
$this->vm_version = VmConfig::getInstalledVersion();
$config = array('app_name' => $this->app_info->name, 'app_version' => $this->app_info->version, 'app_host' => "Joomla: " . $version->getShortVersion() . ' - Virtuemart: ' . VmConfig::getInstalledVersion(), 'app_url' => JURI::base(), 'user_email' => $this->username, 'user_password' => $this->password);
// Use the MDS API Files
require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Cache.php';
require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Collivery.php';
$this->collivery = new Mds\Collivery($config);
// Get some information from the API
$this->towns = $this->collivery->getTowns();
$this->services = $this->collivery->getServices();
$this->location_types = $this->collivery->getLocationTypes();
$this->addresses = $this->collivery->getAddresses();
$this->default_address_id = $this->collivery->getDefaultAddressId();
$this->default_contacts = $this->collivery->getContacts($this->default_address_id);
$this->mds_services = $this->collivery->getServices();
// Class for converting lengths and weights
require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/UnitConvertor.php';
$this->converter = new UnitConvertor();
}
示例5: __construct
/**
* Constructor
*
* @param JDispatcher $subject The object to observe
* @param Array $config An array that holds the plugin configuration
*/
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->_tablepkey = 'id';
$this->_tableId = 'id';
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = $this->getVarsToPush();
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
// Load the database and execute our sql file
$this->db = JFactory::getDBO();
// Get information of our plugin so we can pass it on to MDS Collivery for Logs
$sel_query = "SELECT * FROM `#__extensions` where type = 'plugin' and element = 'mds_shipping' and folder = 'vmshipment';";
$this->db->setQuery($sel_query);
$this->db->query();
$this->extension_id = $this->db->loadObjectList()[0]->extension_id;
$this->app_name = $this->db->loadObjectList()[0]->extension_id;
$this->app_info = json_decode($this->db->loadObjectList()[0]->manifest_cache);
// Get our config
$sel_query = "SELECT * FROM `#__mds_collivery_config` where id=1;";
$this->db->setQuery($sel_query);
$this->db->query();
$this->password = $this->db->loadObjectList()[0]->password;
$this->username = $this->db->loadObjectList()[0]->username;
$this->risk_cover = $this->db->loadObjectList()[0]->risk_cover;
$version = new JVersion();
require_once preg_replace('|com_installer|i', "", JPATH_COMPONENT_ADMINISTRATOR) . '/helpers/config.php';
$config = array('app_name' => $this->app_info->name, 'app_version' => $this->app_info->version, 'app_host' => 'Joomla: ' . $version->getShortVersion() . ' - Virtuemart: ' . VmConfig::getInstalledVersion(), 'app_url' => JURI::base(), 'user_email' => $this->username, 'user_password' => $this->password);
// Use the MDS API Files
require_once 'Mds/Cache.php';
require_once 'Mds/Collivery.php';
$this->collivery = new Mds\Collivery($config);
// Get some information from the API
// Class for converting lengths and weights
require_once 'UnitConvertor.php';
$this->converter = new UnitConvertor();
}
示例6: plgVmConfirmedOrder
//.........這裏部分代碼省略.........
$toCheck = array('last_name', 'first_name', 'middle_name', 'phone_1', 'phone_2', 'fax', 'address_1', 'address_2', 'city', 'virtuemart_state_id', 'virtuemart_country_id', 'zip');
$bsError = false;
foreach ($toCheck as $val) {
if (isset($order['details']['ST']->{$val})) {
if ($order['details']['ST']->{$val} != $order['details']['BT']->{$val}) {
$bsError = true;
$errorVal = $val;
break;
}
}
}
if ($bsError) {
$msg = vmText::_('VMPAYMENT_HEIDELPAY_TECHNICAL_ERROR') . "<br />" . vmText::_('VMPAYMENT_HEIDELPAY_BILLSAFE_ERROR') . "<br />";
$app = JFactory::getApplication();
$app->redirect('index.php?option=com_virtuemart&view=cart', $msg);
}
$params['PAYMENT.CODE'] = "IV.PA";
$params['ACCOUNT.BRAND'] = "BILLSAFE";
$params = array_merge($params, $this->getBasketDetails());
}
/*
* User account information
*/
$params['ACCOUNT.HOLDER'] = $address->first_name . " " . $address->last_name;
$params['NAME.GIVEN'] = $address->first_name;
$params['NAME.FAMILY'] = $address->last_name;
if (!empty($address->company)) {
$params['NAME.COMPANY'] = $address->company;
}
$params['ADDRESS.STREET'] = $address->address_1;
isset($address->address_2) ? $params['ADDRESS.STREET'] .= " " . $address->address_2 : '';
$params['ADDRESS.ZIP'] = $address->zip;
$params['ADDRESS.CITY'] = $address->city;
$params['ADDRESS.COUNTRY'] = ShopFunctions::getCountryByID($address->virtuemart_country_id, 'country_2_code');
$params['CONTACT.EMAIL'] = $order['details']['BT']->email;
$params['CONTACT.IP'] = $_SERVER['REMOTE_ADDR'];
/*
* Add debug informations for merchiant support
*/
$params['SHOP.TYPE'] = 'VirtueMart ' . VmConfig::getInstalledVersion();
$params['SHOPMODULE.VERSION'] = $this->version;
$params['CRITERION.PAYMENT_NAME'] = vmText::_('VMPAYMENT_HEIDELPAY_' . $method->HEIDELPAY_PAYMENT_TYPE);
$params['CRITERION.PAYMENT_NAME'] = strip_tags($params['CRITERION.PAYMENT_NAME']);
/*
* Create hash to secure the response
*/
$params['CRITERION.SECRET'] = $this->createSecretHash($order['details']['BT']->order_number, $method->HEIDELPAY_SECRET);
/*
* Set transaction mode
*/
if ($method->HEIDELPAY_TRANSACTION_MODE == 2) {
$params['TRANSACTION.MODE'] = "LIVE";
} elseif ($method->HEIDELPAY_TRANSACTION_MODE == 0) {
$params['TRANSACTION.MODE'] = "INTEGRATOR_TEST";
} else {
$params['TRANSACTION.MODE'] = "CONNECTOR_TEST";
}
/*
* Add response and css path
*/
$params['FRONTEND.RESPONSE_URL'] = JROUTE::_(JURI::root(), $xhtml = true, $ssl = 0) . 'plugins/vmpayment/heidelpay/heidelpay/heidelpay_response.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . urlencode($order['details']['BT']->order_number) . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id;
$cssFile = "heidelpay_default.css";
if (!empty($method->HEIDELPAY_STYLE)) {
$cssFile = $method->HEIDELPAY_STYLE;
}
$params['FRONTEND.CSS_PATH'] = JROUTE::_(JURI::root(), $xhtml = true, $ssl = 0) . 'plugins/vmpayment/heidelpay/heidelpay/' . $cssFile;
$requestUrl = $method->HEIDELPAY_PAYMENT_URL;
$params['SECURITY.SENDER'] = $method->HEIDELPAY_SECURITY_SENDER;
$params['USER.LOGIN'] = $method->HEIDELPAY_USER_LOGIN;
$params['USER.PWD'] = $method->HEIDELPAY_USER_PW;
if (substr($method->HEIDELPAY_PAYMENT_TYPE, 0, 2) == 'DD') {
$sepaform = array();
$sepaform = $this->switchDirectDebitFrom($method->HEIDELPAY_SEPA_FORM);
$params = array_merge($sepaform, $params);
}
/*
* send request to payment server
*/
$response = $this->doRequest($requestUrl, $params, $method->HEIDELPAY_DEBUG);
if ($params['TRANSACTION.MODE'] != "LIVE") {
vmInfo('VMPAYMENT_HEIDELPAY_PAYMENT_TESTMODE');
}
/*
* On success show iframe or show error information for your customer
*/
$returnValue = 0;
if ($response['PROCESSING_RESULT'] == "ACK" || $response['POST_VALIDATION'] == "ACK") {
$returnValue = 2;
$html = $this->renderByLayout('displaypayment', array('response' => $response['FRONTEND_REDIRECT_URL']));
} else {
$html = vmText::_('VMPAYMENT_HEIDELPAY_TECHNICAL_ERROR') . " <br /> - " . addslashes($response['PROCESSING_RETURN']) . "<br />" . vmText::_('VMPAYMENT_HEIDELPAY_CONTACT_SHOPOWNER');
}
/*
* Show debug information
*/
if ($method->HEIDELPAY_DEBUG == 1) {
vmDebug('HEIDELPAY plgVmConfirmedOrder', $params);
}
return $this->processConfirmedOrderPaymentResponse($returnValue, $cart, $order, $html, '', '');
}
示例7:
} else {
?>
<a href="<?php
echo $checkLatestVerisonLink;
?>
">
[<?php
echo JText::_('COM_VIRTUEMART_UPDATE_CHECK_CHECKNOW');
?>
]</a>
<?php
}
?>
<?php
if ($this->latestVersion) {
if (version_compare($this->latestVersion, VmConfig::getInstalledVersion(), '>') == 1) {
?>
<input name="downloadbutton" id="downloadbutton" type="submit" value="<?php
echo JText::_('COM_VIRTUEMART_UPDATE_CHECK_DLUPDATE');
?>
" style="<?php
echo $downloadbutton_style;
?>
font-weight:bold;" />
<?php
} else {
// need something in the lanuage file here
echo ' ' . JText::_('COM_VIRTUEMART_UPDATE_NONEWVERSION');
}
}
?>
示例8: startAdminArea
//.........這裏部分代碼省略.........
}
if (vRequest::getCmd('manage', false)) {
self::$backEnd = false;
}
if (self::$vmAdminAreaStarted) {
return;
}
self::$vmAdminAreaStarted = true;
$admin = 'administrator/components/com_virtuemart/assets/css';
//loading defaut admin CSS
vmJsApi::css('admin_ui', $admin);
vmJsApi::css('admin.styles', $admin);
vmJsApi::css('toolbar_images', $admin);
vmJsApi::css('menu_images', $admin);
vmJsApi::css('vtip');
$view = vRequest::getCmd('view', 'virtuemart');
$modalJs = '';
if ($view != 'virtuemart') {
vmJsApi::css('chosen');
vmJsApi::css('jquery.fancybox-1.3.4');
vmJsApi::css('ui/jquery.ui.all');
$modalJs = "\$('.modal').fancybox();";
}
if ($view != 'virtuemart') {
vmJsApi::addJScript('fancybox/jquery.mousewheel-3.0.4.pack', false, false);
vmJsApi::addJScript('fancybox/jquery.easing-1.3.pack', false, false);
vmJsApi::addJScript('fancybox/jquery.fancybox-1.3.4.pack', false, false);
VmJsApi::chosenDropDowns();
}
vmJsApi::addJScript('/administrator/components/com_virtuemart/assets/js/jquery.coookie.js');
vmJsApi::addJScript('/administrator/components/com_virtuemart/assets/js/vm2admin.js');
//vmJsApi::addJScript ('vm.accordeon',"",true);
$vm2string = "editImage: 'edit image',select_all_text: '" . vmText::_('COM_VIRTUEMART_DRDOWN_SELALL') . "',select_some_options_text: '" . vmText::_($selectText) . "'";
vmJsApi::addJScript('vm.remindTab', "\r\r\n\t\tvar tip_image='" . JURI::root(true) . "/components/com_virtuemart/assets/js/images/vtip_arrow.png';\r\r\n\t\tvar vm2string ={" . $vm2string . "} ;\r\r\n\t\tjQuery( function(\$) {\r\r\n\r\r\n\t\t\tjQuery('dl#system-message').hide().slideDown(400);\r\r\n\t\t\tjQuery('.virtuemart-admin-area .toggler').vm2admin('toggle');\r\r\n\t\t\tjQuery('#admin-ui-menu').vm2admin('accordeon');\r\r\n\t\t\tif ( \$('#admin-ui-tabs').length ) {\r\r\n\t\t\t\t\$('#admin-ui-tabs').vm2admin('tabs',virtuemartcookie);\r\r\n\t\t\t}\r\r\n\t\t\t\$('#content-box [title]').vm2admin('tips',tip_image);\r\r\n\t\t\t" . $modalJs . "\r\r\n\t\t\t\$('.reset-value').click( function(e){\r\r\n\t\t\t\te.preventDefault();\r\r\n\t\t\t\tnone = '';\r\r\n\t\t\t\tjQuery(this).parent().find('.ui-autocomplete-input').val(none);\r\r\n\t\t\t});\r\r\n\t\t});\t");
?>
<!--[if lt IE 9]>
<script src="//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<?php
if (!self::$backEnd) {
//JToolBarHelper
$bar = JToolbar::getInstance('toolbar');
?>
<div class="toolbar-box" style="height: 84px;position: relative;"><?php
echo $bar->render();
?>
</div>
<?php
}
?>
<?php
$hideMenu = JFactory::getApplication()->input->cookie->getString('vmmenu', 'show') === 'hide' ? ' menu-collapsed' : '';
?>
<div class="virtuemart-admin-area<?php
echo $hideMenu;
?>
">
<div class="toggler vmicon-show<?php
echo $hideMenu;
?>
"></div>
<div class="menu-wrapper<?php
echo $hideMenu;
?>
" id="menu-wrapper">
<?php
if (!empty($vmView->langList)) {
?>
<div class="vm-lang-list-container">
<?php
echo $vmView->langList;
?>
</div>
<?php
} else {
?>
<a href="index.php?option=com_virtuemart&view=virtuemart" ><img src="<?php
echo JURI::root(true) . '/administrator/components/com_virtuemart/assets/images/vm_menulogo.png';
?>
"></a>
<?php
}
AdminUIHelper::showAdminMenu($vmView);
?>
<div class="vm-installed-version">
VirtueMart <?php
echo VmConfig::getInstalledVersion();
?>
</div>
</div>
<div id="admin-content" class="admin-content">
<?php
}
示例9: startAdminArea
/**
* Start the administrator area table
*
* The entire administrator area with contained in a table which include the admin ribbon menu
* in the left column and the content in the right column. This function sets up the table and
* displayes the admin menu in the left column.
*/
static function startAdminArea($vmView, $selectText = 'COM_VIRTUEMART_DRDOWN_AVA2ALL')
{
if (JRequest::getWord('format') == 'pdf') {
return;
}
if (JRequest::getWord('tmpl') == 'component') {
self::$backEnd = false;
}
if (self::$vmAdminAreaStarted) {
return;
}
self::$vmAdminAreaStarted = true;
$front = JURI::root(true) . '/components/com_virtuemart/assets/';
$admin = JURI::root(true) . '/administrator/components/com_virtuemart/assets/';
$document = JFactory::getDocument();
//loading defaut admin CSS
$document->addStyleSheet($admin . 'css/admin_ui.css');
//$document->addStyleSheet($admin.'css/admin_menu.css');
$document->addStyleSheet($admin . 'css/admin.styles.css');
$document->addStyleSheet($admin . 'css/toolbar_images.css');
$document->addStyleSheet($admin . 'css/menu_images.css');
$document->addStyleSheet($front . 'css/chosen.css');
$document->addStyleSheet($front . 'css/vtip.css');
$document->addStyleSheet($front . 'css/jquery.fancybox-1.3.4.css');
$document->addStyleSheet($front . 'css/ui/jquery.ui.all.css');
//$document->addStyleSheet($admin.'css/jqtransform.css');
//loading defaut script
$document->addScript($front . 'js/fancybox/jquery.mousewheel-3.0.4.pack.js');
$document->addScript($front . 'js/fancybox/jquery.easing-1.3.pack.js');
$document->addScript($front . 'js/fancybox/jquery.fancybox-1.3.4.pack.js');
$document->addScript($admin . 'js/jquery.coookie.js');
$document->addScript($front . 'js/chosen.jquery.min.js');
$document->addScript($admin . 'js/vm2admin.js');
$vm2string = "editImage: 'edit image',select_all_text: '" . JText::_('COM_VIRTUEMART_DRDOWN_SELALL') . "',select_some_options_text: '" . JText::_($selectText) . "'";
$document->addScriptDeclaration("\n//<![CDATA[\n\t\tvar tip_image='" . JURI::root(true) . "/components/com_virtuemart/assets/js/images/vtip_arrow.png';\n\t\tvar vm2string ={" . $vm2string . "} ;\n\t\t jQuery( function(\$) {\n\n\t\t\t\$('dl#system-message').hide().slideDown(400);\n\t\t\t\$('.virtuemart-admin-area .toggler').vm2admin('toggle');\n\t\t\t\$('#admin-ui-menu').vm2admin('accordeon');\n\t\t\tif ( \$('#admin-ui-tabs').length ) {\n\n\t\t\t\t\$('#admin-ui-tabs').vm2admin('tabs',virtuemartcookie).find('select').chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text}); \n\t\t\t}\n\n\t\t\t\$('#content-box [title]').vm2admin('tips',tip_image);\n\t\t\t\$('.modal').fancybox();\n\t\t\t\$('.reset-value').click( function(e){\n\t\t\t\te.preventDefault();\n\t\t\t\tnone = '';\n\t\t\t\tjQuery(this).parent().find('.ui-autocomplete-input').val(none);\n\t\t\t\t\n\t\t\t});\n\n\t\t});\n//]]>\n\t\t");
?>
<?php
if (!self::$backEnd) {
echo '<div class="toolbar" style="height: 84px;position: relative;">' . vmView::getToolbar($vmView) . '</div>';
}
?>
<div class="virtuemart-admin-area">
<?php
// Include ALU System
if (self::$backEnd) {
?>
<div class="menu-wrapper">
<a href="index.php?option=com_virtuemart&view=virtuemart" ><div class="menu-vmlogo"></div></a>
<?php
AdminUIHelper::showAdminMenu();
?>
<div class="menu-notice">
<?php
echo "VirtueMart " . VmConfig::getInstalledVersion();
?>
</div>
</div>
<?php
}
?>
<div id="admin-content-wrapper">
<div class="toggler vmicon-show"></div>
<div id="admin-content" class="admin-content">
<?php
}
示例10: startAdminArea
/**
* Start the administrator area table
*
* The entire administrator area with contained in a table which include the admin ribbon menu
* in the left column and the content in the right column. This function sets up the table and
* displayes the admin menu in the left column.
*/
static function startAdminArea($backEnd = true)
{
if (JRequest::getWord('format') == 'pdf') {
return;
}
if (JRequest::getWord('tmpl') == 'component') {
self::$backEnd = false;
include 'front/edit.html.php';
}
if (self::$vmAdminAreaStarted) {
return;
}
self::$vmAdminAreaStarted = true;
$front = JURI::root(true) . '/components/com_virtuemart/assets/';
$admin = JURI::root(true) . '/administrator/components/com_virtuemart/assets/';
$document = JFactory::getDocument();
//loading defaut admin CSS
// $document->addStyleSheet($admin.'css/admin_ui.css');
// $document->addStyleSheet($admin.'css/admin_menu.css');
JHtml::_('bootstrap.framework');
if (JVM_VERSION === 2 || self::$backEnd === false) {
$document->addStyleSheet($front . 'css/ui/bootstrap.min.css');
// JHtml::_('bootstrap.loadCss') ;
JHtml::_('bootstrap.tooltip');
if (JVM_VERSION === 2) {
$document->addScript($admin . 'js/j25fixes.js');
}
$document->setMetadata('viewport', 'width=device-width, initial-scale=1.0');
JHtml::_('behavior.framework');
}
$document->addStyleSheet($admin . 'css/admin.styles.css');
$document->addStyleSheet($admin . 'css/toolbar_images.css');
$document->addStyleSheet($admin . 'css/menu_images.css');
$document->addStyleSheet($admin . 'css/fileinput.css');
// $document->addStyleSheet($front.'css/chosen.css');
// $document->addStyleSheet($front.'css/vtip.css');
$document->addStyleSheet($front . 'css/jquery.fancybox-1.3.4.css');
//$document->addStyleSheet($admin.'css/jqtransform.css');
//loading defaut script
JHtml::_('behavior.framework');
// JHtml::_('bootstrap.tooltip');
$document->addScript($front . 'js/fancybox/jquery.mousewheel-3.0.4.pack.js');
$document->addScript($front . 'js/fancybox/jquery.easing-1.3.pack.js');
$document->addScript($front . 'js/fancybox/jquery.fancybox-1.3.4.pack.js');
$document->addScript($admin . 'js/jquery.coookie.js');
// $document->addScript($front.'js/chosen.jquery.min.js');
JHtml::_('formbehavior.chosen', 'select');
$document->addScript($admin . 'js/vm2admin.js');
$document->addScript($admin . 'js/fileinput.js');
//$document->addScript($admin.'js/jquery.jqtransform.js');
if (JText::_('COM_VIRTUEMART_JS_STRINGS') == 'COM_VIRTUEMART_JS_STRINGS') {
$vm2string = "editImage: 'edit image',select_all_text: 'select all options',select_some_options_text: 'select some options'";
} else {
$vm2string = JText::_('COM_VIRTUEMART_JS_STRINGS');
}
//prevent joomlaJtext bug.
JText::script('JGLOBAL_SELECT_SOME_OPTIONS');
// old type image var tip_image='".JURI::root(true)."/components/com_virtuemart/assets/js/images/vtip_arrow.png';
// fix for jsonRequest in front admin
$baseUrlCurrent = self::$backEnd === false ? '/' : '/administrator/';
$document->addScriptDeclaration("\n//<![CDATA[\n\t\tvar vmBaseUrl = '" . JURI::root(true) . $baseUrlCurrent . "';\n\t\tvar vm2string ={" . $vm2string . "} ;\n\t\t jQuery( function(\$) {\n\n\t\t\t\$('dl#system-message').hide().slideDown(400);\n\t\t\t\$('.virtuemart-admin-area .toggler').vm2admin('toggle');\n\t\t\t\$('#admin-ui-menu').vm2admin('accordeon');\n\t\t\t// if ( \$('#adminForm > ul').length ) {\n\t\t\t\t// \$('#adminForm > ul').vm2admin('tabs',virtuemartcookie);\n\t\t\t\t//.find('select').chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text}); \n\t\t\t// }\n\n\t\t\t// TIPS IS now from bootstrap \$('#content-box [title]').vm2admin('tips',tip_image);\n\t\t\tjQuery('.hasTip').tooltip({});\n\n\t\t\t\$('.fb-modal-toggle,.modalbox').fancybox();\n\t\t\t// \$('.modal').modal();\n\t\t\t\$('.reset-value').click( function(e){\n\t\t\t\te.preventDefault();\n\t\t\t\tnone = '';\n\t\t\t\tjQuery(this).parent().find('.ui-autocomplete-input').val(none);\n\t\t\t\t\n\t\t\t});\n\n\t\t});\n//]]>\n\t\t");
?>
<?php
// Include ALU System
if (self::$backEnd) {
require_once JPATH_VM_ADMINISTRATOR . DS . 'liveupdate' . DS . 'liveupdate.php';
?>
<div class="vm2admin">
<div class="row-fluid">
<div class="span12">
<div class="btn btn-large btn-inverse" id="sidebar-toggle"><i class="icon-chevron-left"></i></div>
<div class="span3 j-sidebar-container" id="j-sidebar-container">
<div class="well well-small"><a href="index.php?option=com_virtuemart&view=virtuemart" ><div class="menu-vmlogo"></div></a></div>
<?php
AdminUIHelper::showAdminMenu();
if ($admin = JFactory::getUser()->authorise('core.admin')) {
?>
<div class="menu-notice hidden-phone">
<?php
echo LiveUpdate::getIcon(array(), 'notice');
?>
<?php
echo VmConfig::getInstalledVersion();
?>
</div>
<?php
}
?>
</div>
<?php
//.........這裏部分代碼省略.........
示例11: checkVMVersion
public static function checkVMVersion($comparedVersion = '2.9.8')
{
if (!class_exists('VmConfig')) {
$vmConfigPath = JPATH_ROOT . '/administrator/components/com_virtuemart/helpers/config.php';
if (file_exists($vmConfigPath)) {
require_once $vmConfigPath;
} else {
return false;
}
}
$installedVersion = VmConfig::getInstalledVersion();
if (version_compare($installedVersion, $comparedVersion, '>=')) {
return true;
}
return false;
}