Author Topic: Two Slimbox-es  (Read 1179 times)

Vlada_bgd

  • Jr. Member
  • **
  • Posts: 64
Two Slimbox-es
« on: May 23, 2011, 01:50:54 am »
I have installed slimbox 2,04 in my template, because I needed slimbox in my contact page, but now when I click product image two slimboxes opens. How to make VM check for slimbox and disable "older" version.
Slimbox 2,04 uses jquery instead mootools.
This is working template
Code: [Select]
http://www.radan.rs/sajt2/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=737&category_id=17&option=com_virtuemart&Itemid=59

Vlada_bgd

  • Jr. Member
  • **
  • Posts: 64
[RESOLVED] Two Slimbox-es
« Reply #1 on: May 23, 2011, 17:31:44 pm »
Resolved:
Replaced in administrator/components/com_virtuemart/classes/htmlTools.class.php
Code: [Select]
function loadSlimBox() {
global $mosConfig_live_site, $vm_mainframe;
if( !defined( '_SLIMBOX_LOADED' )) {

vmCommonHTML::loadMooTools();

// added by JK for loading mootoools 1.2 if configured in Joomla
 $jversion = new JVersion();
 if ($jversion->RELEASE == '1.5' && $jversion->DEV_LEVEL >= 19 && JPluginHelper::isEnabled( 'system', 'mtupgrade' ) ) {
 $vm_mainframe->addScriptDeclaration( 'var slimboxurl = \''.$mosConfig_live_site.'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/\';');
 $vm_mainframe->addScript( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/js/slimbox.js' );
 $vm_mainframe->addStyleSheet( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/css/slimbox.css' );
 } else {
 $vm_mainframe->addScriptDeclaration( 'var slimboxurl = \''.$mosConfig_live_site.'/components/'. VM_COMPONENT_NAME .'/js/slimbox/\';');
 $vm_mainframe->addScript( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox/js/slimbox.js' );
 $vm_mainframe->addStyleSheet( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox/css/slimbox.css' );
 }
// added by JK for loading mootoools 1.2 if configured in Joomla ends
define ( '_SLIMBOX_LOADED', '1' );
}
}
with code:
Code: [Select]
function loadSlimBox( ) {
global $mosConfig_live_site, $vm_mainframe;
if( !defined( '_SLIMBOX_LOADED' )) {

vmCommonHTML::loadMooTools();

// added by JK for loading mootoools 1.2 if configured in Joomla
// $jversion = new JVersion();
// if ($jversion->RELEASE == '1.5' && $jversion->DEV_LEVEL >= 19 && JPluginHelper::isEnabled( 'system', 'mtupgrade' ) ) {
// $vm_mainframe->addScriptDeclaration( 'var slimboxurl = \''.$mosConfig_live_site.'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/\';');
// $vm_mainframe->addScript( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/js/slimbox.js' );
// $vm_mainframe->addStyleSheet( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox-1.71a/css/slimbox.css' );
// } else {
// $vm_mainframe->addScriptDeclaration( 'var slimboxurl = \''.$mosConfig_live_site.'/components/'. VM_COMPONENT_NAME .'/js/slimbox/\';');
// $vm_mainframe->addScript( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox/js/slimbox.js' );
// $vm_mainframe->addStyleSheet( $mosConfig_live_site .'/components/'. VM_COMPONENT_NAME .'/js/slimbox/css/slimbox.css' );
// }
// added by JK for loading mootoools 1.2 if configured in Joomla ends
define ( '_SLIMBOX_LOADED', '1' );
}
}

paskuale

  • Beginner
  • *
  • Posts: 2
Re: Two Slimbox-es
« Reply #2 on: June 20, 2011, 09:23:11 am »
Good script slimbox 2.04 but not IE9 compatible  :'( in my page the same problems you encounter in your web page, it opens a few pixels (http://www.radan.rs/sajt2/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=737&category_id=17&option=com_virtuemart&Itemid=59) css problem or other ?

thanks