By comike011 on
I am desperately seeking some assistance with not really a huge problem, but one that has completely baffled me and once the answer is realize Im going to spend the rest of the day thinking of how obvious it was and how stupid I was for missing it. What I need to do is configure a block that will display only the most recent image of a specific gallery. Can I do this with out making significant changes to the image module? It seems there has to be a way to do it just through the administer menus, but I can't get it right. Please help a new user just trying to make a go of it! Thanks.
Comments
Help
Can somebody please help with this...Im begging from the bottom of my heart.
You need to edit image.module
You need to change the image_get lastest function
Specifically change the second db_query_range to 'ORDER BY created DESC' as below :
dyslexia
Sorry, misread your question. I had just helped a friend have his latest image display always the most recent uploaded image, not an update image.
You could always hardcode the Select statement to use the appropriate gallery...
My bad
But..where?
Where would I go about hardcoding the select statement in? Thanks.
As a follow up, the answer was achieved, thanks for everybody's help.
ummmm how bout
Rather than hacking the image module and then forgetting during an update, you try a php snippet? This snippet is from 4.6 may may work without to much modifications.
Display latest image from a gallery
I haven't tried it yet on a 4.7 site so not sure, use on test site, etc etc...
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Ok
I tested this on a 4.7 install and it worked just fine.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide