I was tasked with adding an image for each node (that has an image) to the node ordering form. Here's a patch which does that, along with images at the bottom of this post showing the changes.
The first image found in a node's image field will be used. If the node has multiple image fields, it searches them until it finds an image. The image fields are searched top to bottom, using the order from the content type's field UI:
admin -> structure -> content types -> [content type] -> fields
Two settings have been added to the Nodequeue settings form in a Nodequeue Image Settings fieldset:
Display node image: Whether or not to display node images on the node ordering form.
Image style for node image: Which image style preset to use for displaying node images on the node ordering form.
If no image is found for a node, and the setting for nodequeue images is turned on, then the image field will be blank for that node row.


| Comment | File | Size | Author |
|---|---|---|---|
| #15 | nodequeue-node_image-15.patch | 7.07 KB | kevinfunk |
| #14 | nodequeue-node_image-14.patch | 7.18 KB | jenlampton |
| #4 | nodequeue-node_image-3.patch | 10.17 KB | sethfisher |
| #4 | nodequeue-node_image-3-diff.txt | 1.49 KB | sethfisher |
| #3 | nodequeue-node_image-2.patch | 9.74 KB | sethfisher |
Comments
Comment #1
sethfisher commentedAnd here's the patch which of course I forgot to include.
Comment #3
sethfisher commentedSorry, first time using Tower to roll and submit a patch. Let's try this again.
Comment #4
sethfisher commentedRemoving the nodequeue_image variable from variable table in hook_uninstall.
Comment #5
hdragon90 commentedhow i can use file *.patch?
Comment #6
sethfisher commented@hdragon90: http://drupal.org/patch/apply. Use the .patch file in comment #4
Comment #7
thinkinkless commentedThis looks like a great enhancement to the nodequeue UI.
+1 and subscribing
Comment #8
sethfisher commentedAn update from the development end...I will be patching this to handle file fields as well as image fields. When that happens depends on the priorities at my job, it's a story in our backlog.
Comment #9
designedbyjoe commentedAny chance someone could patch this for me.. I'm new to patching, tried Cygwin but won't recognise command... Will try again tomorrow unless someone can help us out.
Comment #10
joshuautley commentedIs #4 good to go? This is great for jombotron carousels where the client wants to order the creatives visually instead of by title.
Comment #11
matkeane commentedJust to say that I just tested this against Nodequeue 7.x-2.0-beta1+19-dev and it's working fine for me. As others have said, this is a really useful addition to the UI for content editors. Not sure if my "it works for me" comment is enough to set this as RTBC?
Comment #12
garvin commentedCan anybody tell me what I'm doing wrong? I can't get patch in comment #4 to work.
Here are some specifics:
Nodequeue 7.x-2.0-beta1+19-dev
nodequeue-node_image-3.patch
-----------------------------------------------------------------------
[~/public_html/drupal/sites/all/modules/nodequeue/includes]# patch -b nodequeue.admin.inc nodequeue-node_image-3.patch
patching file nodequeue.admin.inc
patching file nodequeue.admin.inc
Hunk #1 FAILED at 241.
1 out of 1 hunk FAILED -- saving rejects to file nodequeue.admin.inc.rej
patching file nodequeue.admin.inc
Hunk #1 FAILED at 2133.
Hunk #2 FAILED at 2162.
2 out of 2 hunks FAILED -- saving rejects to file nodequeue.admin.inc.rej
Thanks!
Comment #13
matkeane commented@garvin: The patch actually changes 2 files - the nodequeue.admin.inc you saw, but also the nodequeue.module file as well, so you need to apply the patch in the module directory itself, not in the 'includes' subfolder.
To recap, copy the patch file info sites/all/modules/nodequeue/ then run the patch command and it should apply OK. Hope that helps...
Comment #14
jenlamptonRerolled for latest 2.x-dev, also added an additional setting for field, since the first-field of any node is not likely to be what people really want. Let's give this version a whirl.
Comment #15
kevinfunkReroll of #14 for the latest 2.x-dev.
Comment #16
jenlamptonI don't think I should review my own patch, so if anyone else is using this patch please leave a comment here with a brief review. Thank you!