Add attributes to Albums and Subalbums

Hello guys,

I am trying to find a way to add a mysql attribute to each folder and subfolder in zenphoto.

I know when I add a new album, zen photo creates a new mysql row in the albums table with all of that album's attributes (folder name, date created, description, etc.)

What I want to do is get zenphoto to automatically create an additional attribute column for each album/subalbum called "attributex" whenever an album is uploaded.

Where is the code in zen photo that controls the automatic creation of rows for albums?

Thank you,
- Fuge B

Comments

  • There is a "custom data" field in all albums that you could use. You can create a filter for the new album processing to set this field to whatever you wish.

    Please see the documentation for the zenphoto plugin architecture http://www.zenphoto.org/2008/04/zenphoto-plugin-architecture/
  • fugeb Member
    Thanks for the reply ! "attributex" was just one example.

    I would like to create multiple such fields. How can I do this? Again, could someone also point me to the code that is responsible for creating the new mysql entries when a new folder is created?

    Thanks !
  • Store them all in the custom data field. Look at the PHP explode and implode functions for ways to pack them toghether.

    You do not really want to change the Zenphoto core. You will be forever playing catch up. Besides, I gather you are not expert on PHP and classes. The album class is a descendent of the persistent object class which handles all the database manipulations.
Sign In or Register to comment.