![]() |
|
reverse sorting of albums..001.jpg, 002.jpg etc - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: reverse sorting of albums..001.jpg, 002.jpg etc (/thread-1024.html) |
reverse sorting of albums..001.jpg, 002.jpg etc - Guest - 2006-12-28 My pictures are all numbered. The latest additions have larger numbers. However if i sort by filename the photos are being displayed from old to new (001.jpg -> 999.jpg). Is there any way to reverse this? I am sure there is since I found some earlier solutions on this forum (but I don't think they work with the latest version). I have no programming skills myself so I was hpoing someone could help me out here. reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-28 Try this: Identify the file classes.php in the /zen folder. Find line 579: ksort($images); Change it to: krsort($images); Now if you sort by filename or title in the Admin Panel, the largest filename (or title) will be first. reverse sorting of albums..001.jpg, 002.jpg etc - Guest - 2006-12-28 Brilliant, works like a charm. Thanks reverse sorting of albums..001.jpg, 002.jpg etc - Guest - 2006-12-28 is there also an easy way to order the album the same way reverse sorting of albums..001.jpg, 002.jpg etc - Guest - 2006-12-29 There is a small problem , now I use krsort instead of ksort 'prev' en 'next' buttons work the other way around. I guess this is because the order hasn't been changed in the database. Any other way to fix this? reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-29 @bart
Find the file image.php (/themes/default/image.php). In it find the section: at line 24. Within the section replace two lines Replace line 26 which reads: With: Replace line 28 which reads: With: Don't change anything else and please backup your original files so you can revert easily. reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-29 @bart USE THIS INSTEAD
Find the file image.php (/themes/default/image.php). In it find the section: at line 24. Within the section replace two lines Replace line 26 which reads: With: Replace line 28 which reads: With: Don't change anything else and please backup your original files so you can revert easily. reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-29 @bart I always have trouble posting code on this forum since some characters do not show up. Send me your email and I will mail you the correct version. reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-29 Basically in the above use: « for « reverse sorting of albums..001.jpg, 002.jpg etc - jayray999 - 2006-12-29 Just send me the email reverse sorting of albums..001.jpg, 002.jpg etc - Guest - 2006-12-29 Thanks for your help jayray999 appreciate it. My email address: anangelheadedhipster at hotmail.com |