widgetkit conflict?

Questions related to the configuration of Joomla, Templates, and Security related questions/issues
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Jul 25, 2013 12:17 am
Hi,
I would like to use the Gavick template Bluap and a Yootheme Widgetkit slideshow.
Everything works fine except the effect I want to use: Ken Burns. The module is blank.
I suspect could be there some conflict but I don't know what.
Please, could you help me to solve the problem?
Thank you very much
Marco
User avatar
Junior Boarder

teitbite
Fri Jul 26, 2013 1:54 am
Hi

Please show me the site while Widgetkit is used.
User avatar
Moderator

GK User
Sat Aug 10, 2013 3:40 pm
hello marcozeus,

there is a way to avoid the conflict in the frontend by not loading the jquery script for the widgetkit.
by default it loads it both in front end and backend.

if at the same time, another component or template loads jquery of a different version in the front end , you are likely to have a conflict.

unfortunately, the guys at yootheme did not put a parameter in order to elect to load or not their jquery version in the frontend.

thus the proposed solution we have is a solution where we need to edit the widgetkit code in order not to load in the front end the library

in order to achieve that, follow the steps below for joomla 2.5

edit the file

/administrator/components/com_widgetkit/layouts/assets.php

around line 32, locate the lines

// load jQuery, for Joomla 3.x or lower
if (version_compare(JVERSION, '3.0.0', '>=')) {
JHtml::_('jquery.framework');
} else if (!$this['system']->application->get('jquery')) {
$this['system']->application->set('jquery', true);
$this['system']->document->addScript($this['path']->url('widgetkit:js/jquery.js'));
}

and replace with


if (version_compare(JVERSION, '3.0.0', '>=')) {
JHtml::_('jquery.framework');
} else if (!$this['system']->application->get('jquery')) {
// addded YVB to not load jquery in frontend
// Check that we are in the admin application
if (JFactory::getApplication()->isAdmin())
{
$this['system']->application->set('jquery', true);
$this['system']->document->addScript($this['path']->url('widgetkit:js/jquery.js'));
}
}

thus this way, it will load jquery in the backend in widgetkit. but not in the front end.


warning. it is up to you to check that jquery is loaded in the front end by another component or by the template.

of course everytime you upgrade widgetkit, you will need to do again the modification until the guys at yootheme decide to put a parameter to allow to choose to load or not jquery in the frontend.
User avatar
Fresh Boarder

teitbite
Mon Aug 12, 2013 8:19 am
Hi

If this is the problem than i would recommend to use easyjquery plugin. You will be able to manage jQuery version for single page than.
User avatar
Moderator


cron