![]() |
|
How to use customized data - 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: How to use customized data (/thread-11289.html) Pages:
1
2
|
How to use customized data - sbillard - 2013-08-23 You can also get the global parent album from any album by How to use customized data - Papyrus - 2013-08-24 And with that useful call it's an even easier job. $variable = getUrAlbum($album_object). If $variable = photocards do this. If $variable = photobook do that. Cuts half the work of writing the function out. How to use customized data - sbillard - 2013-08-24 Except that the function returns an object, so what you need is How to use customized data - tosca - 2013-08-24 Thanks everybody for helping. The only thing that remains to make it 'perfect' is transforming it into a function so I can use it in any other php page. How to use customized data - tosca - 2013-08-24 @Papyrus: the purpose of using custom data or code block is precisely to avoid hard-coding. I didn't want either to make references to the album names or their parent. With my solution, I have nothing to add/modify when I add a new album, or modify one that already exists. I can even add as many new variables as I want too, they will be automatically available in the program. How to use customized data - acrylian - 2013-08-24 Good you managed it for your purpose! Many roads lead to Rome :-) How to use customized data - tosca - 2013-08-24 Yes, once you know how to find your way! ;-) How to use customized data - Papyrus - 2013-08-24 Well I'm very happy you worked it out. Always nice to see the different ways people tackle issues! If it does help anyone in the future though, I whipped up my variant of the idea as a foundation. I'm sure many future visitors would appreciate any alternate methods you might be employing spelled out for them if you feel like it, tosca. http://animepapers.org/software/zenphoto/code-snippets/multiple-layouts-dynamic-modification.html Probably far from perfect, but if anybody needs a reference it's there with a tiny bit of documentation. I'll also post here...and see how it comes out: `
` How to use customized data - acrylian - 2013-08-24 @Papyrus: Some quick comments:
How to use customized data - tosca - 2013-08-24 Here is the function I've written, but it is for retrieving custom data, whatever they are; in addition to custom thumbnails dimension, I've already used it to assign specific classes, and it could be used for anything else.
How to use customized data - acrylian - 2013-08-24 That's actually more or less what I suggested above btw :-) What is How to use customized data - Papyrus - 2013-08-24 @acrylian Ah! Thanks for the tips, will help me going forward. I knew that title was a bad thing to call but just couldn't remember off the top of my head what else to use...and it worked so I shrugged it off. Corrections are always appreciated. @tosca I see, a little different from what I pictured but useful for more than just many levels of image sizing. Looks nice. Thanks for contributing your code snippet too! How to use customized data - tosca - 2013-08-24
|