views:

418

answers:

3

How would I be able to use the Drupal Fivestar voting module for voting on photos in a gallery without each photo being a separate node. I've used the Fivestar module for voting on seperate nodes, but making each photo in a gallery a node doeasn't seem logical.

thanks

+1  A: 

The way voting module works, I think they'd have to be a node and not items of a node, because thats how it tracks votes.

Kevin
+1  A: 

What is gallery? Views, custom node/module, Gallery2 module?
What module used for images? image/imagefield/upload?

This is example scheme for building gallery with Views and Imagefield (CCK) and Fivestar voting:
1. Create Image content type with imagefield.
2. Create Gallery content type with one main imagefield (that will be visible in gallery listing).
3. Add to Image nodereference field that linked with Gallery
4. Via Views show Gallery listing: main imagefield and title links should lead to other Views, that show sublisting of attached via nodereference Images.
5. Other Views page catch argument from step 4, and show Images where nodereference = linked gallery
6. Attach Fivestar to Image and Gallery content types, so you can vote for both types.
7. Voilà

p.s. For one main imagefield you can automatically get first image of subimages, or generate thumbnail image. Navigating menus in gallery or breadcrumbs you should set in header/footer of Views via drupal api.

Nikit
+1  A: 

You should probably consult the documentation for the drupal VotingAPI http://groups.drupal.org/taxonomy/term/233

You can take Nikit's approach of rethinking what is really an image gallery. I am assuming you problem with separate nodes is not the quantity of nodes created, but the tedious process to upload a single image one by one.

Check out a module like Image Fupload which can handle the uploading of multiple images and the creation of nodes for each of those images. Plus if you use it through the image module it can handle tagging all those images to same taxonomy (which could be your gallery-name, instead of using a nodereference in Nikit example)

another last option, try to find some random javascript that can do the rating independent of drupal, yes you will not be able sort in Views by most voted, but if you simply just want a 5 star rating and nothing else thats an option. I am sure some googling will find a sufficient script to handle that on the side.

J.Rameau

related questions