ZenphotoCMS Forum
Albums order by date with sub-albums - 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: Albums order by date with sub-albums (/thread-6290.html)



Albums order by date with sub-albums - southdreamz - 2009-12-16

Dear support,

i want to list albums(no images, only sub album has images) by latest date(DESC). Earlier, i patched parent album date in class-image.php->_Image function, now 1.2.7 has been lot of changes and now i'm not able do that. I know there is a filter called "new-image", but i don't know, how to get album id and parent album id. please help me,
how to update the parent albums date using this filter.




Albums order by date with sub-albums - acrylian - 2009-12-16

Well, that is why we always tell not to modify core files...;-)

I don't really understand what you are trying to do. You can set the sortorder of toplevel albums on the options as well as for subalbums on every album page separately.




Albums order by date with sub-albums - southdreamz - 2009-12-18

Hello acrylian,

Thanks for your replay.

Let us explain here:

My folder structure like:
albums[this system folder]
--actress
----a1
------aa1
------aa2
------aa3
----b1
------bb1
------bb2
----c1
----d1
------dd1
----e1

If i browse the "actress" folder, i'm getting albums(by date) list like.

e1
d1
c1
b1
a1


Now, i'm uploading new folder "bb3" to "b1" folder, then the system should show:

b1
e1
d1
c1
a1


but it is not showing this way.

I'm using this options:
Options => gallery => Sort gallery by: => "Manual" is selected
Options => gallery => Gallery behavior: => "use latest image date as album date" is checked.
Options => image => Sort images by: => "date" selected, "descending" is checked.

Sample: http://gallery.southdreamz.com/audio-launch/page/7/

Note: the root album date is not changed.




Albums order by date with sub-albums - acrylian - 2009-12-18

I believe [i]Options => gallery => Gallery behavior: => "use latest image date as album date" is checked.[/i] only counts for an album that directly has images. Your toplevel has not, so the album date is used that of course does not change. I am not familiar in detail with the internals so I guess Sbillard will know more.




Albums order by date with sub-albums - southdreamz - 2009-12-21

Hello @Sbillard,
Do you have any sample code for this needs?




Albums order by date with sub-albums - sbillard - 2009-12-21

I'm not in the habit of doing custom code.




Albums order by date with sub-albums - southdreamz - 2009-12-22

Hello @Sbillard,
Actually, i need some help, how i get the parent album id from this new image filter.




Albums order by date with sub-albums - acrylian - 2009-12-22

All functions and methods to get those info are listed on our functions guide. You probably have to do some work yourself, sorry.