Keyword

K2, Joomla 3.3, Mootools and Squeezebox

  • Kelsey Brookes
  • Kelsey Brookes's Avatar Topic Author
  • Offline
  • Elite Member
More
10 years 5 months ago #127535 by Kelsey Brookes
K2, Joomla 3.3, Mootools and Squeezebox was created by Kelsey Brookes
With Joomla 3.3 due in just a few days we see the removal of Mootools from the Joomla core.

Finally!!

I'm wondering how K2 will be dealing with this transition in the short term - will K2 2.7 be jQuery only?

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

More
10 years 5 months ago #127536 by Lefteris
Replied by Lefteris on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
Hi. K2 is already almost "jQuery only". There are only a few parts of K2 which are using Mootools code. Most of them are used for Joomla! 1.5 support. We will remove any remaining Mootools code that can be removed in 2.7. K2 v3 is of course using only jQuery.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Kelsey Brookes
  • Kelsey Brookes's Avatar Topic Author
  • Offline
  • Elite Member
More
10 years 5 months ago #127537 by Kelsey Brookes
Replied by Kelsey Brookes on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
Thanks Lefteris, looking forward to yet another awesome K2 release.

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

More
10 years 5 months ago #127538 by Lefteris
Replied by Lefteris on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
You are welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 2 months ago #127539 by Simone Bussoni
Replied by Simone Bussoni on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
Hi!

Same problem here, when i am in a page with k2 article, squeezebox (mootools) is loaded with latest 2.6.x k2 version.

Our site is built with Magebridge for connecting magento with joomla, we use k2 for a powerful control of contents.

Magento is infamous to load prototype.js that is an hell with mootools.

Our joomla is the latest 3.3.3 with a bootstrapped template: so now remain only a problem that broke a lot of pages... k2 and squeezebox javascript.

It could be nice to have some hint to how to remove squeezebox while we wait for a k2 version "totally" without pieces of mootools.

Can we do something temporary?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #127540 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
Sure you can.

You can try removing Mootools from your template. There are several examples in Joomla!' 's docs.

You can also edit core files provided that you keep backups in case anything goes south.

This is a check in plugins/system/k2.php that loads the MooTools modal
if ( !$user->guest || (JRequest::getCmd('option') == 'com_k2' && JRequest::getCmd('view') == 'item') || defined('K2_JOOMLA_MODAL_REQUIRED') ){
			JHTML::_('behavior.modal');
		}

The actual code that does the loading is:
JHTML::_('behavior.modal');

You can remove all instances of this code.
Depending on the modules you are using you might need to remove that code from there as well.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 2 weeks ago - 10 years 2 weeks ago #127541 by Simone Bussoni
Replied by Simone Bussoni on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
Practically k2 loads mootools (in Joomla 3.3 too) every time an user do a login...

Woah! I think this code inside k2.php is a website killer... imho!

I never include modal by mootools in template (for example when i create bootstrapped template for joomla 3.x) and so... when i login in the site a component (without my decision) load a thing that i don't want.

I think is not very standard for joomla coding an inclusion like this.

Can i propose to add in the backend a switch for this?

Developer must have control to javascript library loaded...


Solution for User with JCE and JCE Mediabox enabled:
Open plugins/system/k2/k2.php and comment this:
Log in  or Create an account to join the conversation.

More
10 years 2 weeks ago #127542 by Lefteris
Replied by Lefteris on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
@Simone Bussoni

Front-end editing is tighten with the core Joomla! modal. This is something that currently cannot be changed.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 2 weeks ago - 10 years 2 weeks ago #127543 by Simone Bussoni
Replied by Simone Bussoni on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
I know, but when in K2 Setting frontend editing is switched OFF i don't see any reason to load mootools from an added extension.

Maybe you could add in the "IF" a check to Frontend Editing, if is enabled or not.

Read the edit from my last post, it resolve a lot of things for me... ;-)

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

More
10 years 2 weeks ago #127544 by Lefteris
Replied by Lefteris on topic Re: K2, Joomla 3.3, Mootools and Squeezebox
@Simone Bussoni

The modal is also used for the image in the item view as well as the extra fields who open in a lightbox. I don't think that we are going to change this now since we are working on the upcoming v3. However if you have a patch that can be applied without breaking the current functionality you can make a pull request at the repository at github.com/joomlaworks/k2 .

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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