I have a couple of problems using the printAllTagsAs function:
When displaying the tags on - for example - this page, the number of tags for "Format carré" is displayed as 19, though only 12 are returned as the search result... if you're a visitor!
As the admin, I can see 19 thumbnails, 7 of them being duplicates with a wrong URL (a double slash in the path, instead of a simple one).
I have a "Blanc" (= white color) tag affected to 3 pictures, and it displays a count of 3. I also have a "Noir et blanc" (for black and white pictures) tag that displays a count of ... 38 though only 18 thumbnails are returned when the tag is clicked upon.
But the "Blanc (3)" also returns the "Noir et blanc" pictures!
Here is the syntax I currently use:
printAllTagsAs('cloud', 'content', 'abc', TRUE, TRUE, 1, 10, 2,NULL,1)
and you can see the results on the gallery, there is a 'Tags' tab at the bottom right of each page.
I'm using Zenphoto last version (upgraded this morning), have tried to empty the images caches, and update the DB, but with no result.
Thanks for helping.
In fact, I'm not sure the problems are completely related to the printAllTags function as I just realized I get the same results with the Default theme.
The only thing that is different is the Default theme doesn't display the number of tags prior to display the thumbnails, so no discrepancy is visible; but I still have double thumbnails when I'm logged as admin, and a 'normal' situation as a visitor.
What are your search settings? You can set if you want tags to be searched partial or exact. If the first "blanc" will trigger "noir et blanc".
As the logged in admin with appropiate rights you always see and get unpublished and/or protected items displayed.
This all has nothing to do with the theme itself.
Thanks for your answer: I hadn't seen this option for exact match for tags; now "Blanc" returns only the 3 pictures I was looking for, and none of the "Noir et blanc" tagged. Question 2 solved.
Question 1 remains, though:
printAllTagsAs function is not correct (from the visitor's point of view, but it appears to match the number of thumbnails I get when I'm connected)PS: If you want to check, these were the first 3 thumbnails I got when using the tag "Noir et blanc" in the bottom TAGS tab.
The database is a complete mess! Refresh doesn't work and goes on looping.
Using PhpMyAdmin, I've already cleaned the images table: most of them were there 2 or 3 times, sometimes even 4 or 5 records for the same picture...
For the albums table, I have folders beginning with a /, and others without; which one is the correct syntax?
Several minutes later: after the whole 'cleaning', the DB refresh eventually worked; the tags search seems to be OK now, and the tags counts are right.
There is still the albums table that needs some cleaning as albums seem to appear twice: one with a leading slash, and one without; and I don't know which one I must remove.
Thanks for information on the subject.
And I guess something might have gone wrong either in this last version or a previous one, as the theme I've developed uses what's in the DB, but never write in the database; and I had never used PhpMyAdmin previously with the Zenphoto DB.