Hello,
I use the image module for my galleries. Everything is fine except of the order the pics are presented. I want to sort them by the time they are created (the photos, not the nodes). With the exif module I can show the exif information like creation date, so this won't be a problem. But unfortunately I'm stuck. I'm thinking about 2 possibilities:
a) Sort via function override:
Find out which function (in image.module?) is responsible for grabbing the pic-nodes from the DB. Then sort this array by exif creation date.
b) Implement a View
I'm not yet familiar with views. But as far as I know I can tell the view how to sort the nodes. But there is certainly no option "sort by exif". How would one proceed? Create a temporary "field" which reads out the exif-info?
Any suggestions would be great! I really don't know how to proceed.
Comments
The only effective way to do
The only effective way to do this in my experience is to use Views and CCK. I have created several image galleries witih these modules and you can sort any way you want.
Here is a tutorial on the setup: http://drupal.org/node/144725
The directions are pretty good, just follow them to the letter and you will be fine. (Whether the exif module can be made to work in this particular environment is unclear, as I have never tried it; others may have experience however. You might do a search on views AND cck AND exif, for example.)
----------------------------------------------------------------------
http://www.bwv810.com/
I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу связывать на русском языке.
A third option came into my
A third option came into my mind: If I understand it correctly, a node is being created for each image. And this node get's a creation date, which is the timestamp for the moment the node is created.
What if I set this node-creation date to the exif-date? Let's assume that I can access this date:
- In which file/function the node for this image is being created?
- How do I change it's behaviour? Override it by a custom function?
I'm trying to understand the
I'm trying to understand the code. In node.module I found:
This is the right place to start, isn't it? But I don't want to change its behaviour for all node types, only for image nodes. So I have to override something, right? But what to override? And where? Is this what hooks are for?
Do I need something like this:
http://api.drupal.org/api/file/developer/hooks/node.php/6
OK
After inserting this into the image.module function "image_submit" the exif date is being used as the node's creation date.
Unfortunately gallery still displays the images in the wrong order...
Hello, I wish I could help
Hello, I wish I could help you make it work. You will be surprised how easy CCK and Views are to configure. ;-)
----------------------------------------------------------------------
http://www.bwv810.com/
I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу связывать на русском языке.