0
Welcome Guest! Login
0 items Join Now

Load specific mootools version on specific page

  • Load specific mootools version on specific page

    Posted 13 years 4 months ago
    • Hello.

      I've just want to use mootools-1.2.5.js on specific pages (I know how to do the if statement) an mootools.js on all the other ones.

      In other words, it's like having enabled the mootools upgrade plugin on a specific page and disable it an all the others, isn't it?

      So where is the file in gantry that loads the scripts? Thanks in advance!
  • Re: Load specific mootools version on specific page

    Posted 13 years 4 months ago
    • Well I've found a way to do what I want by editing the moo125.php file in /components/com_gantry/features/moo125.php

      line 49:

      changed $newmoo = $gantry->gantryUrl.'/js/mootools-1.2.5.js';
      to $newmoo = JURI::root(true) .'/plugins/system/mtupgrade/mootools.js';

      while having the plugin mtupgrade enabled, just to check if it's like having it disabled, but it didn't work. It seems that the mtupgrade plugin does more things than just loading a different .js file.

      If I disable the mtupgrade plugin, the module which has the problem works fine. If I enable it it doesn't, that's why I'm searching for a way to enable it on specific pages.
  • Re: Load specific mootools version on specific page

    Posted 13 years 4 months ago
    • Well I just noticed that except of loading a different mootools js file, the template loads different .js files for other things like:

      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-buildspans-mt1.2.js"></script>

      So I'm now searching the files that loads all these javascripts *after* the main mootools JS.
  • Re: Load specific mootools version on specific page

    Posted 13 years 4 months ago
    • In other words, the difference between having mtupgrade plugin enabled or disabled, are the following lines:

      mtupgrade disabled
       
      <script type="text/javascript" src="/new/media/system/js/mootools.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-buildspans.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-inputs.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-smartload.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-morearticles.js"></script>
      <script type="text/javascript" src="/new/modules/mod_roknavmenu/themes/fusion/js/fusion.js"></script>
       

      mtupgrade enabled
      <script type="text/javascript" src="/new/components/com_gantry/js/mootools-1.2.5.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-buildspans-mt1.2.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-inputs-mt1.2.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-smartload-mt1.2.js"></script>
      <script type="text/javascript" src="/new/components/com_gantry/js/gantry-morearticles-mt1.2.js"></script>
      <script type="text/javascript" src="/new/modules/mod_roknavmenu/themes/fusion/js/fusion-mt1.2.js"></script>
       

      I've found my way to change the first script loaded (mootools.js) according to the page but not the other scripts. I'm just searching for the files that is calling them..

      Anyone?

Time to create page: 0.061 seconds