Pages (2):    1 2
Member
Member
tplowe56   07-02-2013, 22:05
#21

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.

Administrator
Administrator
acrylian   08-02-2013, 20:23
#22

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

Member
Member
sbillard   08-02-2013, 21:55
#23

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

Member
Member
sbillard   09-02-2013, 01:20
#24

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.

Administrator
Administrator
acrylian   09-02-2013, 11:13
#25

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.

Member
Member
vincent3569   09-02-2013, 13:41
#26

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.

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.