Hello, I recall reading about a module that allows displaying an image gallery INSIDE node. I can't remember if I am just dreaming or I really read about this on this site.

I have products that have many photos for each product. I want to use the best photo as the main photo for that product and then be able to display thumbs to the rest of the images at the bottom of the product's node. The easiest way to do this, I think, is to make a separate gallery for each set of photos and then somehow dislpay that gallery inside the product node.

Is there a module that does this or is it possible to custom-code this easily. I am using Blue Marine template on drupal 5.1.

Thanks in advance.


US421’s picture

I could use this as well. I will look into it if nobody speaks up.

nevets’s picture

I would suggest trying the node image module, it adds support for adding multiple images to a node and you can chose how there they are displayed per node type. Note it is important to configure the node type you want to add images to under 'Administer' -> 'Content Management' -> 'Content Types'.

praveen-sl’s picture


What about coding a custom block??

so in that you can get exact images from the selected taxonomy and then include a script to change the bigger picture when we click the relevant thumbnail. and then you can place that block in the content area.

i haven't tried this yet. but can do if someone really want me to.

Praveen Gunasekara

jastraat’s picture

I accomplished something similar to this. My client wanted room descriptions, each with clickable thumbnails of room photos pertaining to the room a visitor was viewing.

I created a custom content type 'room' using CCK. Using imagefield, I created an image field within the custom content type that could have multiple values (contain multiple images).

The following screencast demonstrates how to create an image gallery without using the image module: http://www.theartlab.net/files/drupalschool009.m4v

Following those guidelines, I created preview and thumbnail image sizes with imagecache. In the case of displaying imagefields within a content type, I didn't need to create any views. For simplicity, I installed and enabled thickbox since it creates a slick interface for viewing images. I set the teaser and body displays for the imagefield in the room content type to the linked thumbnail thickbox view.

I think that's all you'd need to do, but you could customize the appearance further by creating a custom template file in your theme for your content type.

Hope that helps!

http://fraggles.artsci.wustl.edu (Drupal user documentation and development blog)

Ali.T’s picture

Thank you for all the replies. I am going to try these solutions, especially the CCK one, and report back.

But I am still pretty sure I read about ability to do this elsewhere. Perhaps it was a script in the handbook, because once I even offered to pay someone to do it for me and they wanted a lot of money. So whenI saw it being offered, I was glad that it was now available. I'll search the handbook.

paoloserafino’s picture

I'm really interested in doing something similar. I visited the link but it seems it doesn't point to the screencast anymore. It would be great if you could provide another link.

Thanks in advance.

Bilalx’s picture

Ali.T’s picture

The module Pblog seems to be able to do what I need: http://drupal.org/project/pblog but it seems not to be working right now or I couldn't it get it to work.

askttt’s picture

Just wondering if you ever got Pblog to work. Everything seem to upload and unpack. The tex is there but no pics. The pics and being unpacked as ../files/pblog/*.jpg

I am getting an error message:
warning: Invalid argument supplied for foreach() in /home/content..../html/modules/node/node.module on line 504.
warning: implode(): Bad arguments. in /home/content....../html/modules/node/node.module on line 508.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/content/....html/includes/database.mysql.inc on line 172.

Not a coder...I don't have a clue.

Any other ideas for a module where a group of non-techs can upload & view their photos from a common function?

jastraat’s picture

pfulton asked me a question by contact form - How to display one 'main' image thumbnail that links to a full gallery of thumbnails related to that node. (Unfortunately, I was unable to reply because it seems his contact form is not enabled. So I am posting a partial answer here.) Note: this is theoretical as I have not done this personally. So there may be some kinks to be worked out. *smile

As mentioned in an earlier post on this forum topic, you would need the following modules: CCK, imagefield, imagecache, and views. (Thickbox is optional, but a nice touch.)

After some investigation, I think you would need to have two different imagefields within the CCK node in question. One imagefield that could only hold one photo (for this example "main_photo"), and a second imagefield that held an array of photos (for this example "gallery_photos"). So, the first step is to create the custom content type with the two image fields and whatever other fields you would like to display.

Create your namespaces for imagecache (thumbnail, preview, etc.) The following post will help with that: http://drupal.org/node/144725

Continue following the instructions for that post with the following differences:

  • You won't need a CCK content type of image for this
  • You will want to add an argument of Node: ID to the view - so you can pass the node id as a parameter. The handbook has some excellent instructions on how to pass an argument to a view - the URL method would probably be the easiest here.
  • You will want to use the "Image: gallery_photos" field in the fields section. Do not group multiple values.
  • Won't need to limit by anything really - the node id argument should be enough

At the end of this, you should have a view that when you pass a node id as an argument, displays a grid view (gallery) of all images in the in the gallery_photos field of the node you passed in.

Then, you'll need to create a content type template for the CCK nodetype you created. (Again - a lot of handbooks out there for this.) When you display your 'main_photo' field, make it a link (with argument) to the gallery view you created. (Clearly you won't want to display the 'gallery_photos' field in this content type template.)

If someone tries this, please let me know if it works.



http://fraggles.artsci.wustl.edu (Drupal user documentation and development blog)