New pictures at the start of a album not the end?
kyle1745
Joined: 2002-09-06
Posts: 68 |
Posted: Fri, 2002-09-06 22:43 |
New pictures at the start of a album not the end? Is this possible? It make sense really, newest should be first. Kyle |
|
Posts: 487
Except then it would have to go through and re-order every picture every
time you upload one and your uploading time is going to go way up.
It'd be quicker to just sort them after you upload a batch.
Posts: 68
To reorder the current pcitures would take no time at all. just renaming the files.
Kyle
Posts: 38
Assuming you already know about the sort option at the top of your gallery in the menu, and you are asking to make picture sorting a task done by gallery by default so you dont have to mess with it everytime someone uploads a picture, this is how i did it:
On line 354 in your save_photos.php you will see-
$gallery->album->save();
right above that line add this:
$gallery->album->sortPhotos('upload',1);
That will make gallery display all photos from newest upload to oldest automatically.
If you would like to have it sort automagically using any of the other methods, replace ('upload',1) with one of the following:
('itemCapture',1)
('filename',1)
('click',1)
('caption',1)
('comment',1)
('random',1)
Also just so you know, the '1' tells it to sort ascending, using '0' would tell it to sort descending.
Keep in mind that this is just the default, and if you or someone who has rights, sorts it a different way using the sort option on the menu, it would stay the way you had just decided to sort it until someone uploaded a pic again, then it would go back to your default sort that you had hardcoded into the script above.
Posts: 3473
There's a bug introduced by by this change: if someone is writing a comment while another image is added, that comment will be added to the wrong photo.
I am going to have to provide a fix for this, which looks a bit nasty as it all the comment adding code will have to change to use id rather than index.
Note that this problem would also occur anytime the photos were reordered when a user had a comment window open.
Posts: 260
I have a similar problem, because I like only one of my albums to be ordered descending... from most recent to oldest... but everyday, I upload a batch of 2 or 3 pictures... so typically, they will appear at the end of the album and I will use >sort >descending and then they will appear at the begining... Then I might reorder these 3 pictures between eachother with the "move" command... but that s where my problem lies... next time I upload 3-4 pictures and do the sorting, the order between the 3 pictures uploaded previously will be messed up as all the pictures will be reorder (in my case) by date, but any other option would be irrelevant to my needs or create the same result... so I end up having to reoder the last batch between itself and then the new one... and so on...
do I make sense?
Is there any way to work around that?
couldn t there be some kind of cache file created after a "move" command is issued (or when you open the upload window) that would memorise an "image" of the latest order of the pictures so that next time you upload pictures and do the "sorting" bit, your previsous order would be preserved?
he he... another little suggestions for the brave and bright coders... :razz:
cheers
p
Posts: 11
this dont work in the 1.3.3 release, no code in the save_photos.php looks like the example..
any other fix'es for this?
decker.