This is a similar approach to
http://drupal.org/node/81102 (D6)
http://drupal.org/node/253503 (D6)
This patch is for D5!!
It modifies the image_attach-module to support multiple attached images per node.
The patch modifies the module and the install file. it is based on image-5.x-2.0-alpha1!!
It will not interfere with extisting images attached to nodes. It only shows 1 image in teaser or full node as this is the known behaviour -- even if there are more images attached to the node.
Modifications
Modifications to module:
- - Block shows all attached images
- - node-edit lets you choose multiple existing images to add to the node
- - node-edit lets you upload multiple new images (one after another, by hiting "preview")
Modifications to install-file:
- - added a new update-function, to drop the primary key and the key iid. Afterwards it adds a new primary key(nid, iid).
caution: I don't have put in code for pgsql!! got no clue on that :/
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | multiAttachD5_v3.patch | 9.76 KB | maulwuff |
| #4 | image_mattach.zip | 6.43 KB | andypost |
| #1 | multiAttachD5_v2.patch | 9.41 KB | maulwuff |
Comments
Comment #1
maulwuff commentedsorry for bringing up a reworked patch so fast.
I had some trouble in the theming-functions.
Now you can easily switch between "show 1 image as usual" or "show all attached images" by commenting out only 1 line:
for teaser it's line 466
for body it's line 495.
the lines are preceded with:
//drop the following line to show all images attached to the node:(search for this, if the line-numbers don't fit)
Comment #2
maulwuff commentedFound another issue when I disabled Lightbox.
The path for the thumbs in the attached image block was not prepared for arrays.
Here is the complete patch.
edit: run the update.php from the modules page after applying the patch.
Comment #3
drewish commentedthis functionality sounds really cool but needs to be done in D6 first and then backported.
Comment #4
andypostMaybe my solution helps...
I use this module on 2 sites - it's just a quick solution.
After creating node you see a tab "Images" where 2 lists - one for attached image nodes and second is paged list of all image nodes.
Comment #5
andypostRemoved D5 from title...
My solution for D6 and there's no blocks defined by module
Comment #6
Mark Theunissen commentedI tried to get v3 working but I get errors when I hit "preview":
Comment #7
maulwuff commentedI think you need to run update.php from the modules page in order to get rid of these errors.
Comment #8
coltraneClosing this as a duplicate of #81102: Attach Multiple Images with image_attach using Drupal upload mechanism. If you want multiple images in image module there need to be patches that apply against the working development version which at this moment is the 6.x branch. Discussion and code should be consolidated as well.