We are working on a recipe-database using the recipe module (http://drupal.org/project/recipe). One of the planned features is that users could upload images of recipes they cooked. I thought this is possible with node_images but It looks like it's only possible for the user that has created the recipe.

So it would be great to have this feature:

Allow any user that has the right permissions to upload an image to a node.

CommentFileSizeAuthor
#7 node_images.patch15.72 KBstefano73

Comments

stefano73’s picture

The node owner shoudl always be able to add images. Did you set the appropriate options for the recipe content type?
What version of the node_images module are you using?

Noki’s picture

I use 5.x-1.x-dev.

The thing that I request as a feature is not that the node owner is not able to add images (that one works fine).

What I want: Users other than the node owner should be able to add images. Any registered user should be able to add images to any recipe-node.

stefano73’s picture

Are those users allowed to edit the node as well? The permission to add node_images is given to users who can create node images and update the node. So if you let users edit recipes, they will be able to add node images as well.
I guess you don't want users to edit the recipe, but you want them to add node images. Is this your case?

Noki’s picture

>Are those users allowed to edit the node as well?

No.

>I guess you don't want users to edit the recipe, but you want them to add node images. Is this your case?

Exactly!

jjanssen’s picture

I'd echo this request... my nodes are 'products', and I'd like users to be able to upload their own pictures of the products w/o being able to do anything to the node or the other images. Preferably the link to add new images would be in the 'links' list, not the 'menu' bar at the top.

marcoBauli’s picture

same need here since a while. subscribing and offering for testing

stefano73’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » stefano73
Status: Active » Reviewed & tested by the community
StatusFileSize
new15.72 KB

I made several updates to node_images module, including the requested feature. This is a list of the latest changes:

  • added a content type setting that allows specific roles to add images to any node (if not node owner or node admin, users will be able to edit/delete only their own images);
  • added a block showing the latest images added to the current node;
  • table-less style for image gallery (the node_images.css has been updated too);
  • added %nid as parameter in the node_images path variable;
  • added package = Image to node_images.info

Feel free to try this patch and send feedback if something doesn't work as expected. Thanks.

tomceek’s picture

I have tried new patch
very nice features aded but something is missing:
when using views it is very important to have option that if clicked on image it should open node, not only image pop-up.
because if I have inserted 10 images to node but showing only one in teaser. if user presed image on teaser (view) it see only one picture because there is no option to browse all images in pop-up. and node content is not showing too where site users would see important information related to images.

raiyne’s picture

Thanks!

I apologize I'm new to patching, I'm using Cygwin to patch the file, but I don't know what to use as the file to be patched. It looks like there are several files being altered?

Looking forward to the changes though!

Thanks!
Ben

stefano73’s picture

check the latest 5.x-3.x release: http://drupal.org/node/298968

stefano73’s picture

Status: Reviewed & tested by the community » Closed (fixed)