Uh oh - you just took a bucketful of honeymoon photos and towards the end of the trip your friend borrows the camera and accidentally formats the memory card. Ahhhhh!!! Don't freak out yet. Check out Disk Doctor and get $5 off as a CWD visitor. It just may save the day.
StreamSend is Email Marketing by Marketers, for Marketers. They offer a very friendly and easy to use interface, private IP address, trigger-based messaging, demographic reporting, integration with Google Analytics, and more. Click here to get 30 free days and give them a try.
Drupal has so many different image modules at different stages of development, and different means of handling images, that chances are this technique won't apply to you. But for those that are using the 1.x release of the Image module (which doesn't contain the image gallery sorting feature), here's how to get your images sorted by either title, creation date, or any other attribute.
If you're using Image module 2.x, you don't need to apply the hack below. Simply browse to Administer -> Site Configuration -> Images, select the Image Gallery tab, and select an option under Image Display Sort Order. If you don't see the Image Gallery tab, or the Image module tells you you need to configure Views, you may want to consider the approach below. Caution, however, as if you downgrade your image module you may lose your images. It's always best to create database backups before and after changes to modules.
In most cases you don't want to edit core Drupal modules directly. Why? Because it doesn't promote a clean "black box" coding environment. In other words, if there's not an organized and unified way of upgrading and changing core code, changes will get lost. But in this case, I feel it's justified since so many iterations of the image module apply, and those using this particular approach aren't likely to upgrade. If you do, you'll need to start over with your images in any case.
Open the image_gallery module (image_gallery.module) in the "contrib" directory of your image gallery directory, within the image module. Browse down to lines 149 and 157. You'll see the database calls for generating the image galleries:
149: $sql = 'SELECT n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. implode(',', $descendant_tids) .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC';
157: $result = pager_query(db_rewrite_sql("SELECT n.nid FROM {term_node} t INNER JOIN {node} n ON t.nid=n.nid WHERE n.status=1 AND n.type='image' AND t.tid=%d ORDER BY n.sticky DESC, n.created DESC"),...
Simply change the n.created DESC to a variable of your choosing, followed by your preferred sort order. For example, if you want to sort by date created, ascending, you would substitute: n.created ASC. If, on the other hand, you want to sort your image gallery images by descending title (reverse alphabetical), you would use: n.title DESC.
All Content © 2005 - 2010 Contract Web Development, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Powered by Drupal
4 days 12 hours ago
4 days 13 hours ago
4 days 13 hours ago
4 days 13 hours ago
5 days 22 min ago