So it may be a bit of a tricky question but I think it can be done if I get started in the right direction. I have a filemaker pro database that has fields for specific information about an item, but doesn't allow images. I have created a button that I can open up a new browser with zenphoto. My question now is can I use information from the database to pass to the URL to automatically pass me to a page with a preformed album (from the database information ie. create an album named XYZ because in FMP I inserted XYZ). Is what I am thinking of possible? Even a direction/file to wander around in relating to this would help.
Thanks!
Comments
And I believe I was a bit unclear in my original post. The database sends the URL, but if the album is not already created, zenphoto does nothing. Typically there will not be an album already created for the images being uploaded. I was hoping that I could just pass to zenphoto:
"server/zenphoto/zp-core/admin-upload.php?album=ABC%2fXYZ"
where then the folders for ABC and XYZ are created and I am brought to the upload screen to fill that album with photos and metadata.
My issue is that I need to sometimes build sub-albums where higher albums/folder structure is not already present. Is this something that is possible by just passing a URL?
Thanks again!
I have found a way to make the folders that I need for uploading, now I am just trying to figure out how to implement this into zenphoto...
`
<?php
//This code is designed to run from a filemaker button to create photo directories from filemaker without having to do it by hand.
//Gets the album info from the end of the URL
$url = $_GET['album'];
//Sets the album info in variables and pulls them from the URL splitting them between the forward-slashes
list($folder, $powder, $substrate,) = array_map('urldecode',explode('/',$url));
//Sets the path for the directory to be created and sends out a warning if the directory could not be created
$path = "$folder/$powder/$substrate";
if(!mkdir("$path", 0775, true))
{
echo ("Couldn't create directory, it probably already exists, but check /Volumes/Mach 2/Media Library/Images/$path to be sure.");
}
?>
`
So that should create my folder structure, I would just like somebody to help me out with where I should put this...
1. in a zenphoto page
2. a separate page and then redirect to the upload-page from there
Thanks
I have found a way to make the folders that I need for uploading, now I am just trying to figure out how to implement this into zenphoto...
`
<?php
//This code is designed to run from a filemaker button to create photo directories from filemaker without having to do it by hand.
//Gets the album info from the end of the URL
$url = $_GET['album'];
//Sets the album info in variables and pulls them from the URL splitting them between the forward-slashes
list($folder, $powder, $substrate,) = array_map('urldecode',explode('/',$url));
//Sets the path for the directory to be created and sends out a warning if the directory could not be created
$path = "$folder/$powder/$substrate";
if(!mkdir("$path", 0775, true))
{
echo ("Couldn't create directory, it probably already exists, but check /Volumes/Mach 2/Media Library/Images/$path to be sure.");
}
?>
`
So that should create my folder structure, I would just like somebody to help me out with where I should put this...
1. in a zenphoto page
2. a separate page and then redirect to the upload-page from there
Thanks
Of course, you will need to use make sure the character set is correct--we use the functions InternalToFilesystem() and FilesystemToInternal() to make this happen.
-> .../zenphoto/albums/$folder/$powder/$substrate/photos.
Where should I be looking at these files to put something in? and where are the function comments located?