Page 1 of 1

Re: Question on plugin dependencies

Posted: Wed Jan 24, 2007 10:06 am
by garvinhicking
Hi!
RobA wrote:Is there anyway top make plugins dependent on each other?
Yes. Set a $this->dependencies array within the introspect() method of a plugin. Search through existing plugins for that keyword, you'll fine ones like staticpage or templatechooser :)

HTH,
Garvin

Posted: Wed Jan 24, 2007 3:30 pm
by garvinhicking
Hi!

Yes, plugins listed in the dependency will be activated. I'm not sure if it would use Spartacus to download the plugins though (because that would possible create large dependency sets and many downloads)...

I'm not exactly sure if a plugin would complain if a dependency is not available, though. :(

Best regards,
Garvin

Posted: Wed Jan 24, 2007 4:03 pm
by garvinhicking
Hi!

Via PHP you can check "if (class_exists('serendipity_event_geotag'))" for example?

We should check how the current plugin API manages unmet dependencies. IIRC I did implement a failsafe so that a pluginw ould not be loaded, but I'm lacking the time to check how it's currently handled :)

Best regards,
Garvin