ZenphotoCMS Forum
Tag Cloud - modify large font threshold? - 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: Tag Cloud - modify large font threshold? (/thread-10820.html)

Pages: 1 2


Tag Cloud - modify large font threshold? - tplowe56 - 2013-02-07

Thanks for the tip Vincent. Looks like there is no way to do a random sort. Your right, any input except "results" prints in alphabetical order. Random order would be a nice option, making a better looking cloud.

Just out of curiosity, I googled word cloud images & couldn't find any that were sorted alphabetically.




Tag Cloud - modify large font threshold? - acrylian - 2013-02-08

Please open a ticket, might be that something got lost on the way.




Tag Cloud - modify large font threshold? - sbillard - 2013-02-08

"unsorted" really means the way they were found--no particular organization.




Tag Cloud - modify large font threshold? - sbillard - 2013-02-09

BTW, I would guess that some consideration should be made for how a "random" sort meshes with the limit parameter. Do you randomize before or after taking the limiting function? If you do it before you will get a different set of tags each time the cloud is displayed.




Tag Cloud - modify large font threshold? - acrylian - 2013-02-09

Looking at the printAllTagsAs function it seems only the sortorder "results" is checked. In that case the resutls is sorted by arsort. "abc" is not checked or sorted at all. All tags are fetched by getAllTagsCount(). So either that has been forgotten or got lost. But in any case that must be that way for years...

Interestingly the tags_extras plugin which was modeled after this does not even have a sort parameter.




Tag Cloud - modify large font threshold? - vincent3569 - 2013-02-09

in getAllTagsCount, you will find this code :
$sql = "SELECT DISTINCT tags.name, tags.id, (SELECT COUNT(*) FROM ".prefix('obj_to_tag')." as object WHERE object.tagid = tags.id) AS count FROM ".prefix('tags')." as tags ORDER BY 'name'" ;

so, in printAllTagsAs, in all case but $sort="results", tags are by alphabetical order.