Member
Member
thommy   09-05-2016, 22:02
#1

Hi,

I'm using custom fields for an album added by my plugin.
Is it possible to rename the album-directory dynamically by saving an album (edit album)?

new directory name = custom_field1;
What filter to use for that?
zp_register_filter('new_album', 'updateAlbum'); ???

Can anybody give me an example how to handle this?

Member
Member
sbillard   10-05-2016, 00:46
#2

The album object has a rename(to) method that does this. Please note that dynamic albums will hide the suffix in the User interface, but you definitely would need to include it when calling that method.

Also note that renaming and moving are different functions. Renaming presumes that the parent album does not change.

Member
Member
thommy   10-05-2016, 06:08
#3

Thank you!
To influence the saving-process - how to do it? Is there a filter to use?

Administrator
Administrator
acrylian   10-05-2016, 12:44
#4

You find info about filters here: http://www.zenphoto.org/news/zenphoto-plugin-architecture/

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.