![]() |
|
How to print the outcome of getTags() - 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 print the outcome of getTags() (/thread-6765.html) |
How to print the outcome of getTags() - jackdaw - 2010-03-13 Now I have
How to print the outcome of getTags() - jackdaw - 2010-03-13 By the way, I know of the function printAllTagsAs, but I don't want to print ALL tags, just a list of tags used in a certain album. How to print the outcome of getTags() - acrylian - 2010-03-13 Sometimes looking at the documentation really helps: Do you know what an array is? If not I suggest to learn the php basics. To print an array you need to loop through it. For a one dimensional array like this one: http://www.php.net/manual/en/control-structures.foreach.php How to print the outcome of getTags() - jackdaw - 2010-03-13 I know what an array is, but don't really know how to use it. On a page with thumbs I would like the list of tags to appear (tags associated with images inside that album) In album.php I have this:
How to print the outcome of getTags() - acrylian - 2010-03-13 You should really read the doc carefully. You can't pass an array (the doc does not tell you that at all...). So on album.php or within the next_album loop it will print the album tagsg and on image.php or within the next_image loop it will print the image tags. (it will also print tags for Zenpage pages or news articles btw if used in that context). So you only need your 2nd line but in the right context. How to print the outcome of getTags() - jackdaw - 2010-03-13 So if I understand you correctly, what I want is not possible, because I want the tags of all the seperate images within an album displayed on the page with the thumbs (within album.php). That would make sense to me because then, inside an album with the title 'mammals' I could quickly jump to 'dogs' or 'german' or 'sheppard'. It would be nice if this was possible in the future. Thanks for your information though . How to print the outcome of getTags() - acrylian - 2010-03-13 I probably do not understand. So do you want to display all tags of all images within that album or the tags for each image in that album? The last is possible if you use the function within the next_image loop. The first is possible too but requires custom coding. I have something like that on my list though but it's not the only one..;-) How to print the outcome of getTags() - jackdaw - 2010-03-13 The tags for each image in an album is what I would like, so I would have to look into the next_image loop. I'll do that, and hopefully get it to work . Thanks. How to print the outcome of getTags() - acrylian - 2010-03-13 Then just add the printTags() within that. Of course some CSS styling of the list will be required. How to print the outcome of getTags() - jackdaw - 2010-03-13 Uh... sorry, but are the two options you mentioned not exactly the same??? So: all tags for all images inside that album in one list beneath or aside from the thumbs. How to print the outcome of getTags() - acrylian - 2010-03-13 No.
How to print the outcome of getTags() - jackdaw - 2010-03-13 Well, option 1 is what I wanted. So I'll have to be patient I guess, until the idea gets out of your mind and into a future release of ZP . How to print the outcome of getTags() - acrylian - 2010-03-13 Yes, sorry. (Or if you really badly need it you could also "sponsor" that feature/plugin.). How to print the outcome of getTags() - acrylian - 2010-03-14 Well, I figured I would like to have this function, too. So I indeed started on a plugin. Not sure if that will become an official one but I will make it surely available somehow. How to print the outcome of getTags() - acrylian - 2010-03-16 You might want to test the new plugin "tags_from_album" in tonight's nightly. How to print the outcome of getTags() - jackdaw - 2010-03-18 Hello Acrylian, I just tried the plugin, but somehow I'm not getting any results.
as I expected the function to automatically return the tags from the images within the current album. But with this I get: ` [*] ` Then I tried
but with the same result. Perhaps I'm doing something wrong. It would be nice if the function could return a taglist of a specified album > images, but in general I think it should return the tags from the current album > images. But like I said, perhaps I'm not using the function correctly. EDIT: I placed the function in album.php... How to print the outcome of getTags() - acrylian - 2010-03-18 The first does not work, this function requires an album to be set. Is "cows" a subalbum? Subalbum names are not the direct folder name but the path including parentlevels: How to print the outcome of getTags() - jackdaw - 2010-03-18 Ok, so now I did this: but still the same (no) results and the same empty html output. How to print the outcome of getTags() - acrylian - 2010-03-18 Are you really sure that the images in that album have tags and that you are in album context??? Are there really direct images in that album you are trying? If not the 2nd parameter needs to be "true". Or any errors in the server log maybe? (I have of course tried it and it did work...) How to print the outcome of getTags() - jackdaw - 2010-03-18 You can take a look at this album: cows. The first four pictures I gave tags. Underneath the thumbs I placed the code
|