ZenphotoCMS Forum
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)

Pages: 1 2 3


How to print the outcome of getTags() - acrylian - 2010-03-18

I wonder why it worked for me. Anyway, will try to reproduce and solve it. Thanks for testing.




How to print the outcome of getTags() - acrylian - 2010-03-18

I fear I can't reproduce it. Neither on my local MAMP install nor on my live test site. See here working as expected: http://zenphoto.maltem.de/album1
Called with printAllTagsFromAlbum($_zp_current_album->name,false,"images"); right before the description call and the next_image loop.

There must be something different. Maybe you can try a standard theme?




How to print the outcome of getTags() - jackdaw - 2010-03-18

That's weird, because I tried exactly your code in album.php of the default theme at three places and get the same results as before: nothing .




How to print the outcome of getTags() - jackdaw - 2010-03-18

Correction... I get only the numbers within the default theme and no valid link or name:

[*] (130)




How to print the outcome of getTags() - acrylian - 2010-03-18

Indeed weird. Maybe it's a MySQL issue. Which version do you have? I have only tested with MySQL 5.1.37 (locally) and MySQl 5.0.51.a (live test).




How to print the outcome of getTags() - jackdaw - 2010-03-18

PHP Version 5.2.10
MYSQL 4.1.22




How to print the outcome of getTags() - acrylian - 2010-03-19

I guess the MySQL version might then be the cause of this althought I think this should actuall work with 4. But I wonder why there is no error message then...

Could you maybe upgrade to MySQL 5? We recommend that anyway...




How to print the outcome of getTags() - jackdaw - 2010-03-19

I'll have to ask my provider if he can do this for me. I'll let you know the result.




How to print the outcome of getTags() - acrylian - 2010-03-20

Ok, mine lets me switch it myself on its admin backend.




How to print the outcome of getTags() - acrylian - 2010-03-23

I did some investigation and found out that the query I originally adapted indeed did not work exactly as expected. So I reworked it. The change will be in tonight's nightly. Please give it a try, it should really not require MySQL 5.




How to print the outcome of getTags() - jackdaw - 2010-03-25

Using the code underneath, I still get only numbers in the default theme and nothing in my own theme.

`

`




How to print the outcome of getTags() - acrylian - 2010-03-25

If there are no entries I am running out of ideas... Please try the getvariant and put thte result in a variable. Then do a print_r() on it to see if there is really nothing.




How to print the outcome of getTags() - jackdaw - 2010-03-25

I am so stupid...
I did not download the latest nightly

I'll let you know in a minute of it works...




How to print the outcome of getTags() - jackdaw - 2010-03-25

I think it works
I'm just getting this warning:

Warning: Division by zero in /srv/jackdaw/www/www.spoenk.nl/beeldend/zp-core/zp-extensions/tags_from_album.php on line 122




How to print the outcome of getTags() - kagutsuchi - 2010-03-25

You're missing a parameter from the function call, either $showcounter or $tagcloud.




How to print the outcome of getTags() - jackdaw - 2010-03-25

Thanks for that. It seems to work now. I did forget one of those parameters.

But... something else is not quite right yet, I think.
When you look at this link, at the bottom of the page some tags are listed. But only the tags 'fabriek' and 'stoelen' are actually tags within that album and subalbums. You can check that by clicking the second, third and fourth subalbum. There are no tags in those albums, just two in the first one ('behangfabriek rijen'). The other tags are tags that belong to images in other albums.




How to print the outcome of getTags() - acrylian - 2010-03-26

Hm, I see. Will take a look.




How to print the outcome of getTags() - acrylian - 2010-03-26

You were right. I hope I fixed it this time. New version in the svn.




How to print the outcome of getTags() - jackdaw - 2010-03-26

Hello Acrylian,

Thanks, works much better now .
I only get this code when I'm on an album page with only album thumbs and no image thumbs:

Warning: Invalid argument supplied for foreach() in /srv/jackdaw/www/www.spoenk.nl/beeldend/zp-core/zp-extensions/tags_from_album.php on line 122

I placed the function at the bottom of album.php, so the function is called on pages with just albums and pages of image thumbs. I hope it has nothing to do with that normalizecolumns thing, because I don't use that.

Also I'd like to now if there is a function which can check if the images inside an album has any tags. That way I can hide the line 'Tags inside this album:' if there are no tags.




How to print the outcome of getTags() - acrylian - 2010-03-27

Thanks for testing. I get this warning also, this is still a "bug" within ther "print" variant and will go away soon. I first wanted to know if the function itself now generally works.

The normalizeColumns function affects only the loops, not this function.

Once this is really finished you will be able to use the getAllTagsFromAlbum (with the same parameters like the print one) to do this check. This then will return "false" if there are no tags.