printAllTagsAs('cloud') show nothing

Hi,

i tried to use <?php echo printAllTagsAs('cloud'); ?> in my index.php of my theme.
My albums have tags but the printAlltagsAs() function shows nothing. Any idea ?

Thanks

Comments

  • Thanks.

    and i have a suggest for getAllTags().

    Tags in albums are separated by a space in the row "tag" in the table "albums". So when you get all tags from the albums and you add a comma, you have this

    <tag1 of album1> <tag2 of album1> <tag3 of album1>,<tag1 of album2> <tag2 of album2> <tag3 of album2> ...

    So printAllTagsAs() will print tags in blocks. you understand ?

    The solution is to replace " " by a comma in getAlltags() :

    $alltags = str_replace(' ',',',$alltags.$row['tags']).","; // add comma after the last entry so that we can explode to array later
  • acrylian Administrator, Developer
    printTags has an option for a separator.

    printAllTagsAs is meant to print either a list or a tag cloud, so there would be no need for a comma. Maybe I don't get what you want to do?
  • See the difference beetween the 2 cloud on my gallery : http://www.gregserveur.com/zenphoto/

    On the first (proposed by the zenphoto), you can't select 1 tag. you can only select a block.

    On the second, (with my modification), you can select each tag
  • acrylian Administrator, Developer
    Tags in albums are separated by a space in the row "tag" in the table "albums". So when you get all tags from the albums and you add a comma, you have this
    Now I see it. I just overread that detail in your first post. You should have separated the tags with commas in the first place when you enter them in the admin. Then there will be now need for hacking.
  • thanks for your precision. it works fine.

    but, for exemple, i have a tag "mer" which appear in 2 albums and he have the same size as another tag which appear 1 times like "ile" ?

    I call :
    <?php echo printAllTagsAs('cloud','','abc',FALSE,TRUE,2,50,1,null); ?>
Sign In or Register to comment.