Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorFyorl
    • CommentTimeJan 23rd 2008 edited
     # 1
    Inspired by [-Stash-]'s jQuery extension, this extension wraps up all the various Mootools components that any of your installed extensions need, puts it in one file, packs it, then puts it at the top of any extension-added javascripts.

    This means that you no longer have 5 extensions all adding their own mootools libraries to each page resulting in a 200kb download for each user. Instead you have one, small mootools.js sitting at the top, ready to be used by any javascript files that follow it.

    It packs the minimum amount of components, just enough so that every extension should work perfectly without bloating page load times. It also dynamically finds which components are needed on each page and will only load those so that you don't have a thousand lines of unused javascript framework sitting in the page's header.

    Once you install this, make sure you make the Mootools/cache folder writeable. Use chmod 777 if you're not sure.

    Extensions that use this
    Live Discussions
    Collapsible Panel
    User Info
    System Message

    Note: These extensions do not require this one however it is highly recommended that you use them in conjunction with this for increased compatibility and performance.

    Developers
    All you have to do to make your extension use this is something like the following (taken from the User Info extension):
    if(!function_exists('MT_AddComponent')) {
    $Head -> AddScript('extensions/UserInfo/mootools.js');
    } else {
    MT_AddComponent('Tips', 'Element.Selectors');
    }
    $Head -> AddScript('extensions/UserInfo/userinfo.js');

    First, make sure the function exists. If not then load your backup mootools.js file. If it does exist then just pass it a list of the Mootools components you need (as seen on the Mootools download page). The script will handle any and all dependencies so you only have to list the bare minimum components.

    Hey Presto! 'userinfo.js' will have the Mootools library at its disposal and so will any other extension's javascript if it needs it.

    A Word of Warning
    Some extension's javascript files are a tad incompatible with Mootools. Not to name names or anything but YellowFade's 'functions.js' effectively kicks Mootools' Window.DomReady event in the face. To remedy this, the script relegates function.js to the bottom of the script list so it gets called last. This means that Window.DomReady and the YellowFade effect both work.

    There will be other cases like this so, if you find any, don't hesitate to contact me and I'll attempt to fix them.

    Compatibility
    Special code has been written within the Mootools extension to ensure that the following extensions work with this one:
    Yellow Fade
    Smooth Page Jump
    Discussion Tags
    Low-Cal Vanilla
    Page Manager

    Credits
    Mootools, it's cute and loveable
    Dean Edward's Packer, the PHP 4 version because not everyone has PHP 5
  1.  # 2
    Uploaded version 1.1 of Mootools.
  2.  # 3
    Uploaded version 1.2 of Mootools.
  3.  # 4
    Uploaded version 1.2 of Mootools.
  4.  # 5
    Uploaded version 1.3 of Mootools.
    •  
      CommentAuthorFyorl
    • CommentTimeFeb 11th 2008
     # 6
    As of 1.3 is compatible with SmoothPageJump and fixes problems on the Settings > Roles/Categories.
  5.  # 7
    Uploaded version 1.4 of Mootools.
    •  
      CommentAuthorKrak
    • CommentTimeFeb 21st 2008
     # 8
    Question: you say "The script will handle any and all dependencies so you only have to list the bare minimum components." Exactly how? Do I need to specify which ones I need in reverse order (from the mootools download list)? I've got an addon that uses Fx.Slide, Window.DomReady, and Element.Selectors. Those are the minimums. Everything else is added (to the download list) thats required after selecting those. I tried that and couldn't get it to work, tried adding a couple extras too just in case, still didn't work. The only thing I didn't add was core, class, and native.

    Thoughts?
    •  
      CommentAuthorFyorl
    • CommentTimeFeb 21st 2008 edited
     # 9
    It takes a page refresh for Mootools to force itself to the top of the extension list. Other than that I can't see what would be the problem. If you only need Fx.Slide, Window.DomReady and Element.Selectors then all you need to do is call:
    MT_AddComponent('Fx.Slide', 'Window.DomReady', 'Element.Selectors');
    All the dependencies will be added automatically. Also, it shouldn't matter which order you list them in.
  6.  # 10
    Uploaded version 1.5 of Mootools.
  7.  # 11
    Uploaded version 1.6 of Mootools.
  8.  # 12
    Uploaded version 1.7 of Mootools.
    •  
      CommentAuthorFyorl
    • CommentTimeMar 2nd 2008
     # 13
    It's much smaller as of 1.7 because I cut out all the cache files that were left over from testing. I've modified my build script so that it shouldn't happen again.
  9.  # 14
    mootools.class.php still refers to the cache files.
    •  
      CommentAuthorFyorl
    • CommentTimeMar 2nd 2008
     # 15
    It still uses them, yes. What I meant was that it was generating files and putting them in the cache while I was testing. When I built the extension, it copied those files into the extension archive so it had a bunch of unnecessary files that were using up space.
    • CommentAuthorfysicsluvr
    • CommentTimeMar 2nd 2008 edited
     # 16
    then why am I getting this:


    Warning: fopen(/path/to/vanilla/extensions/Mootools/cache/ca036f01dda60efb1edcb6f8cf8400e7): failed to open stream: No such file or directory in /path/to/vanilla/extensions/Mootools/mootools.class.php on line 82

    Warning: fwrite(): supplied argument is not a valid stream resource in /path/to/vanilla/extensions/Mootools/mootools.class.php on line 83

    Warning: fclose(): supplied argument is not a valid stream resource in /path/to/vanilla/extensions/Mootools/mootools.class.php on line 84

    last minute thought:
    does the cache folder need to be writable? I don't think the download came with an empty cache folder

    EDIT:

    yea that fixes it .. I don't know that I did that for any of the previous versions ... oops

    now the collapsible panel works, except that there isn't a (+) / (-) icon, but when you click on the title of a panel, it collapses or re-expands.
    •  
      CommentAuthorFyorl
    • CommentTimeMar 2nd 2008
     # 17
    Yup, I ran into your above error when I did a local install. I've added a section to the readme about making the cache folder writeable now.

    I don't think Collapsible Panel ever had [+] or [-] icons. Might add it to the to-do list though although it might inhibit support for other themes.
  10.  # 18
    Oh, i saw when it uploaded add.png, and I thought it was for the (+) / (-) button, but now I see that it's for settings -> configure collapsible panel -> exceptions. my bad. it's good without (+) / (-) icons, I just thought it was something going wrong on my install.

    overall excellent extension --- now that I got it working; lol. (it was probably the cache issue all along)
    •  
      CommentAuthorFyorl
    • CommentTimeMar 2nd 2008
     # 19
    Heh, I'm really glad to finally be rid of that bug. Ø had had it for ages and I spent so long trying to fix it. The worst part is that, in order to fix the bug, I had to type one extra character... an '&' to be specific. The problem is that I think you're using PHP 4 and I was testing on a PHP 5 server which meant that objects behaved slightly differently. I was passing the $Head object by reference (as opposed to by value) throughout the Mootools class but I forgot to pass it by reference in the delegate function. That's ok for PHP 5 which passes objects by reference by default but for PHP 4 you have to explicitely tell PHP to do that.

    And as a bonus, I also found out why the extension was so huge (after going over the 198k limit). I cleared out the cache folder which unluckily caused your cache issue.

    I might get a rest now...
  11.  # 20
    I'm just glad you aren't one of those programmers that throws some code out with infinity plus one errors and abandons it. Actually the lussumo community in general isn't that way.
  12.  # 21
    Uploaded version 1.8 of Mootools.
    •  
      CommentAuthorØ
    • CommentTimeMar 3rd 2008
     # 22
    Just to let you know... With this latest version everything seems to work: Live Discussions, Collapsible Panel, Yellow Fade... and even Smooth Page Jump!

    Thanks a lot for your hard work, you rock :)
    •  
      CommentAuthorKrak
    • CommentTimeMar 3rd 2008
     # 23
    After you updated it the issue I was having with my extension (Hidden Text 2) is now gone as well.
    •  
      CommentAuthorØ
    • CommentTimeMar 4th 2008
     # 24
    Hey, I have a tiny problem with something apparently related to Mootools. I've tweaked a bit Smooth Page Jump in order to enable it on the blog page created with BlogThis (I've just added 'extension.php' in the array) and it works.

    Thus Firebug gives me a strange error which seems to have something to do with a Mootools cached file. It looks like this:

    this.getStyle is not a functione("marginTop")
    each(function())prototype.lite.js (line 124)
    e("margin")ea7d055e4a28c35ad... (line 1)
    e("margin")ea7d055e4a28c35ad... (line 1)
    $each(["margin"], function(), undefined)ea7d055e4a28c35ad... (line 1)
    e(ul, "getStyle", ["margin"])ea7d055e4a28c35ad... (line 1)
    e()ea7d055e4a28c35ad... (line 1)
    e(ul, Object duration=500)ea7d055e4a28c35ad... (line 1)
    e()ea7d055e4a28c35ad... (line 1)
    e()ea7d055e4a28c35ad... (line 1)
    Start(h2)slidepanel.js (line 28)
    bind()prototype.lite.js (line 25)
    each(function())prototype.lite.js (line 124)
    Start()slidepanel.js (line 44)
    (no name)()slidepanel.js (line 59)
    e()ea7d055e4a28c35ad... (line 1)
    e(undefined)ea7d055e4a28c35ad... (line 1)
    e(function())ea7d055e4a28c35ad... (line 1)
    each(function())prototype.lite.js (line 124)
    e("domready", undefined, undefined)ea7d055e4a28c35ad... (line 1)
    e()ea7d055e4a28c35ad... (line 1)
    e()ea7d055e4a28c35ad... (line 1)
    e(DOMContentLoaded )ea7d055e4a28c35ad... (line 1)
    [Break on this error] eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a...
    ea7d055e4a28c35ad... (line 1)


    Not really a problem since it works anyway, but this error keeps appearing. Maybe is it more related to Smooth Page Jump?
    •  
      CommentAuthorFyorl
    • CommentTimeMar 4th 2008 edited
     # 25
    Could be. It did mention prototype.lite.js which is included by the Smooth Page Jump extension. Mootools is supposed to remove this and replace it with a Mootools version. I think Mootools is setup to remove those scripts if it's on the search or comments page. I think perhaps with BlogThis, Smooth Page Jump is being loaded on a different page. It should just be a matter of adding the new page to the if statement.

    @Krak: Yeah, I'm guessing Hidden Text 2 used a bit of javascript. If there are any errors with any of the javascript scripts then usually none of the rest will work either.
    • CommentAuthorIanTearle
    • CommentTimeMar 12th 2008
     # 26
    Any ideas why i would be getting a "there was a problem authenticating your post information" message when activating the extension?
    •  
      CommentAuthorFyorl
    • CommentTimeMar 21st 2008
     # 27
    Uhm nope, it's never been reported before. Are you only getting this error with this extension or are there others?
    • CommentAuthormiquel
    • CommentTimeMar 29th 2008 edited
     # 28
    CommentLinks seems to crash when having mootools & UserInfo extensions enabled

    also getting this when I've disabled both:

    Notice: Undefined index: Head in /opt/lampp/htdocs/xampp/Vanilla-1.1.4/extensions/Mootools/appendix.php on line 2
    • CommentAuthormiquel
    • CommentTimeMar 31st 2008
     # 29
    umm, Fyorl seems to be missing... :(

    help!
    • CommentAuthorirmanhilmi
    • CommentTimeApr 26th 2008
     # 30
    i get this error today. it was working fine for at least 2days.

    include($Configuration['EXTENSIONS_PATH']."Mootools/appendix.php");

    i disabled Mootools, but right now i cannot enable ANYof my extensions. anyone got an idea?
    • CommentAuthorirmanhilmi
    • CommentTimeApr 26th 2008
     # 31
    nevermind. i found the problem. in the conf/extensions.php folder there was only one line=
    "include($Configuration['EXTENSIONS_PATH']."Mootools/appendix.php");"

    deleted that and it was fine, but i lost all my extensions settings, so now i have to reinstall them and make sure extensions.php is working properly.

    anybody knows why this happens?
    • CommentAuthorZen
    • CommentTimeMay 11th 2008
     # 32
    hi irmanhilmi, you are not the only one!

    I own a very large forum and I have not yet figured out why this happens periodically!

    The extensions.php file resets itself and puts the above message into it.

    The result are a broken extension file which leads to having to manually edit the file with "<?php ?>" and then enabling all of the extensions again!

    Could you please solve this issue?

    Thank you.
    Unfortunately I am using PHP4.
    • CommentAuthorZen
    • CommentTimeMay 11th 2008
     # 33
    Is there anybody smart out there who has at least an Idea to solve this problem?
    • CommentAuthorZen
    • CommentTimeMay 12th 2008
     # 34
    Error Message (this is the trash data in extensions.php), periodically:

    include($Configuration['EXTENSIONS_PATH']."Mootools/appendix.php");
    include($Configuration['EXTENSIONS_PATH']."Mootools/default.php");
    • CommentAuthormiquel
    • CommentTimeMay 12th 2008
     # 35
    I looked a bit at the code but didn't discover where the appendix line was added :S
    • CommentAuthortannerc
    • CommentTimeMay 13th 2008
     # 36
    such a great extension.. i cant stand that i cant use it anymore...due to the (seemingly) random above mentioned issue.
    I anint complaining though..vanilla maker and all you ex.t makers are pretty cool for doing this.. all free..
    • CommentAuthorfysicsluvr
    • CommentTimeMay 13th 2008
     # 37
    Yes, but you almost never hear the positive feedback, only the negative.

    I use it and it works just dandy!
    • CommentAuthorZen
    • CommentTimeMay 16th 2008 edited
     # 38
    Ok, temporary solution which worked has been found:

    Deactivated the plugin and deleted it. ;-)

    Seems like it doesn't work well with PHP4 or something else on my Server.
    • CommentAuthorZen
    • CommentTimeJun 15th 2008
     # 39
    Unfortunately the same happens at a decent PHP5 webhost!

    Any advices?

    Thanks,
    Zen
Add your comments
    Username Password
  • Format comments as