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 24. Nov 2024, 10:58

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  [ 11 posts ] 
Author Message
 Post subject: $sort_by_filedate
PostPosted: 26. Sep 2009, 21:02 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
hello again,

I want to show images sorted by filedate, in one particular folder. Create file config_sort.php with contents:
<?php
$sort_by_filedate=true;
?>

Whatever I do - delete cache (browser, tinywebgallery), cookies, restart browser, try both Opera and FF - images are sorted by name. :?:

Currently running Apache 2.2.11 php 5.2.9 on Win.


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 21:15 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
have you set
$sort_by_date=true; ?

because the switch you use does select if you use file date or exif date.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 21:25 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
added
$sort_by_date=true;

but now the sorting is strange - maybe it is sorting according to exif (where some files do not have this info, I must check) ? It is not doing what I want. By the way, I wanted sort by file time so that newest are first.


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 21:30 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you have to set

$sort_images_ascending
$sort_by_date
$sort_by_filedate

how you need it.
Make sure to click on the bandwidth icon after a change because the sorting results are cached.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 21:34 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
one image that falls out is without exif date. But I do not want exif date to be counted at all! Just filedate! Is it possible?


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 21:52 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you have to set:

$sort_by_filedate=true;

Then the file date is used.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 22:01 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
yes, I do it! This is the setting that I tried first and didn't change.
In the meantime I discovered that there were more fall-outs and in such a way that I did not understand at all how it was sorted (it seemed something mixed name, exif date, filedate...). So I left it now as it is without particular sorting.


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 22:44 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I'm just checking the sorting - something does not work here properly. I'm debugging this right now and let you know ...

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 26. Sep 2009, 23:52 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I think I found it. Does some of your images start with numbers? I was adding a date sorting prefix and when a image starts with a number this number was added to the date and then the sorting was wrong.

I have added a seperator and this fixed the problem for me.

Please use te patch file and retry.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 27. Sep 2009, 21:45 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
yes, thanks, now it works! :)
with:
$sort_images_ascending =false;
$sort_by_date = true;
$sort_by_filedate = true;

TinyWebGallery wrote:
Does some of your images start with numbers?

yeah...some were with test names beginning with 001_, 002_, one with a strange original name 86250001.jpg, and others with names not beginning with a number.


Top
 Profile  
 
 Post subject:
PostPosted: 27. Sep 2009, 21:48 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
this was the problem. I did not take this into account ;).

Have fun using TWG,
Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 64 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:
cron
powered by phpbb | Datenschutz/ Privacy policy