Member
Member
ReluctantIdiot   2008-12-16, 16:34
#1

I'd like to programmatically create an album. However, I can't seem to find something like createAlbum(string $albumName).

Can someone please point me in the right direction? I know an album is just a folder on the filesystem, but I would imagine some metadata needs to be added to the database, etc.

Any help would be greatly appreciated. Thanks!

Administrator
Administrator
acrylian   2008-12-16, 18:04
#2

What do you actually want to do? You can create a new album object with
$albumobject = new Album($_zp_gallery, );

But if you mean to create a real folder on the file system you need to look at the file system functions PHP provides. You will find all here for example: http://www.php.net/

Member
Member
ReluctantIdiot   2008-12-16, 22:09
#3

I would like to create a page where members of my site can create Albums and upload pictures (this page would be integrated into my site and it's user system). Please correct me if I'm wrong, but it sounds like all I need to do is:

  1. Manually create a directory
  2. Create an Album object using the newly created directory as the albumfoldername
  3. Call the setTitle, setDesc, etc on the Album Object to update database
  4. Upload pictures into that directory

...I just want to make sure that's the proper steps to take. I want to make sure the ZenPhoto database is consistent with what's on the filesytem.

Thanks!

On my website I have a user I've installed ZenPhoto

Member
Member
sbillard   2008-12-16, 22:24
#4

You need to add one step to #2b--call on the save() method at the end to move the changes from memory into the database.

Member
Member
ReluctantIdiot   2008-12-17, 03:42
#5

Thanks sbillard! Very much appreciated!

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