New module: Module Priority
A user just asked me how to set a module's priority. Rather than walking them through the steps, I've decided to write a module. Has anyone worked on something similar?
What's the priority of a module? Throttling? Weighting? On 5/18/07, Darren Oh <darrenoh@sidepotsinternational.com> wrote:
A user just asked me how to set a module's priority. Rather than walking them through the steps, I've decided to write a module. Has anyone worked on something similar?
-- Regards, Johan Forngren :: http://johan.forngren.com/
On 18.05.2007, at 14:15, Johan Forngren wrote:
What's the priority of a module? Throttling? Weighting?
I'd say the weight column in {system}. For example, if you want to form_alter another module's form, your module has to come later in the workflow. Modules are first sorted by weight, then alphabetically. Konstantin Käfer – http://kkaefer.com/
What's the priority of a module? Throttling? Weighting?
Weighting, I'd assume. -- Morbus Iff ( think about the good things that I did for you ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.com/ aim: akaMorbus / skype: morbusiff / icq: 2927491 / jabber.org: morbus
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe. William On 5/18/07, Johan Forngren <johan@forngren.com> wrote:
What's the priority of a module? Throttling? Weighting?
On 5/18/07, Darren Oh <darrenoh@sidepotsinternational.com > wrote:
A user just asked me how to set a module's priority. Rather than walking them through the steps, I've decided to write a module. Has anyone worked on something similar?
-- Regards, Johan Forngren :: http://johan.forngren.com/
On May 18, 2007, at 8:26 AM, William Smith wrote:
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
You can ask for ownership of the module and upgrade it to version 5. And yes, I do think this should be in core. On 5/18/07, Darren Oh <darrenoh@sidepotsinternational.com> wrote:
On May 18, 2007, at 8:26 AM, William Smith wrote:
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
+1 I agree that it belongs in core. On May 18, 2007, at 14:38 , Darren Oh wrote:
On May 18, 2007, at 8:26 AM, William Smith wrote:
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
On 18 May 2007, at 2:40 PM, Wim Leers wrote:
I agree that it belongs in core.
it seems a bit hardcore for core. ie: it's only useful when something goes wrong. Wouldn't devel be a better place for this, with all it's diagnostic abilities.
adrian rossouw wrote:
it seems a bit hardcore for core.
ie: it's only useful when something goes wrong.
Wouldn't devel be a better place for this, with all it's diagnostic abilities. Agreed here. While i do like the ability to give people this control putting it in core seems to imply that you should be comfortable moving these weights around which can and will cause unexpected errors that will not be fun to diagnose for bug reports. As valuable as i think it is, I don't recommend placing this functionality in core but i think that the devel module is a perfect home for it.
-- Michael Favia michael@favias.org tel. 512.585.5650 http://michael.favias.org
I agree. It's only necessary for relatively complex sites anyway. But I disagree that it should be part of devel. IMHO, it should be a / submodule/ in devel, so you don't have to enable devel itself (which can slow down your site noticeably). On May 18, 2007, at 18:11 , Michael Favia wrote:
adrian rossouw wrote:
it seems a bit hardcore for core.
ie: it's only useful when something goes wrong.
Wouldn't devel be a better place for this, with all it's diagnostic abilities. Agreed here. While i do like the ability to give people this control putting it in core seems to imply that you should be comfortable moving these weights around which can and will cause unexpected errors that will not be fun to diagnose for bug reports. As valuable as i think it is, I don't recommend placing this functionality in core but i think that the devel module is a perfect home for it.
-- Michael Favia michael@favias.org tel. 512.585.5650 http://michael.favias.org
I agree that it is not really a constant use module, so it shouldn't really go in core. A more normal use case is that you turn on this module, get the module weighting correct and then turn it off again. I think the devel would be a better place to incorporate this functionality. ________________________________ From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of adrian rossouw Sent: Friday, May 18, 2007 7:27 AM To: development@drupal.org Subject: Re: [development] New module: Module Priority On 18 May 2007, at 2:40 PM, Wim Leers wrote: I agree that it belongs in core. it seems a bit hardcore for core. ie: it's only useful when something goes wrong. Wouldn't devel be a better place for this, with all it's diagnostic abilities.
+1 on devel contrib. It still provides a lot more visibility for the project than leaving it as a regular contrib module, given devel module's install base. And really, the type of people who are going to be playing with module weights are by and large developers. On 5/18/07, Greg Holsclaw <Greg.Holsclaw@trouvemedia.com> wrote:
I agree that it is not really a constant use module, so it shouldn't really go in core. A more normal use case is that you turn on this module, get the module weighting correct and then turn it off again.
I think the devel would be a better place to incorporate this functionality.
------------------------------
*From:* development-bounces@drupal.org [mailto: development-bounces@drupal.org] *On Behalf Of *adrian rossouw *Sent:* Friday, May 18, 2007 7:27 AM *To:* development@drupal.org *Subject:* Re: [development] New module: Module Priority
On 18 May 2007, at 2:40 PM, Wim Leers wrote:
I agree that it belongs in core.
it seems a bit hardcore for core.
ie: it's only useful when something goes wrong.
Wouldn't devel be a better place for this, with all it's diagnostic abilities.
we already have a nice small module for this. it is called moduleweight (as mentioned earlier). we are not moving this functionality into devel. William Smith wrote:
+1 on devel contrib. It still provides a lot more visibility for the project than leaving it as a regular contrib module, given devel module's install base. And really, the type of people who are going to be playing with module weights are by and large developers.
On 5/18/07, *Greg Holsclaw* <Greg.Holsclaw@trouvemedia.com <mailto:Greg.Holsclaw@trouvemedia.com>> wrote:
I agree that it is not really a constant use module, so it shouldn't really go in core. A more normal use case is that you turn on this module, get the module weighting correct and then turn it off again.
I think the devel would be a better place to incorporate this functionality.
* From: * development-bounces@drupal.org <mailto:development-bounces@drupal.org> [mailto: development-bounces@drupal.org <mailto:development-bounces@drupal.org>] *On Behalf Of *adrian rossouw *Sent:* Friday, May 18, 2007 7:27 AM *To:* development@drupal.org <mailto:development@drupal.org> *Subject:* Re: [development] New module: Module Priority
On 18 May 2007, at 2:40 PM, Wim Leers wrote:
I agree that it belongs in core.
it seems a bit hardcore for core.
ie: it's only useful when something goes wrong.
Wouldn't devel be a better place for this, with all it's diagnostic abilities.
I have taken over the Module Weight project. A Drupal 5 release should be available tomorrow. If another project wants to include this functionality, I would be happy to deprecate it. On May 18, 2007, at 2:53 PM, Moshe Weitzman wrote:
we already have a nice small module for this. it is called moduleweight (as mentioned earlier). we are not moving this functionality into devel.
On Friday 18 May 2007 20:38, Darren Oh wrote:
Yes, I found it: http://drupal.org/project/moduleweight.
Relevant handbook page: http://drupal.org/node/110238 yours, Augustin. -- http://www.wechange.org/ Because we and the world need to change. http://www.reuniting.info/ Intimate Relationships, peace and harmony in the couple.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core? Does anyone agree that if there is a core effort, it should go towards hook ordering and chx's before/after code in his sandbox (I haven't looked at it in a while, but it seemed promising)? This should all be done at the code level IMHO and not an admin interface. Module weighting only gets us so far and I think a much more dynamic solution is allowing mymodule to say hook_foo goes before contribmodule's hook_foo, but mymodule hook_bar goes after contribmodule's hook_bar.
Also, with some sort of weighted hook registry, my module could disable another module's hook for real edge cases. But, I'll need to think of a use-case as maybe I'm just talking out my arse. Anyone think this is useful? Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Darren Oh wrote:
On May 18, 2007, at 8:26 AM, William Smith wrote:
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
Darren Oh wrote:
On May 18, 2007, at 8:26 AM, William Smith wrote:
Weighting. Darren Oh, I do seem to remember there being a "module weight" module out there somewhere. For 4.7, I believe.
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
+1 for an update/upgrade to an existing module -1 for core -1 for adding it to dev module +1 for adding it to a list of modules in a drupal dev profile/distro. andre
Yes, I found it: http://drupal.org/project/moduleweight. It hasn't been updated since it was released. Shouldn't a feature like this be in core?
-1 for this module. We have added weight to system when we realized you can't alter taxonomy forms because it's added in taxonomy_form_alter . People asked for an UI --someone even submitted a core patch -- and I never understood the reasoning. Your install hook shall set it _relative_ to other modules. I have the code ready in my sandbox for half a year that would add before/add instead of manually setting weight once module registry lands. Regards NK
On May 18, 2007, at 6:54 PM, Karoly Negyesi wrote:
-1 for this module. We have added weight to system when we realized you can't alter taxonomy forms because it's added in taxonomy_form_alter . People asked for an UI --someone even submitted a core patch -- and I never understood the reasoning. Your install hook shall set it _relative_ to other modules.
The problem is that a module developer can't predict what other modules will be used on a site or how the administrator wants them to interact. Besides, it turns out that the module already existed, so there is no new module.
I have the code ready in my sandbox for half a year that would add before/add instead of manually setting weight once module registry lands.
For some recent development to the video module we had to explicitly alter the weight of some modules in order to create the expected submission flow interaction between submodules. As example: video upload -> video thumbnailing -> video transcoding -> video storage All of this implemented by submodules which expect that the data provided by the "before module" already are available. A before/add feature would be really useful for us and I'm sure there are lot more scenarios that would surely benefits from this. Fabio Varesano
Same here, for a site im building, I must do: Simplefeed -> Custom module for hierarchical clustering -> custom module for scoring -> custom module to create and save nodes based on that -> recalculate preempt panels cache. I agree that this is advanced. But i'd love a module with a javascript drag and drop interface; i shouldnt have to manually update obscure and underdocumented database fields for that, shouldnt I? :) I vote for leaving it in moduleweight.module. Michael Imbeault CHUL Research Center (CHUQ) 2705 boul. Laurier Ste-Foy, QC, Canada, G1V 4G2 Tel: (418) 654-2705, Fax: (418) 654-2212 Fabio Varesano wrote:
I have the code ready in my sandbox for half a year that would add before/add instead of manually setting weight once module registry lands.
For some recent development to the video module we had to explicitly alter the weight of some modules in order to create the expected submission flow interaction between submodules.
As example: video upload -> video thumbnailing -> video transcoding -> video storage
All of this implemented by submodules which expect that the data provided by the "before module" already are available.
A before/add feature would be really useful for us and I'm sure there are lot more scenarios that would surely benefits from this.
Fabio Varesano
participants (17)
-
adrian rossouw -
Andre Molnar -
Ashraf Amayreh -
Augustin (Beginner) -
Darren Oh -
Fabio Varesano -
Greg Holsclaw -
Johan Forngren -
Karoly Negyesi -
Konstantin Käfer -
Michael Favia -
Michael Imbeault -
Morbus Iff -
Moshe Weitzman -
Rob Barreca -
William Smith -
Wim Leers