![]() |
|
Getting an album's codeblocks when you're on image page? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Getting an album's codeblocks when you're on image page? (/thread-8812.html) |
Getting an album's codeblocks when you're on image page? - teeps - 2011-07-04 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: 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. Getting an album's codeblocks when you're on image page? - sbillard - 2011-07-04 You have a bit of mixex context in your code. Getting an album's codeblocks when you're on image page? - teeps - 2011-07-04 That's great, thanks sbillard. However, now that I have the code as this: 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? Getting an album's codeblocks when you're on image page? - sbillard - 2011-07-04 Seems there is an error in the function. Guess you are the first to try that option. I will get a fix up in the nightly build for tonight. If you want to make a temporary fix yourself you can change the code for printCodeblock() in template-functions.php. There is a line that reads Getting an album's codeblocks when you're on image page? - teeps - 2011-07-04 Thanks sbillard, that fixed it! 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 |