Member
Member
ultranol   2010-06-18, 03:32
#1

Hey people.

I'm trying to find this out for at least one hour but I guess nobody ever tried to do that simple thing... I'm creating a custom page (like archive.php or slideshow.php) and in this page I need to access the album the user was looking at and its properties. The only way I managed to do pass the album as a parameter to the custom page is to forcing the album object into a session variable when I'm on album.php (using $_zp_current_album) and accessing it on the custom_page, using "session_start()" in both pages. I feel like I need to take a shower after doing that... is there a decent way to do that?

The closest appropriate thing was to call a SearchEngine object, but as far as I could read on the documentation there is no way to get albums by ID, only by title, description. Am I missing something?

Thank you

Administrator
Administrator
acrylian   2010-06-18, 08:42
#2

You have to look into the object model on our site. Actually Zenphoto gets albums not by title but by name (as well as images, Zenpage pages and articles).

The name of an album is its folder name. For subalbums it is the path (toplevel/sublevel/...). There is a tutorial on our site. Once you have the album object you can also get the id (see the documentation). But using the name makes things easier if you want to do more stuff with the album later.

Member
Member
ultranol   2010-06-18, 13:00
#3

Well, I guess folder name is as unique as the ID... I will follow this path, then.

Thanks for pointing this out.

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