Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[Solved] Multiple mootools - not good!


  #1  
Old Aug 17, 2009, 03:40 AM
jack96161's Avatar
jack96161
 
66 posts · May 2009
In the Header configuration & styling section of this forum I described how to replace the default header image with a sliding door menu - http://forum.bytesforall.com/showthread.php?t=2837. That feature uses mootools, a nifty library with a host of useful features. There were problems with using mootools as well as jquery, which were solved by making sure that jquery is loaded prior to mootools, but with that taken care of, it all works.

Since then, I wanted to add a very elegant slide gallery, SuperSlider-Show (http://wordpress.org/extend/plugins/superslider-show/), which as it happens, also makes use of mootools. At first, the gallery refused to work no matter how I played with the options. After hours of cut and try, I noticed that mootools was being loaded by both my sliding door menu and SuperSlide-Show, so I removed the statement from the sliding door code, loaded the gallery page, and viola! Everything worked perfectly - the menu and the gallery. BUT, on every other page, the sliding door menu refused to slide. After more hours and gallons of coffee, I found a solution:

The SuperSlider-Show WP plugin has a configuration option to disable its loading mootools in case someone else has done so already - that got my sliding door menus working on all pages, but now the SuperSlider-Show gallery was broken again! What I did was go back to the Atahualpa Theme Options->Add HTML/CSS Inserts->HTML Inserts: Header, and replaced my old call to load mootools:
<script type="text/javascript" src="http://www.yourdomain.com/
wp-content/themes/atahualpa/imagemenu/mootools.js"></script>
with the code that the SuperSlider-Show plugin would have used had I not disabled it:
<script type='text/javascript' src='http://www.yourdomain.com/wp-content/plugins/superslider-show/js/mootools-1.2.3-core-yc.js?ver=1.2.3'></script>
<script type='text/javascript' src='http://www.yourdomain.com/wp-content/plugins/superslider-show/js/mootools-1.2.3.1-more.js?ver=1.2.3'></script>
Magic! It all works - sliding menus, gallery plugin, the works. Notice that newer and more complete mootools libraries are loaded this time, but the sliding menu doesn't seem to mind. I'll update my note on the sliding door menu feature to warn others of potential mootools conflicts.

I guess the lessons learned are: jquery has to load prior to mootools; two copies of mootools don't play well together; and some plugins using mootools need the complete set of libraries, not just the core.

Now, if we can just get the plugin authors to check for previously loaded tool libraries, see if they are usable for their code, and conditionally avoid multiple copies (and warn us if the previously loaded versions are insufficient), life would be much easier!

Jack
[If I ever get serious about writing a new plugin myself someday, those words may come back and bite me!]

Last edited by jack96161; Aug 17, 2009 at 03:51 AM.

Bookmarks

Tags
gallery plugin, mootools, sliding door menu, superslider-show

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Categories, Multiple versions of Altahualpa Jaguwar Atahualpa 3 Wordpress theme 16 Apr 27, 2010 09:55 AM
Negative margin for horizontal bars in header - good or bad? upscho Header configuration & styling 4 Jul 20, 2009 05:53 AM
multiple post pages michael close Forum How-To 3 Jun 23, 2009 08:03 PM
Multiple / Alternate Sidebars ??? Shepherd Jim Sidebars & Widgets 7 Jun 10, 2009 08:34 AM
Deleting multiple entries HenryGomez Installing & running WordPress 3 Apr 15, 2009 02:59 AM


All times are GMT -6. The time now is 06:01 AM.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.