Member
Member
lainyrache   10-07-2014, 10:51
#1

Hi
Can anyone help? I am using Zenphoto version 1.4.6 & php 5.4

I would like to have a tag cloud that displays all tags on the site, whether they be on a page, news, image or album.
So that an album can use the same tag as a news item.
Is this possible ?

I am using the plugin tag_extras
I have tried
`

and

I am getting the following errors.

Warning: Invalid argument supplied for foreach() in /home/ch/public_html/dev/zp-core/zp-extensions/tag_extras.php on line 290

Warning: array_unique() expects parameter 1 to be array, null given in /home/chalkwor/public_html/dev/zp-core/zp-extensions/tag_extras.php on line 292

Warning: Invalid argument supplied for foreach() in /home/ch/public_html/dev/zp-core/zp-extensions/tag_extras.php on line 293

`
Any ideas on what I am doing wrong or is this a bug?

Administrator
Administrator
acrylian   10-07-2014, 11:48
#2

No bug, you are using it wrong ;-) printAllTags() requries an array of the tags to display as generated by the getAllTagsFromXXX functions (as written on the documentation). It is the base function for the printAllTagsFromXXX functions.
getAllTagsFromAlbum_multi_unique() is not meant to be used standalone at all.

This plugin is meant to get only the tags from Zenpage news or pages or a specific album plus optionally its subalbums

If you want all tags as a cloud regardless from where use this one: http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintAllTagsAs

That function is also the example on how to read the user guide:
http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide

Member
Member
lainyrache   10-07-2014, 12:06
#3

Thanks Acrylian.
I now have a list with

This prints a list rather than a cloud but that may be something to do with my theme. I am sure I can work it out.
thanks for your help
e

Administrator
Administrator
acrylian   10-07-2014, 12:15
#4

Yes, it does print a list but the function does not have default css so the theme has to control it. You can look at the standard themes' css. But you should see different sized tag names depending on the number of usage as those are added inline.

Member
Member
MarkRH   12-07-2014, 00:34
#5

Yeah, I just got through playing around with the tag cloud on my gallery that I'm working on yesterday or the day before. In the Garland theme that mine is based on, I noticed that it had a "tags" CSS class. So, in that function call, I would use "tags" as the second parameter:
printAllTagsAs('cloud' , 'tags', NULL, FALSE, TRUE, 2, 25, 2, NULL, 0.8);

I modified the CSS of the class to make it look more like what my current Gallery 3 tag cloud is doing.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.