Closed (fixed)
Project:
Image
Version:
5.x-1.4
Component:
image_gallery
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2007 at 00:19 UTC
Updated:
2 Nov 2008 at 13:32 UTC
Hello all,
I am a newbie and am tired of searching the web for a answer for this problem and decided to bug you all with this simple question (witch i hope no one asked). How do you change the code in to the images in the gallery be sorted by name?
Sorry for the bad english and thanks for reading this
Comments
Comment #1
drewish commentedyou could probably just add an ORDER BY n.title to the query... i don't have the code in front of me right now but it shouldn't be too terribly hard to figure out.
Comment #2
Bananoide commentedCool. It did the job. i was trying n.name (dumb dumb dumb). Thks a lot!
Comment #3
drewish commentedComment #4
benone commentedAnd where exactly did you put it ? Which file and line ?
Comment #5
dougpetch commentedTo echo benone - could someone post the correct code along with where it should be positioned in the image_gallery.module file?
Comment #6
halftone commentedI don't have Image 5.1.4 in front of me but look for the SQL queries in the function image_gallery_page in the Image_gallery module. In later versions this is around line 141
Change
to
and (a few lines further down) change
to
I've now stopped using this method of ordering. More flexible and useful - to me anyhow - is using the Nodeorder module to enable drag and drop ordering of images within the gallery. See http://drupal.org/node/317902