nodequeue_block.module was being created in order to put the drag/drop nodequeue admin interfaces into blocks so we could do things like add them to dashboards and sidebars (avoiding the trip to a separate administration screen).

See:
#859700: Put admin interface in block
#1105504: Make form_id unique on each nodequeue admin form

We finished this last Thursday and have it working on the 6.x-2.9 version of nodequeue. Then the 6.x-2.10 version was released and there were lots of changes, so this doesn't work with anything but 2.9 currently.

I'd appreciate some help updating this to work with the 2.10 version, but in the meantime please test on 2.9.

Use the attached patch on nodequeue.module itself, which will create a submodule called "nodequeue_block.module) and will patch nodequeue's .js and .module file to work with multiple blocks on a page.

I'd love to see this make it as a submodule in the official nodequeue package after some additional work.

Comments

amateescu’s picture

Version: 6.x-2.9 » 6.x-2.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.15 KB

And here's the simplified patch after http://drupal.org/node/1105504#comment-4528180

Rob_Feature’s picture

Awesome! I'll test this out with the new dev version. Any chance this will make it into the main nodequeue package?

amateescu’s picture

Probably only in the 6.x branch. For 7.x I think we should use contextual links for this job.

Rob_Feature’s picture

Status: Needs review » Needs work

Just ran the patch and it seems like something's not right with the way the nodequeue_block module is arranged in the nodequeue directory. The path is b/module/nodequeue_block

I'd assume it should be addons/nodequeue_block

Haven't tested the actual functions yet, doing that now.

Rob_Feature’s picture

Hmm...nogo. I get the following error when trying to view a page which includes the nodequeue blocks:

+
Fatal error: Call to undefined function _nodequeue_dragdrop_get_nodes() in /var/www/production.sojo.net/htdocs/sites/all/modules/nodequeue/b/modules/nodequeue_block/nodequeue_block.module on line 30

(notice the '+', which may indicate a syntax error)

Rob_Feature’s picture

I added this to the nodequeue_block.module to make sure the function was available...not sure if that's exactly what's needed or not:

require_once('./'. drupal_get_path('module', 'nodequeue') .'/includes/nodequeue.admin.inc');
Rob_Feature’s picture

After this addition to include nodequeue.admin.inc it seems to work as expected. Can you confirm that's the correct fix and possibly roll it into the patch? (I'm not sure how to patch an existing patch :)

amateescu’s picture

I'll give it a test tonight. The patch from #1 was completely untested, just a quick re-roll of your own from the OP :)

Oh, and the module placement is correct in the modules/ subfolder because I intend to move smartqueue and nodequeue_generate over there too in #316949: Nodequeue files reorganiztion?.

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new2.2 KB

Allright, here's an actual tested patch.

sansui’s picture

I removed my 2.10 installation of nodequeue and downgraded to 2.9 to test out this patch. I receive these errors

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'nodequeue_arrange_subqueue_form_2' was given in /home/mysite/public_html/includes/form.inc on line 377.

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'nodequeue_arrange_subqueue_form_1' was given in /home/mysite/public_html/includes/form.inc on line 377

amateescu’s picture

@Sansui, you have to use 6.x-2.x-dev if you want to try out the patch from #9.