[31]Option to turn off Mootools

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Wed Mar 26, 2008 11:03 am

following your last post, that option seems not technically possible for a 1.6 version... :(
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3783
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: [31]Option to turn off Mootools

Post by Hackwar » Wed Mar 26, 2008 11:11 am

newart wrote:following your last post, that option seems not technically possible for a 1.6 version... :(
I never said that.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Wed Mar 26, 2008 11:41 am

sorry for my misunderstanding so, I hope to see that option inside :)
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
prova
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 181
Joined: Thu Oct 13, 2005 6:30 pm

Re: [31]Option to turn off Mootools

Post by prova » Sat Mar 29, 2008 8:43 am

Hackwar wrote:I already thought about this and I also know how to implement it, but this is not something that we can do in 1.5, since it would mean a slight content conversion to allow this. Besides that, its got to do with parameters. (Don't want to spoil all the fun of you guys figuring a way for this one. ;) )
so you have a good solution for this option... anybody else? If not, please can you post here your solution? Perhaps the joomla team can use your solution! :D ;)
Vorrei ringraziare http://www.joomla.org per avermi dato la possibilità di essere presente su internet anche se non ci capisco niente di programmazione.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Tue Apr 01, 2008 10:51 am

when you see an option like that I think it'd be useful to separate it from the admin part side... but now I think that all possible ideas about that option has been said, now there is the decision... :-[
former Q&T WorkGroup Joomla member - Italian Translation Team Member

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1421
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: [31]Option to turn off Mootools

Post by fotisevangelou » Wed Apr 16, 2008 11:42 am

Per newart's suggestion, I'm copy/pasting my thoughts on the matter (from another post I did)...

1. No need to throw away Mootools for jQuery :) Either way the admin backend is heavily relying upon it. It's a decision the J team took to use Mootools and I fully respect that.

2. Add an option to enable/disable MOOTOOLS and other core javascript files for the frontend. This option could exist in the "Global Configuration" page of Joomla 1.5. Also, provide an option to use the "packed", full or perhaps a gzipped version of Mootools. Loading around 100kb for a js framework is overkill for any website. These options could be a dropdown list for selecting if one wants to include mootools, caption.js, both or nothing at all and another dropdown for choosing whether to use the full library, packed or gzipped (if Mootools is enabled of course).

3. Allow for "on demand" loading of Mootools even if they are disabled globally ONLY if some component requests for it. This is aimed towards extension developers, much like we did with loading css/js files on the head in J1.0.x. (addcustomhead).

Thanks.
Fotis Evangelou / JoomlaWorks

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Tue May 13, 2008 6:25 am

I'm worried! There is NO decision in this forum, all under review threads are all the same, no decision, all is waiting for... (?)

I hope that the simple number of visits (more than 3000 ! ) is a good way for pointing out this thread...
former Q&T WorkGroup Joomla member - Italian Translation Team Member

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: [31]Option to turn off Mootools

Post by AmyStephen » Tue May 13, 2008 1:13 pm

Newart -

About a month ago, the development working group announced their decision about accepted tasks for v 1.6 and moved those tasks into the "accepted" forum. They have ambitiously agreed to tackle 50 of our white paper submissions. Those submissions that will never be done were moved into the "rejected" forum; those that remain in the "under review" forum might be considered for future releases.

Hope that helps,
Amy :)

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Wed May 14, 2008 8:44 am

Thanx a lot Amy! Now I understand... I've read about those 50 accepted papers in the dev blog but I haven't realized that now it is closed. I hope to see some good news about the mootools option in a future version. :)
former Q&T WorkGroup Joomla member - Italian Translation Team Member

quayph
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Dec 20, 2006 11:23 am
Location: Beauvais - France

Re: [31]Option to turn off Mootools

Post by quayph » Mon Jun 23, 2008 11:44 am

I liked the idea of having a modular aproach to the mootools framework : ie. you can choose the parts that are of use to your site. One objection raised was that the page load times get very long. I believe that there is a solution. Please see this informative post : http://rakaz.nl/item/make_your_pages_lo ... _css_files

User avatar
zigzag
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 249
Joined: Tue Sep 20, 2005 9:03 pm
Location: Elsewhere

Re: [31]Option to turn off Mootools

Post by zigzag » Tue Jul 15, 2008 9:33 pm

I'd like to see the option to disable the moo tools under global config too.
Personally I like to call it boo tools - its very weighty, slows loading time a lot and conflicts with just about any other script, but sadly programmers and designers have all gone moo and light box, slim box, whatever box mad and the flipping script is everywhere :eek:

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 274
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: [31]Option to turn off Mootools

Post by ghazal » Tue Jul 15, 2008 11:53 pm

Personally, I really praise Joomla devs for this choice of a JavaScript framework.
Specially since the launch of a very interesting update (Mootools 1.2) past June.
But I can understand you don't.
Get rid of it with this little bit of script (index.php of your template) :

Code: Select all

<?php
// Remove mootool sripts for guest, registered and admin
    $user =& JFactory::getUser();
    if ($user->get('guest') == 1 or $user->usertype == 'Registered' or $user->usertype == 'Super Administrator') {
        $headerstuff = $this->getHeadData();
        $headerstuff['scripts'] = array();
        $this->setHeadData($headerstuff);
    }
?>
and write your own scripts.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Fri Jul 18, 2008 2:48 pm

I see that thread as asking for a better use of moo-tools features - you'll be able to switch off the j.tool too or to select what exactly you need of. That option should be for whatever use.
former Q&T WorkGroup Joomla member - Italian Translation Team Member

peterjmag
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Jul 09, 2007 3:09 am

Re: [31]Option to turn off Mootools

Post by peterjmag » Fri Jul 18, 2008 9:38 pm

Here's another way to turn off Mootools site-wide (keep in mind, however, that it will also disable the framework for the administration backend):

Open up the file [your Joomla root]\libraries\joomla\html\html.php. Scroll down to line 164, and change the value for the "$mootools" parameter from true to false. This will prevent Joomla from loading Mootools anywhere on the site.

(I did this on Joomla 1.5.0, so let me know if the process doesn't work for you on any newer versions of Joomla.)

User avatar
zigzag
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 249
Joined: Tue Sep 20, 2005 9:03 pm
Location: Elsewhere

Re: [31]Option to turn off Mootools

Post by zigzag » Tue Aug 19, 2008 11:30 pm

Get rid of it with this little bit of script (index.php of your template)...
Thank you! It not only works perfectly it's also decreased load time by at least an hour :laugh:

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Wed Aug 20, 2008 6:25 am

good reading your satisfaction but please let's remember that this is not The Solution :D We need an option :'(
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
dizzi
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3136
Joined: Fri Dec 21, 2007 9:36 pm
Location: Yorkshire, UK

Re: [31]Option to turn off Mootools

Post by dizzi » Wed Aug 27, 2008 6:04 pm

Hey

I have seen quite a few posts here and other online tutorias/discussions about persons wishing to either, selectively remove mootools, reduce its size or remove it completely. This is undoubtedly an area that some are passionate about :) Now I think it is progressive to keep up with modern innovations where appropriate to make optimum use of the latelst technology. One would be hardpressed nowadays to justify sacrificing a program's performance for the sake of compatibility with pre-pentium processors. Which is one of the reasons why I suppose the core team decided to include certain tools (no pun intended :) ) that they felt would improve Joomla even further. However it should be bourne in mind that while more and more people are getting online, they are not necessarily doing so at the connection speeds that some us here are used too. Believe it or not, dialup Internet and low Kilobit broadband are still around. An extra 80kb may not be an issue to must of us, and to be honest, I was totally oblivious of any potential issues until I accidentally stumbled upon a site outlining methods to optimise Joomla. However for those folks on those slower connections, it could mean prolonging an already frustrating wait. Web designers therefore should still keep accessibilty near the top of their priorities list.

At the end of the day, I hope that the issues forwarded by the "mootools tweakers" out there would be given serious consideration by the core team and hopefully implement some of their recommendations. If practical of course ;) .

Regards
Freedom of expression ... some may try to suppress it but they can never take it away ...
There is no problem a good miracle can't fix.

User avatar
M4rc0
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Wed Sep 27, 2006 1:47 pm
Contact:

Re: [31]Option to turn off Mootools

Post by M4rc0 » Wed Oct 08, 2008 6:19 pm

ghazal wrote: Get rid of it with this little bit of script (index.php of your template) :

Code: Select all

<?php
// Remove mootool sripts for guest, registered and admin
    $user =& JFactory::getUser();
    if ($user->get('guest') == 1 or $user->usertype == 'Registered' or $user->usertype == 'Super Administrator') {
        $headerstuff = $this->getHeadData();
        $headerstuff['scripts'] = array();
        $this->setHeadData($headerstuff);
    }
?>
and write your own scripts.
This work good enough for me! fewer requests, less kb to download. Phew.

My thumbs up to this topic, I also feel that this option is necessary.

I like jquery the most and i have trouble when I try to add a plugin. Say i want a jquery plugin on my page and I'm using a component that uses mootools. The jquery works but the component doesn't :P
So i guess they don't get along together so well :(

Another thing that i believe is another joomla weak point (of few), but not joomla devs fault, when you add a component or a module on the frontpage, that component has it's own javascript and css thus more and more requests and different files.

When i check the code of my site i see all those links for javascripts and css i get sad, but what can i do if the component is a must :-\

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Tue Dec 30, 2008 5:49 pm

This thread is normally accepted by joomlers as an interesting option if accepted, well, I hope to see a "move" in that way... or maybe to make a special poll?
former Q&T WorkGroup Joomla member - Italian Translation Team Member

Pixelsmith
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Nov 02, 2008 5:47 pm

Re: [31]Option to turn off Mootools

Post by Pixelsmith » Sun Feb 08, 2009 9:44 pm

Hi there.

I'm a relative newcomer to joomla and web development, but have taught myself how to use it with these forums and Google, in my spare time over the last four months or so. I have run into a site-breaking problem and would really appreciate it if anyone had any input.

My joomla site (http://www.rollzero.com) was slow to load, so I used the following php script in the template html file to disable Mootools (which was loading twice):

Code: Select all

<?php
// Remove mootool sripts for guest and registered
    $user =& JFactory::getUser();
    if ($user->get('guest') == 1 or $user->usertype == 'Registered' or $user->usertype == 'Super Administrator') {
        $headerstuff = $this->getHeadData();
        $headerstuff['scripts'] = array();
        $this->setHeadData($headerstuff);
    }
?>
I found it here: http://forum.joomla.org/viewtopic.php?f=501&t=266809

Supposedly this just disables Mootools for the frontend. But I found problems with the admin backend - Tiny MCE took 40 seconds or more to load up, and Firefox lagged for 20 seconds when i used the image uploader to browse for files.

So I removed the php code. Unfortunately I still have the same problems with the backend - and Mootools still does not load for the front page. It has also stopped my instances of the GK_News_Show_3 module from working properly - now they only take layout info from the template CSS, and not from their own php files.

Has anybody encountered this error or a solution?

Stupidly I changed a couple of other things at the same time, although I'm not sure if they are relevant. As per suggestions in the joomla security wiki, I changed the name of the log and tmp folders (via ftp and in the global config), removed a load of leftover zips and directories from within that tmp folder, and also removed the templates I wasn't using (so I now only have mine installed). I also disabled JCE Editor, JCE utilities and MediaObject - all to speed up the front page. Re-enabling these doesn't remove my current problem.

Sorry for the lengthy post. I'm at a bit of a loss about what to do and would be really grateful for any insight.

Oh, I'm using Joomla 1.5.9.

Thank you in advance,
Pixelsmith.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Mon Feb 09, 2009 9:29 am

When I use the no-mootools-script in my site I have no problem if I log as an admin or a user. The script works for no-registered users. The site is very fast for simple users and a little heavy for who's interested in that site, so he has to wait longer than a simple user baut there are a lor of services that worth the wait... this is the consideration.

Please when you test something avoid to modify other parts of the site, it's difficult to help you in this case. I think the best way should be to load the original parts of Joomla and then testing if all is working, step by step. This could be a solution, a bit a long one but surely you'll find what's wrong!
former Q&T WorkGroup Joomla member - Italian Translation Team Member

inspired444
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Mon Sep 15, 2008 6:54 pm

Re: [31]Option to turn off Mootools

Post by inspired444 » Wed Mar 11, 2009 8:51 pm

ghazal wrote: Get rid of it with this little bit of script (index.php of your template) :

Code: Select all

<?php
// Remove mootool sripts for guest, registered and admin
    $user =& JFactory::getUser();
    if ($user->get('guest') == 1 or $user->usertype == 'Registered' or $user->usertype == 'Super Administrator') {
        $headerstuff = $this->getHeadData();
        $headerstuff['scripts'] = array();
        $this->setHeadData($headerstuff);
    }
?>
and write your own scripts.
I am sorry to be reviving this thread after so long.
I also want to disable some of the load that comes through to the front end. I want to turn off MooTools for a start. Although I'd also like to know what, if anything, MooTools actually does on the front end. What it is used for...

Anyway... with regards to this handing bit of code... what do I put in the place of 'scripts'? I am assuming "and write your own scripts" is infering I should put something in there where it says 'scripts', yes?

Do I just stick in the script names as I see them in the source of a front end page? Like scriptname.js ? (whatever the names happens to be)? To put in more than one, do I just list then like so: 'scriptname.js,scriptname2.js,scriptname3.js"

One more thing, I gather this list is a list of the scripts I DO want to run, is that correct? Anything not in that list will not be loaded?

Much thanks for your help.

Regards,
Jonathan

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 274
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: [31]Option to turn off Mootools

Post by ghazal » Thu Mar 12, 2009 9:49 am

Hello,
as I am the author of this post (not the script), I'll try my best to answer your questions.
Although I'd also like to know what, if anything, MooTools actually does on the front end. What it is used for...
A lot of interface niceties are managed through Mootools framework, in general:
Backend : accordions, popup - modal windows, form validations, etc...
Front-end : most important, front-end editor, then validation, captions for images, etc..
Some templates like ja_purity make heavy use of the framework (rockettheme's, yootools', joomlart's, etc,).
Some modules or components are based upon mootools also, like modal windows, accordions, dropdown menus, pics galleries.
what do I put in the place of 'scripts'?
Whatever you want.
Some people would completely replace Mootool, frontend-wise, by another framework, like jQuery.
Because, very often, jQuery and Mootools don't go well together. Or, like me, use the last version of Mootools (1.2.1).
Or would totally get rid of the framework to speed the download of a site.
To put in more than one, do I just list then like so: 'scriptname.js,scriptname2.js,scriptname3.js"
No.
The usual way of inserting a js file in a template (in head tag of index.php) is (in beez, for ex) :

Code: Select all

<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/beez/javascript/md_stylechanger.js"></script>
Or

Code: Select all

<script language="javascript" src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/javascript/myscript.js"></script>
One more thing, I gather this list is a list of the scripts I DO want to run, is that correct? Anything not in that list will not be loaded?
I dont really understand this question, but no, it wont.

Hope it helps.

User avatar
abstraktron
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Sat Apr 15, 2006 6:43 am
Location: Los Angeles, CA, USA
Contact:

Re: [31]Option to turn off Mootools

Post by abstraktron » Mon Mar 16, 2009 8:43 pm

Suggestion:

Instead of loading a Mootools framework from individual servers, use google ajax apis( or I believe clientcide has versions of Mootools also (cnet)). This will allow for larger pipes to serve the larger 70KB download. Each Joomla will have a download partner, this will remedy slower downloads due to http request overload. It will also offer caching for individuals who have already downloaded moo through google on some other site.

Bigger Problem:
The bigger issue I have with mootools, is not with mootools but with other Javascript frameworks being loaded on the same page with moo, because an extension developer preferred jquery to moo. I think this is the bigger issue. Moo can do everything that all other js frameworks can do. The problem with moo is that it is object orientated, therefore, complicated. As much as I would like to be king Joomla and tell everyone to use moo or go home, people will still use jquery because of their large amount of pre-developed resources. I'm not sure how to deal with this issue.

Perhaps all Javascript can be placed together like lanugage files, and have jquery people write jquery versions of the current moo implementations. Dojo et al. can perform the same. The configuration file should implement a check box for includes, allowing one or more of the frameworks to be loaded (preferably from a download partner CDN), or none at all.

I don't know that Joomla should rely on Javascript to function in any core extension.

Whatever the solution, javascript frameworks will continue to drive the increasingly interactive web. Solutions should take very seriously this potential bottleneck.

-A
Build your site on a professional foundation, for free!
http://joomlapackages.com

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 274
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: [31]Option to turn off Mootools

Post by ghazal » Sun Mar 22, 2009 10:23 am

Hi,
french developers just launched a plugin "which controls Mootools scripts on the public side of your website".
Here :
http://www.kinesphere.fr/en/products/mootools-control/

Hope it helps.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Fri Mar 27, 2009 9:00 pm

ghazal wrote:Hi,
french developers just launched a plugin "which controls Mootools scripts on the public side of your website".
Here :
http://www.kinesphere.fr/en/products/mootools-control/

Hope it helps.

wowowow very very interesting ! thanx for the link, hope helps being joomla without a core solution up-to-now !!
former Q&T WorkGroup Joomla member - Italian Translation Team Member

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [31]Option to turn off Mootools

Post by emeyer » Sat Apr 04, 2009 5:06 pm

Now I appreciate the endeavour to bring new wizzbangs to all us folks and impress us with wizardry, but in the meantimes there are customers in Indonesia and East Germany on slow modems who are rapidly disappearing because they can't even load the home page because it loads so many scripts. Already there was overlib, now mootools, and then two versions of mootools so it is several minutes just to load the scripts for them, and they are all on separate files needing multiple http fetches, and they have separate css files too, and the gzip compression only works on htm files which are 5% the size of the jscript and css files in the first place besides. So then I wrote custom scripts combining them all together and compressing them, then a new library appears and I have to it all over again.

At the same time, I am trying to get a page to print. The path in the popup window from the print button also includes mootools but it doesn't work either, moreover the css path is relative and to the wrong folder, and there appears no way to set {display:none} on any classes, it only seems to work for some block properties, and pdf display is terrible.

So there are all these new wizzbang features, but it takes yonks to load and still can't print anyway. If people really must have new script libraries, please can the installer run some sort of diagnostic and put only the required functions from the libraries in single a new file? And can there be some indication which things actually need the libs so if nice people replace them with new extensions we know whether the code gets bigger of smaller?

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 274
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: [31]Option to turn off Mootools

Post by ghazal » Sat Apr 04, 2009 6:45 pm

Hello emeyer,
thats precisely the goal of the Mootools Control plugin :
Features list:
With this plugin, you can :
* lighten your pages with complete deactivating,
* update Mootools librairies of your site.
With four parameters :
* Deactivate mootools.js
* Deactivate caption.js
* Change mootools.js file
* Define the news Mootools library file
here : http://www.kinesphere.fr/en/products/mootools-control/

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [31]Option to turn off Mootools

Post by emeyer » Tue Apr 07, 2009 5:01 am

That;'s a good idea, but I was talking more on a granular level for individual function sets and versions, rather than a global switch.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [31]Option to turn off Mootools

Post by newart » Wed Apr 08, 2009 6:24 pm

How to see all those ideas / concepts in a new joomla core version...
former Q&T WorkGroup Joomla member - Italian Translation Team Member


Locked

Return to “Under Review - Archived”