Hi, I have successfully installed Zen Photo, created an album and now need to create a link on the web page the album is for to the album. I can,t seem to find a way to do this. Please offer your suggestions on solving this problem. Thanks, rhamblin60
I'm not sure I am understanding your request. Do you want to place a link to the page you are on on the page? Seems strange. Anyway, look at the functions guides for `printAlbumLink` and/or `getAlbumLink`. One of those or the object method equivalent should be what you want.
In (3) you will see that the "album" folder is missing in the URL. Is this as it should be? Zenphoto does not seem to be affected by this ommission but it means the getAlbumLinkURL() function cannot be used as a pointer to an images folder outside of ZP.
Zenphoto does not access the images in the albums folder directly (unless you want to view the full image). `getAlbumLinkURL()` is the function to use for a link to an album page. `getAlbumFolder()` is for internal use. See also: http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#4
You apparently did either not read or understand the link I posted. It does return the correct path to an album page which is simply not the same as the location of an album on the filesystem.
acrylian, thank you for your patience. I clearly did not appreciate the difference well enough! What I am looking for is "the location of an album on the filesystem". Is there a function that does this? I am currently doing it with a composite of several functions.
var imagePath = '<?php echo "http://"; echo substr(htmlspecialchars(getAlbumFolder()),10); echo substr(htmlspecialchars(getAlbumLinkURL()),10);?>';
Comments
I am in the process of integrating ZP with a new site. I am working with the latest ZP version 1.4.0.1.
I needed to provide the URL to an image within the ZP album structure and had to work around what seems to be a problem with the ZP functions.
(1) My hard drive album structure (default locations) is:
myHardDrive/zenphoto/albums/myAlbums/
(2) getAlbumFolder() returns:
myHardDrive/zenphoto/albums/
(3) getAlbumLinkURL() returns
zenphoto/myAlbums/
In (3) you will see that the "album" folder is missing in the URL. Is this as it should be? Zenphoto does not seem to be affected by this ommission but it means the getAlbumLinkURL() function cannot be used as a pointer to an images folder outside of ZP.
Can anyone please advise?
See also: http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#4
Cheers
rim
Album 1
• Subalbum 1
• Subalbum 2
• Subalbum 3
Album 2
• Subalbum 1
• Subalbum 2
etc.
next_album is working for root albums only, and I can't figure out how to cycle through subalbums on index page.
var imagePath = '<?php echo "http://"; echo substr(htmlspecialchars(getAlbumFolder()),10); echo substr(htmlspecialchars(getAlbumLinkURL()),10);?>';