The Libraries API module simplifies the management of third party libraries and makes it easier to upgrade modules and themes by separating out the third party code from the module. Given the other things it provides, it might be worth allowing this this theme to integrate with it so that third party code can be managed consistently across the Drupal application.

Thanks,
Chris

Comments

natted’s picture

I wonder if this is better suited to be included with a partner module (similar to the original: http://drupal.org/project/twitter_bootstrap_ui )?

Otherwise, if you can provide any examples of themes that currently use the Libraries API directly, it'd be appreciated.

natted’s picture

I looked into this quickly and it seems like the latest dev version of libraries now allows themes to call hook_libraries_info(). Again, we'd need to explain to users to install the dev version when installing the theme, which is why a module might be a better solution (we can force dependencies more easily).

wundo’s picture

I hate the idea of enforcing a module, IMO we should just implement hook_libraries_info() and wait 'til they release a stable release.

natted’s picture

It wouldn't have to be enforced, just recommended, to guide/assist new users and get them setup in a consistent manner. Anyway, I'm probably taking this issue offtopic.

We can as mentioned just implement hook_libraries_info for now and recommend 2.x-dev version of libraries, so I'll look into providing a patch for this issue.

cpliakas’s picture

+1 to a soft dependency. Sorry if the OP wasn't clear on that.

I personally like natted's idea. In using this theme, I generally create a custom module dedicated to building out theme functions for the various components as well as some wrapper functions to easily create modals and tooltips. To me, it would be great to have a module that could be used as a component library which could depend on jQuery Update and Libraries API that could then be used with or without this theme. The benefit there would be that other contributed modules could use the various components, i.e. the dropdowns, modals, etc, without explicitly requiring this theme.

This theme could work with or without the component library module, however the two would be a natural fit to use with eachother. If this theme integrated (not required) on Libraries API, it would make it easier for both the module and theme to use the same library located in a consistent location.

So related to this issue, if this theme was Libraries API aware then it would foster contributions like the one mentioned above.

Just a thought,
Chris

cpliakas’s picture

Referencing #1838982: twitter_bootstrap_ui module, since there is some overlap in the discussions.

natted’s picture

@cpliakas I agree. I'm going to start a project as an optional addon. I think just for the libraries, modal and perhaps additional menu customisations, it will be useful. It's not to detract from this theme but to enhance it.

blackice2999’s picture

Hi natted,

> I'm going to start a project as an optional addon. <

i cant understand why you want to start a new project if there is already a library implementation in working process... i also asked at beginning if someone has ideas... i got no response from your team (only one more question about the module).

http://drupal.org/project/bootstrap_api

natted’s picture

Hi Blackice2999

Thanks for the reminder, I had been meaning to get back and look for your project. Definitely no need since you've already made progress. I'll take a look and see how I can help.

robertom’s picture

I hate the idea of enforcing a module, IMO we should just implement hook_libraries_info() and wait 'til they release a stable release.

See also #1876124: hook_libraries_info() still doesn't work with themes

I'm wondering what are the steps to integrate this theme with bootstrap_api

andregriffin’s picture

As of Libraries 7.x-2.1, themes are supported by hook_libraries_info.

andregriffin’s picture

Is anyone familiar with the libraries API? Could we move the bootstrap library into the "libraries" folder and perhaps even set up dependencies for jQuery Update?

blackice2999’s picture

Hi andregriffin,

or u use simple the bootstrap_api and add something like this:

drupal_add_library('bootstrap_api', 'bootstrap-api.all');

all JS Files will be loaded...

markhalliwell’s picture

zilla’s picture

i believe that kalatheme (also building on bootstrap) is one of the first to really use libraries api - may want to look there for insight into how it's being done, because it's working quite well, including support for wrap bootstrap themes, etc (though i haven't tried those yet)

https://drupal.org/project/kalatheme

hatuhay’s picture

Issue summary: View changes

An easy solution is to use the bootstrap library module, eventhough it is set as unsupported, there are no issues related to it

blackice2999’s picture

Hi hatuhay,

why one more module again? is nobody able to communicate with other maintainers?

hatuhay’s picture

Hi Blackice2999,
As both modules look the same, they behaive diferent.
Bootstrap Library just load both css and js using libraries.
You download the Bootstrap files as is directly from home page into the libraries folder.
This is a simple solution for specific requierements of users, not modules or themes.
Those cases are but not limited to:
- Not using any bootstrap theme.
- Need to load files locally, for example for response.js ie8 support.
- Want to update your bootstrap files without hacking or even updating your base theme.
For me using the CDN is a way better solution, but in the cases mentioned, this module gives a simple standard alternative. Better and simpler than saving Bootstrap files into a theme folder.
For some reason, under community perspective I cannot understand, the module has been declare unsupported for Bootstrap Theme, when I was unable to find a single issue related to it.
By the way, you can select loading the Bootstrap files or not, by theme or by path.

blackice2999’s picture

Hi hatuhay,

this could be all features of the bootstrap_api module 70% already included but for bootstrap 2.x all tries from me to get some co-working with other maintainer are without success... this is the point why i wrote "is nobody able to communicate with other maintainers?"

markhalliwell’s picture

@Blackice2999, @hatuhay:

Libraries support, and subsequently these modules, is not a necessary step. I am attaching the issue where this issue is being discussed as to why this is the case.