Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 21. Nov 2024, 18:56

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 31. Jul 2014, 13:45 
Offline

Joined: 16. Jul 2014, 02:22
Posts: 6
Activating $serialize_dir_data *sometimes* reverses the order of my photos.

I'm using TWG 2.1 and sorting my pictures by file name.

Globally, I have set $sort_images_ascending = false;, so I can add new ones by simply increasing a counter.
Locally (in two of the config.php files residing in the pictures folders) I reversed the order by setting $sort_images_ascending=true; - these are complete albums which are are simply uploaded the way they were taken.

Now, enabling $serialize_dir_data *sometimes* reverses the order. Performing any operation in the gallery folder (touching a file) fixes the issue temporarily, as the cache is re-generated then (I guess).

I deactivated the serialization for now, as the changing order really bugs me. I guess when the cache is generated, it does not obey the local config.php? Second guess, it *does* obey it, but the gallery-viewing code does not care whether the information was obtained directly from the file system (sorted ascending) or from cache, so the order gets reversed twice if cached.

Does that include all necessary information? :)

Thanks in advance.


Top
 Profile  
 
PostPosted: 31. Jul 2014, 18:30 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Please see http://www.tinywebgallery.com/en/faq.php -> howto 6. How to set a gallery name different from the folder name (e.g. for enhanced sorting)
---
Since 1.7.4 you can use a file called config_sort.php. This makes it possible to sort a sub directory different then the rest. You only can place the following parameters to this file: $sort_images_ascending, $sort_by_date, $sort_by_filedate, $sort_albums, $sort_albums_ascending, $sort_album_by_date. This file works for image sorting as well. Don't use a custom folder config.php for sorting because settings in there would overwrite settings global during caching. If you use private galleries you have create a config_sort.php in the pictures folder as well. There you store the sorting of the main folder!
---
Otherwise it always depends which cache is already build. So if a folder before had a custom config.php it does overwrite the global settings while another one does not.

Best, Michael


Top
 Profile  
 
PostPosted: 31. Jul 2014, 23:29 
Offline

Joined: 16. Jul 2014, 02:22
Posts: 6
Ouh, so no bug then. But good to see that the code behaves exactly as I thought :)

Thanks!


Top
 Profile  
 
PostPosted: 1. Aug 2014, 08:50 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
;).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
powered by phpbb | Datenschutz/ Privacy policy