Keyword

K2 and mootools

  • Fred heise
  • Fred heise's Avatar Topic Author
  • Offline
  • New Member
More
12 years 11 months ago #57564 by Fred heise
K2 and mootools was created by Fred heise
Hi,

im using the great K2 component. If im setting off mootools.js the comment and rating function dont work. Because of performance issues im willing to set of mootools. Are there any options to run k2 well without mootools ?

Thx Fred

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57565 by Jiliko.net
Replied by Jiliko.net on topic Re: K2 and mootools
Hi,

K2 is not the only extension that uses the Mootools FrameWork for some visual effects or Ajax calls. Joomla! uses it on backend & frontend...

So i think disabling Mootools is not a good idea. If you really need to, some features like K2 comments & K2 rating will stop to work, no other way to make them work.

Maybe your performance issues come from another extension that uses Mootools.

Olivier

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57566 by SDKiller
Replied by SDKiller on topic Re: K2 and mootools
Actually K2 v.2.5.0 uses JQuery

Russian K2 support on joomlaforum.ru

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57567 by Jiliko.net
Replied by Jiliko.net on topic Re: K2 and mootools
@SDKiller

Thanks for the precision...

So to be clear :

K2 2.4.x = Mootools
K2 2.5.x = JQuery

I think Fred uses K2 2.4.x regarding his problem...and i think K2 version used should now be written for each submission, and may be the Joomla! version to avoid confusion.

Olivier

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57568 by L. Arnold
Replied by L. Arnold on topic Re: K2 and mootools
I beleive that I have an extention already loading JQuery before K2 Loads. Is there a way for K2 to not make the call to "ajax.googleapis.com ? Doing so is breaking my SSL Cert. Only way to fix this so far is to totally remove K2. Seems there should be a solution.

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago - 12 years 11 months ago #57569 by SDKiller
Replied by SDKiller on topic Re: K2 and mootools

Landis Arnold wrote: Is there a way for K2 to not make the call to "ajax.googleapis.com ?


You can disable loading of jQuery in K2 params

Russian K2 support on joomlaforum.ru

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57570 by James Royal
Replied by James Royal on topic Re: K2 and mootools
My sites Kunena forum has a 'MooTools domready event was never fired' error every time it loads a forum page

BTW that's not my bad spelling that's what is reads

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago - 12 years 11 months ago #57571 by dido76bg
Replied by dido76bg on topic Re: K2 and mootools
Hi there!
If you are using J1.5.x and any version of K2 or if you don't want to have any problems with loading mootools and jquery in frontens you should put this piece of code in your template right after the head tag
<head>
<?php
$document =& JFactory::getDocument();
$regexp = '/mootools.js/';
foreach ($document->_scripts as $key => $value) {
if (preg_match($regexp, $key))
unset($document->_scripts[$key]);
}
?>
<script type="text/javascript" src="<?php echo JURI::base(); ?>media/system/js/mootools.js"></script>
<?php
$regexp = '/jquery/';
$jquery = null;
foreach ($document->_scripts as $key => $value) {
if (preg_match($regexp, $key)) {
$jquery[] = $key;
unset($document->_scripts[$key]);
}
}
foreach ($jquery as $jq_path) { ?>
<script type="text/javascript" src="<?php echo $jq_path; ?>"></script>
<?php } ?>
<script type="text/javascript">
if (typeof jQuery !== 'undefined') jQuery.noConflict();
</script>

<jdoc:include type="head" />

You can download joomla system jquery plugin from extensions.joomla.org (lets say jqueryeasy or scjquery) and intall it setting it to load jquery and jqueryui in both frond and backend.
If you plan to use mootool upgrade plugin (J1.5.x and K2 v2.5.1), make sure it is the first one of system plugins and jquery is second. Disable K2 jquery loading from parameters.

If you have problems with K2 v2.5.1 in rendering or operating in backend, than you should check the scripts in element folder. (I will discribe that in another topic - here )

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57572 by L. Arnold
Replied by L. Arnold on topic Re: K2 and mootools
Thank you! That fixed it.

It seems a call that is in Front Page Slide Show does not cause the breakage, but I am commenting out the line there as well as noted on this joomlaworks forum entry:

forum.joomlaworks.gr/frontpage-slideshow-(for-joomla!)/disable-jquery-in-fpss-3-0/

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57573 by SDKiller
Replied by SDKiller on topic Re: K2 and mootools

James wrote: My sites Kunena forum has a 'MooTools domready event was never fired' error every time it loads a forum page


You could simply change the order of plugins, setting System - K2 plugin AFTER System - Mootools Upgrade

Russian K2 support on joomlaforum.ru

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum