Jump to content

Conflict resolution with YooTheme Warp and Jomres


Alejandro

Recommended Posts

YooTheme templates, Jomres and JReviews all use jQuery. Jomres and JReviews also use jQuery UI. It is necessary to make sure that the libraries load just once to avoid conflicts. Even after doing this, the extensions might load individual jQuery plugins, but this post is not yet dealing with that.

 

Step 1. Modify the Warp code to ensure it loads the latest version of jQuery and we also add the jQuery UI call there:

 

/templates/{template_name}/warp/systems/joomla.1.5/layouts/head.php  

 

If you are using Joomla 1.6, then you would need to look for a 1.6 folder.

 

Comment these block of code as shown:

 

// load jQuery first, if not loaded before
/*
if (!$this->warp->system->application->get('jquery')) {
$this->warp->system->application->set('jquery', true);
$head['scripts'] = array_merge(array($this->warp->path->url('lib:jquery/jquery.js') => 'text/javascript'), $head['scripts']);
$this->warp->system->document->setHeadData($head);
}
*/

 

Modify the end of the file as shown. The versions used are the most recent ones when this post was made:

 

warp->system->application->set('jquery', true);?>


jQuery.noConflict();


output('head'); ?>

 

If you want to use a different jQuery UI theme, checkout the available options here and change the folder name accordingly:

 

http://jqueryui.com/themeroller/

 

Step 2. Modify Jomres to prevent it from loading jQuery UI. Jomres has a setting in the configuration to disable jQuery so you should use that setting as well.

 

/jomres/libraries/jomres/functions/functions.php

 

Comment the lines below as shown:

 

//			jomres_cmsspecific_addheaddata("javascript",'jomres/javascript/',"jquery-ui-1.8.5.custom.min.js");

 

//			jomres_cmsspecific_addheaddata("css",$themePath,$filename);

 

 

Step 3. In JReviews, disable both jQuery and jQuery UI in configuration, general tab.

 

 

PS1: There seem to be issues when using JReviews in Jomres with jQuery 1.5.1, so instead jQuery 1.4.4 should be used:

 

 

JReviews 2.3 has been tested with jQuery 1.5.1 for native listings and it works well.

 

 

PS2: Added the jQuery UI css to the code in 1. because by disabling it in 3. it no longer loads in JReviews pages. Also added a new step to comment the same css in Jomres so it doesn't load twice.

Link to post
  • 2 weeks later...
  • 2 months later...
  • 1 month later...
  • 1 year later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.