The Libraries API module for some time now is evolving to the standard way of including 3rd party libraries support. It has a lot of very useful features, but in our case we would mostly benefit from:

- The same library can be shared by more than one module/site. (hoverIntent in our case)
- Ease the process of upgrading a module that requires an external library. Just replace the module folder with the new one. No need to move the contained library out and back in (also see #1411250: Upgrade included hoverIntent library to r7 (currently shipping r5)).

I'm not suggesting to completely remove the included libraries we currently ship (these can be left in order to provide an out-of-the-box experience). All I'm saying is that we should allow included libraries' versions to be overridden by any available under /sites/all/libraries.

Thanx for considering this.

Comments

vordude’s picture

I'm not seeing a huge benefit here. Sorry, I haven't had any of the Libraries Kool-aide, If others had a strong argument, I'm still willing to hear it.

vordude’s picture

Status: Active » Closed (won't fix)
elBradford’s picture

This module isn't the only module a user might be using that will be using superfish or hoverintent js libraries. Allowing the library version to override local copies would ensure that the js isn't loaded multiple times. That's a big potential problem. As it is, I'm going to switch to the Superfish module since it utilizes the Library API. It's pretty obvious IMO.

xiukun.zhou’s picture

Status: Closed (won't fix) » Closed (fixed)

this problem already fix in 7.x-2.3 #http://drupal.org/node/1608510#

xiukun.zhou’s picture

this problem already fix in 7.x-2.3 [http://drupal.org/node/1608510]

xiukun.zhou’s picture

this problem already fix in 7.x-2.3 #1608510: Remove all drupal_add_js with hook_libraries

klonos’s picture

Status: Closed (fixed) » Active

...Sorry but I fail to see how this is fixed. Supporting the Libraries API module means that a user can simply download a fresh copy of a required library under /sites/all/libraries and that version will be detected and used automatically.

I've installed and enabled the module. Then downloaded the latest v7 of hoverIntent and tried placing it under my /sites/all/libraries/hoverIntent/jquery.hoverIntent.minified.js. I also downloaded the latest 1.7.2 of superfish and placed it under /sites/all/libraries/superfish/superfish.js

Cleared caches to make sure that no cached file is used and checked which versions of the libraries are loaded. It still loads hoverIntent v5 and superfish 1.4.8 from the modules directory. It should instead load the new ones I've added under /sites/all/libraries.

klonos’s picture

Status: Active » Fixed

This is fixed in latest dev. Thanx!

Yay!!!

klonos’s picture

Component: Code » Documentation
Category: feature » task
Status: Fixed » Active

...actually, lets document this in the README.txt:

Download plugins to:
site/all/libraries/jquery.hoverIntent/jquery.hoverIntent.js
site/all/libraries/jquery.bgiframe/jquery.bgiframe.js
site/all/libraries/superfish/superfish.js

PS: perhaps an update of both the CHANGELOG.txt as well as the UPGRADE.txt are in order.