how can I disable mootool.js ?
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 24, 2007 11:50 am
how can I disable mootool.js ?
I noticed that everytime when I open com_frontpage and com_content pages, Joomla 1.5 generates the mootool.js automatically in the HEAD tags if I use "".
It has conflict with my jquery effects. I'd like to know how can I disable it ? It's not a good thing that Joomla adds such things in it, these should be chosen by users but not Joomla (you can of course use them in the backend, but please don't in the front-end). It took me 2 hours to figure out why my jquery effect doesn't work.
It has conflict with my jquery effects. I'd like to know how can I disable it ? It's not a good thing that Joomla adds such things in it, these should be chosen by users but not Joomla (you can of course use them in the backend, but please don't in the front-end). It took me 2 hours to figure out why my jquery effect doesn't work.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Oct 10, 2007 5:10 am
Re: how can I disable mootool.js ?
Certainly interested! Are you solve this problem?
Thanks.
Thanks.
- Tonie
- Joomla! Master
- Posts: 16553
- Joined: Thu Aug 18, 2005 7:13 am
Re: how can I disable mootool.js ?
What version of 1.5 are you using? To my knowledge, mootools is only loaded on the backend automatically and not on the frontend any more.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 24, 2007 11:50 am
Re: how can I disable mootool.js ?
no, I haven't found the solution. I'm using joomla1.5 RC3
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: how can I disable mootool.js ?
mottools is loaded in frontend because the editor image uploader uses it...
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Oct 10, 2007 5:10 am
Re: how can I disable mootool.js ?
May be we can use other JQuery initiation, not $().
Hmm, I think Joomla developers must use not default descriptor for mootools. It's hard of maintains (may be, may be not), but solve many problems in future.
So, I solve my problem, I should load my JQuery application on only needed pages.
Have some told me how can I add some code in HEAD from my extension? Thanks.
Hmm, I think Joomla developers must use not default descriptor for mootools. It's hard of maintains (may be, may be not), but solve many problems in future.
So, I solve my problem, I should load my JQuery application on only needed pages.
Have some told me how can I add some code in HEAD from my extension? Thanks.
- jazbek
- Joomla! Apprentice
- Posts: 39
- Joined: Thu Nov 16, 2006 7:47 pm
Re: how can I disable mootool.js ?
It would be really awesome if we could disable mootools.js from being loaded. I don't know why it has to be added to every single page in my site if I'm using it nowhere. I understand some people may use it, so maybe it should be there by default, but I definitely think there should be an option to disable it.
- Tonie
- Joomla! Master
- Posts: 16553
- Joined: Thu Aug 18, 2005 7:13 am
Re: how can I disable mootool.js ?
Moving to 1.5 developer forum.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 24, 2007 11:50 am
Re: how can I disable mootool.js ?
It's been discussed several times, some Devs think it should be placed in every page... which I can't and will never understand
Hope they can give the people like me an option to disable it
Hope they can give the people like me an option to disable it
- 55thinking
- Joomla! Enthusiast
- Posts: 183
- Joined: Mon Sep 05, 2005 8:58 am
- Location: Madrid
- Contact:
Re: how can I disable mootool.js ?
Place
In the header of your template
Code: Select all
<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff);
}
?>
55 Thinking - Strategy Design Technology
Good looking, Fast and Usable web solutions
http://www.55thinking.com/
Good looking, Fast and Usable web solutions
http://www.55thinking.com/
- jazbek
- Joomla! Apprentice
- Posts: 39
- Joined: Thu Nov 16, 2006 7:47 pm
Re: how can I disable mootool.js ?
YOU ARE AWESOME. thank you.
- dkarlovi
- Joomla! Intern
- Posts: 95
- Joined: Wed Sep 26, 2007 10:59 am
- Contact:
Re: how can I disable mootool.js ?
I need just the opposite, my module need it on every page it's loaded on, how can I check for MooTools?
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
- dkarlovi
- Joomla! Intern
- Posts: 95
- Joined: Wed Sep 26, 2007 10:59 am
- Contact:
Re: how can I disable mootool.js ?
Thank you Ian, I've read it twice, but didn't find how to make sure from a module that mootools are loaded, just found the template bit (which I also needed, though )
- Pentacle
- Joomla! Enthusiast
- Posts: 165
- Joined: Wed Oct 25, 2006 12:34 pm
- Location: Turkey
Re: how can I disable mootool.js ?
As some people know, JQuery has a no conflict mode.
What about Mootools? This would save a lot of namespace issues.
@dkarlovi
JHTML::('behavior.mootools'); should be enough, I think.
What about Mootools? This would save a lot of namespace issues.
@dkarlovi
JHTML::('behavior.mootools'); should be enough, I think.
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.
Progress is made by lazy men looking for easier ways to do things.
- dkarlovi
- Joomla! Intern
- Posts: 95
- Joined: Wed Sep 26, 2007 10:59 am
- Contact:
Re: how can I disable mootool.js ?
Yeah, I've added it to the wrong place the first time.Pentacle wrote: As some people know, JQuery has a no conflict mode.
What about Mootools? This would save a lot of namespace issues.
@dkarlovi
JHTML::('behavior.mootools'); should be enough, I think.
- dkarlovi
- Joomla! Intern
- Posts: 95
- Joined: Wed Sep 26, 2007 10:59 am
- Contact:
Re: how can I disable mootool.js ?
Anyway, I have answers to both my questions (yes, cache get done automagically and this answer), but now another problem:Pentacle wrote: As some people know, JQuery has a no conflict mode.
What about Mootools? This would save a lot of namespace issues.
@dkarlovi
JHTML::('behavior.mootools'); should be enough, I think.
My module adds a JS file and a stylesheet. When I turn on the cache it works the first time, but all other times it does not (it's contents gets pulled from cache) and my code is not executed. How can I cache everything, but still get some of my PHP executed every single time?
-
- Joomla! Enthusiast
- Posts: 103
- Joined: Thu Aug 24, 2006 3:59 pm
Re: how can I disable mootool.js ?
I have a plugin that loads jQuery, and the key is to call mootools before jQuery and then initiate no conflicts mode on jQuery, which will revert the $ function back to the originally declared namespace. After that all jQuery plugins should handle no conflicts mode by using the following pattern:
To add jQuery after mootools use something like the following:
The above code loads the packed version of jQuery 1.2.1 from the media folder I've deployed it to and tags it as requiring mootools, which will cause mootools.js to be placed higher in the scripts declarations ensuring that jQuery.noConflict() works correctly.
Code: Select all
jQuery.noConflict();
(function($) {
$(function() {
// more code using $ as alias to jQuery
});
})(jQuery);
Code: Select all
JHTML::script( 'jquery-1.2.1.pack', 'media/jquery/scripts/', true );
- Devil
- Joomla! Intern
- Posts: 55
- Joined: Sat Aug 20, 2005 2:18 pm
- Location: Localhost @ Ruhrgebiet
- Contact:
Re: how can I disable mootool.js ?
Hi,
I think for loading Mootools on each side, particularly if one does not need it on the side is no good solution...
~80kb only for the mootools as compressed and ~200kb for the uncompressed? why
The best way ( i think) is to give the Users the possibility to choose between 2 Versions:
1. With the complet Mootools Framework
2. Only with the needed Functions of the Mootools Framework
greetings, Devil
I think for loading Mootools on each side, particularly if one does not need it on the side is no good solution...
~80kb only for the mootools as compressed and ~200kb for the uncompressed? why
This is to be loaded however still no reason the whole Mootools Framework constantly also. Why not use only the mootools core and the needed xxx.js ? The better way is the Editor uses his own Method/Function for this...infograf768 wrote: mottools is loaded in frontend because the editor image uploader uses it...
The best way ( i think) is to give the Users the possibility to choose between 2 Versions:
1. With the complet Mootools Framework
2. Only with the needed Functions of the Mootools Framework
greetings, Devil
Last edited by Devil on Thu Nov 01, 2007 8:52 am, edited 1 time in total.
- jmatt
- Joomla! Intern
- Posts: 73
- Joined: Sat Jul 26, 2008 5:41 am
- Contact:
Re: how can I disable mootool.js ?
WOW!!
55thinking
MAN!!!
I LOVE YOU!!!
55thinking
MAN!!!
I LOVE YOU!!!
Download popular free ebooks, classical free ebooks, new releases and more.http://www.ebook-x.com/
Home of online games, online game, flash games, free online game, free online games, flash game:http://www.online-flash-game.com/
Home of online games, online game, flash games, free online game, free online games, flash game:http://www.online-flash-game.com/
-
- Joomla! Enthusiast
- Posts: 178
- Joined: Thu Feb 02, 2006 9:45 am
Re: how can I disable mootool.js ?
if the editor is the only thing that uses mootools, why cant the editor page load it on request??