[development] jQuery 1.2 is released

Larry Garfield larry at garfieldtech.com
Wed Sep 12 15:07:37 UTC 2007

On Wed, 12 Sep 2007 07:28:05 -0400, Earnie Boyd <earnie at users.sourceforge.net> wrote:
> Quoting Larry Garfield <larry at garfieldtech.com>:
>> I'm not sure what Earl's plans are, but I can see a rather small contrib
> that
>> does the following:
>> - Provides a directory within it called "plugins", into which you place
>> whatever jquery plugins you want.
>> - Provides a page similar to admin/build/modules that lists the found
> plugins
>> and lets the admin enable/disable them.
>> - In hook_init(), adds the enabled plugins to the javascript queue.

Just a note, that's hook_init() in D6, which corresponds to the hook_menu $may_cache = FALSE semi-hack of D5. :-)

> Excuse my ignorance but why wouldn't the module system we already have
> suffice?  The .info file would allow for the enable/disable and each
> .module would add the enabled JS to the queue.

Because then you'd need a separate Drupal module, with some boilerplate PHP, for every JS plugin you want to install.  I'm talking about a small framework module that lets you manage what 3rd party JS plugins are installed.  The same PHP code in a half-dozen different modules is a very bad thing. :-)  (insert usual commentary about duplicate code here)

--Larry Garfield

More information about the development mailing list