On Wednesday 12 September 2007, Derek Wright wrote:
On Sep 12, 2007, at 2:17 PM, Larry Garfield wrote:
A single Drupal module to act as a controller / central repository for jQuery plugins, so that we don't have a dozen Drupal modules with the 20 lines of PHP (or whatever) needed to bootstrap the module just to call drupal_add_js().
Just to be clear, what I was proposing in the other thread about update(_status)? + jQuery plugins was that each jQuery plugin would have a .info file, and an *empty* .module file, only so that it showed up like a module with respect to update(_status)? and that the existing client code could check for newer versions of the plugins. My proposal wasn't at all concerned with the code to actually call drupal_add_js(), and I agree that a single plugin-manager would be better than a bunch of duplicated code for that.
That said, the single plugin manager might be able to handle the case that the empty .module files was meant to address, and populate the {system} table with some new records for each plugin, just so that update(_status)? knows they exist and can look for new releases...
Alternatively, we *could* modify the update(_status)? code to better handle this case, and, for example:
*snip* This sounds like something we'd want to talk over with John Resig and the jQuery folks. The ideal case would be a "plugins" directory that mirrors the way the modules directory works, complete with .info files that get loaded as needed by core/a core module/a contrib module that eventually moves to core. That would require some standardization and packaging on the jQuery side (since I don't think we want to be in the business of managing our own jQuery plugins. dww, are you going to be in Barcelona? If so, let's try and find some time to talk. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson