sites/<site>/libraries: Standard place for thirdparty module requirements

naught101 - June 19, 2009 - 13:07
Project:Drupal
Version:7.x-dev
Component:base system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Issue tags:Libraries
Description

There are a number of modules that require thirdparty tools or resources. These tools are usually stored in a sub-directory of the module directory. These tools should all be stored in a standard directory:
sites/all/libraries/*, or
sites/<site>/libraries/*

Some examples:

Reasoning:

  1. Multiple modules might use the same resources, better to have a standardised, centralised place to look for those tools/resources.
  2. Resources aren't disturbed when modules are updated.
  3. It's neater and easier.

#1

sun - June 21, 2009 - 23:54
Status:active» duplicate

Marking as duplicate of http://drupal.org/project/libraries.

We have to properly sort this out in contrib first and Libraries API will be the common denominator for all those modules.

However, thanks for taking the time to report this issue.

#2

anarcat - July 30, 2009 - 23:58
Version:6.x-dev» 7.x-dev
Status:duplicate» postponed

I don't think this should be closed just yet. Having all those modules depend on the Libraries module is going to be slightly annoying, why not push for inclusion into core? It's like 50 lines of code from what I can see...

So I'm marking this as 'postponed' while contrib shakes it off, but I think this should be targeted before the freeze. I have opened an issue with the Libraries module to see what's missing before core inclusion: #536126: target core inclusion for D7.

#3

sun - July 31, 2009 - 01:05
Status:postponed» duplicate

It's 50 lines of code, because I didn't have the time to focus on development yet.

Properly supporting *external* libraries is a major challenge. There are multiple ways to achieve it, and Libraries API wants to provide an API to support all ways. If you read #315100: Allow to add JS/CSS libraries (sets of files, settings, and dependent libraries) more closely, then you can learn that support for external libraries was purposively left out from that patch.

Reverting status. Neither Libraries API nor Drupal core are ready for this yet.

And with "ready" I mean concepts, architecture, technology, and paradigm.

 
 

Drupal is a registered trademark of Dries Buytaert.