I very much expected to find "best practices" for extending modules, but I haven't. Does anyone have any pointers to resources or advice? It's great that Drupal itself is modular, but if I want to add a little something to a module that already does 90% of what I want, it seems there ought to be a standard way to do this without forking it. Wrapping a module I can imagine how to do, and overriding or adding functions as needed, but it seems there could be a way to do this without having to define every function and pass it through. At least I hope to find recommendations on how to do this. Thanks for any help, Ben Melançon of Agaric Design http://agaricdesign.com/
Several modules provide hooks as core does. These are easily extensible. Gabor On Fri, 7 Jul 2006, Benjamin Maurice wrote:
I very much expected to find "best practices" for extending modules, but I haven't.
Does anyone have any pointers to resources or advice?
It's great that Drupal itself is modular, but if I want to add a little something to a module that already does 90% of what I want, it seems there ought to be a standard way to do this without forking it.
Wrapping a module I can imagine how to do, and overriding or adding functions as needed, but it seems there could be a way to do this without having to define every function and pass it through. At least I hope to find recommendations on how to do this.
Thanks for any help,
Ben Melan�on of Agaric Design http://agaricdesign.com/
On Friday 07 July 2006 08:23, Gabor Hojtsy wrote:
Several modules provide hooks as core does. These are easily extensible.
And if that fails, try submitting feature requests (with supporting patches) to the module issue page. Personally, when people ask for a feature and then back it up with some help implementing it, I am MUCH more open to suggestions. --Vernon
Gabor
On Fri, 7 Jul 2006, Benjamin Maurice wrote:
I very much expected to find "best practices" for extending modules, but I haven't.
Does anyone have any pointers to resources or advice?
It's great that Drupal itself is modular, but if I want to add a little something to a module that already does 90% of what I want, it seems there ought to be a standard way to do this without forking it.
Wrapping a module I can imagine how to do, and overriding or adding functions as needed, but it seems there could be a way to do this without having to define every function and pass it through. At least I hope to find recommendations on how to do this.
Thanks for any help,
Ben Melançon of Agaric Design http://agaricdesign.com/
A great place to start learning about piggybacking on other modules is the hook_nodeapi and hook_form_alter hooks. Those should allow you to do most of what you want. But if the functionality belongs in the module, submit a patch and help that module become better. Good luck, Rob Roy Barreca Electronic Insight Corporation 12526 High Bluff Drive, Suite 300 San Diego, CA 92130 http://www.electronicinsight.com rob@electronicinsight.com Benjamin Maurice wrote:
I very much expected to find "best practices" for extending modules, but I haven't.
Does anyone have any pointers to resources or advice?
It's great that Drupal itself is modular, but if I want to add a little something to a module that already does 90% of what I want, it seems there ought to be a standard way to do this without forking it.
Wrapping a module I can imagine how to do, and overriding or adding functions as needed, but it seems there could be a way to do this without having to define every function and pass it through. At least I hope to find recommendations on how to do this.
Thanks for any help,
Ben Melançon of Agaric Design http://agaricdesign.com/
Rob Barreca wrote:
A great place to start learning about piggybacking on other modules is the hook_nodeapi and hook_form_alter hooks. Those should allow you to do most of what you want. Personally, I'm a big fan of the functions in module.inc. See this: http://api.drupal.org/api/4.7/file/includes/module.inc
my guess is module_invoke is the best place for you start. Best, Nick Lewis http://www.nicklewis.org
Benjamin Maurice wrote:
I very much expected to find "best practices" for extending modules, but I haven't.
Does anyone have any pointers to resources or advice?
It's great that Drupal itself is modular, but if I want to add a little something to a module that already does 90% of what I want, it seems there ought to be a standard way to do this without forking it.
Wrapping a module I can imagine how to do, and overriding or adding functions as needed, but it seems there could be a way to do this without having to define every function and pass it through. At least I hope to find recommendations on how to do this.
Thanks for any help,
Ben Melançon of Agaric Design http://agaricdesign.com/
participants (5)
-
Benjamin Maurice -
Gabor Hojtsy -
Nick Lewis -
Rob Barreca -
Vernon Mauery