the attached is a new module whose goal is to populate the specified subqueues with nodes. i run this after a run devel module's 'generate content'. this way, i can quickly get a new site up to speed. i propose that this module be added to the nodequeue package. i want each module to maintain its own 'generate' code, instead of putting it all on devel. note that votingapi similarly ships with a generate votes module.

remove the .txt extension from each attachment to try out the module.

Comments

merlinofchaos’s picture

Shouldn't this go into the devel package? (I mean, rather, Package = Devel rather than Package = Node Queue)

moshe weitzman’s picture

I think this is a toss up. Use whatever you prefer.

dww’s picture

I'm with merlin -- even though modules have to maintain their own generate code (which is wise), these devel-requiring generate modules still seem to make more sense grouped with devel than grouped with the corresponding module's package (if any). From an admin's point of view, you're more likely to want/need to use this module when doing devel-related stuff than when doing nodequeue-related stuff.

merlinofchaos’s picture

If we're going to do that, there should be a note stuck in devel.module to this effect. And I do think that's the right way to do it.

moshe weitzman’s picture

i will add such note to devel_generate

moshe weitzman’s picture

StatusFileSize
new131 bytes
new4.71 KB

attached patch now handles non smartqueue_taxonomy queues. also changed to package = Development

moshe weitzman’s picture

any comments?

dww’s picture

Status: Needs review » Needs work

Only looked at the patch, haven't tried testing it...

A) Seems like we want this to be more API-like, instead of forcing it all through a form. We went through all of this in devel itself. We want a nodequeue_generate_populate_queues() method or something, which the submit handler invokes, but which could also be called directly via install profiles, etc.

B) Isn't this better via hook_help(): $form['help'] = array('#value' => '<p>'. t('Select which node queues shall be <strong>emptied</strong> and re-populated with new nodes.'). '</p>');? I could be wrong, but I'd love to hear why. ;)

C) Looks like tabs or non-standard indentation for hook_menu().

merlinofchaos’s picture

Status: Needs work » Fixed

This looks pretty cool to me. Committed!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.