Adding new photos at the beginning of the album

Drrrl

Joined: 2003-02-02
Posts: 23
Posted: Sun, 2011-01-02 17:46

Hi Guys,

as the conservative dinosaur I migrated from G1 to G2 only several weeks ago. Although there are many very useful features, I miss the one I used in G1: ability to configure that newly added photos are added at the beginning of the album instead of at the end. Is it possible?

I know that I can set "Sort Order" for an album to Creation Date/descending or Last Changed Data/descending, what in most cases would put new photo at the beginning, but this is not a solution as it will change the existing photos order.

I've found the same question asked almost 3 years ago, with no answer however (http://gallery.menalto.com/node/75483).

Here is my system info:
-----------------------
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.4-pl0-gentoo apache2handler
Webserver = Apache
Database = mysqli 5.1.51-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, ImageMagick, LinkItemToolkit, Thumbnail, Gd, SquareThumb
Acceleration = none, none
Operating system = Linux www.dot.com 2.6.27-gentoo-r10 #6 Mon Jul 27 23:29:08 CEST 2009 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 594
Rows in GalleryAccessSubscriberMap table = 8167
Rows in GalleryUser table = 19
Rows in GalleryItem table = 8165
Rows in GalleryAlbumItem table = 528
Rows in GalleryCacheMap table = 0

Thanks in advance,

G.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-01-02 18:38
 
Drrrl

Joined: 2003-02-02
Posts: 23
Posted: Sun, 2011-01-02 19:02

Yes, but this will also influence order of all photos in the album, won't it?

I like to sort photos in an album manually, usually I put new photos in the beginning of the album, but some of them I want to have in specific order. Thus setting any automatic sorting for the whole album won't work. In G1 I could sort item manually, but also set all newly added photos at the beginning.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-01-02 19:15
 
Drrrl

Joined: 2003-02-02
Posts: 23
Posted: Sun, 2011-01-02 19:42

OK, I know I can reaarange pictures. The thing is I don't want to do this each time I add new photo, to move it from the end to the beginning (which I have to do now).

Is there any other method for new photos to be added by default to the beginning of the album, while all other photos in this album stay arranged in the same order, as they were before adding new photo?

Example: I have 5 photos, A, B, C, D and E. I change their order manually to: A E D B C - no automatic sorting. They I add a new photo, named F. In the current behaviour it will appear at the end, i.e. album order will be A E D B C F. In my previous G1 I had a setting that will add new photo at the beginning, i.e. after adding new photo, without any manual rearrangement, the order would be F A E D B C.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2011-01-02 21:46

This is not an available option in G2.

You can arrange the items by the date they were added to the gallery amongst other options but this will apply to all items in the subject album. It is possible to do what you want but you will have to edit the core gallery behaviour.

The pertinent functions controlling this are in /modules/core/ItemReorder.inc and you will need to add your new option into modules/core/classes/GallerySortInterface_1_2.class.

Happy coding! :)

--
dakanji.com