HI,
I'm a new user, but I've searched and searched before posting a forum question, honestly!
I'm struggling to get hold of the codeblocks that belong to an album when viewing an image within the album. Initially I had assumed that the album's codeblocks would be inherited, but now I see this is not the case, and that each image has it's own codeblock, but from reading the description of the printCodeblock() function it appears I should be able to do something along these lines:
[code]<?php $codeblock2=$_zp_current_album->getcodeblock (2);
if ($codeblock2 <> '') { printCodeblock (2,'Randoms'); }
?> [/code]
If I'm understanding right this should be checking that the album's codeblock 2 is not empty, then executing it. The album is called 'Randoms'. I have tried things like GetAlbumTitle () instead of the explicit string, and also GetAlbumLinkURL (), but nothing seems to give me the album's codeblocks.
Any help will be much appreciated.
Comments
However, now that I have the code as this:
<?php $codeblock2=$_zp_current_album->getcodeblock (2); if ($codeblock2 <> '') { echo 'EEP '; printCodeblock (2,$_zp_current_album); }?>
I get the following output ` a:3:{i:1;s:372:"Download a zip file of this album
marktuma.net";i:2;s:13:"CODEBLOCK 2 ";i:3;s:0:"";} `
The codeblock itself contains just the text 'CODEBLOCK 2'.
It looks like it's getting more than the codeblock requested but I can't see why. Can you suggest anything please?
In case anyone finds it useful, I've been documenting my experiences with setting up Zenphoto and getting it tweaked to my liking here: http://marktuma.net/?p=231