4

So I'm building a community website for a local photography group and I'm trying to set up a "well equiped" group photo grallery that registered members can upload photos to. The gallery should include basic gallery features such as a view counter, to record how many people viewed a certain image. As well as the ability to comment on the photo.

I am a complete Drupal noob, this is my first Drupal project migrating over from WordPress because I believe Drupal has better flexibility and features as a CMS. I've created a view for our gallery, and am using the colorbox module for a stylish and professional presentation of the photos when clicked. I am also using the statistic module.

The road block I am at is that using the statistics module in partnership with the colorbox module image views are not being recorded. I believe this is because when you click on the image you don't actually navigate to the node, instead the image is pulled from the node and displayed in a colorbox modal. So, no matter the web traffic to the gallery and the photos being clicked or not, it always displays 0 views.

Is there a way to make it so when a image is clicked in the gallery and colorbox presents the image to the viewer it counts as a view?

The in-progress site I'm working on is beta.semiphoto.org The gallery can be found here. Please don't judge, I haven't addressed themeing and am still learning drupal. :-)

2 Answers 2

0

You cannot since colorbox calls the image directly and not through a node page to register the hit. Your going to have to custom code in a js script. when an image is clicked it would report back to the server via ajax to record that hit per image.

0

For Downloads there's the Download Count module. But it Needs a Core Patch.

Here is a quote about it (from the module's project page):

... tracks downloads of private files attached to nodes via the core upload or contributed filefield modules for D6 and private core file fields for D7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.