karthikbgl / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

sort limited tagcloud #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hiho

say i have 1000 tags and limit the result to 
tag_cloud = Tag.objects.cloud_for_model(MyModel, steps=4)[:100]

the tagcloud shows tags from letter a to m for example, but it should show
up the 100 most used tags and sort them by name.

i don´t see how i can do this.

Original issue reported on code.google.com by jefferso...@googlemail.com on 16 May 2007 at 11:55

GoogleCodeExporter commented 9 years ago
now that you moved the calculation to utils i wonder if you could make this 
generic
so one could pass in whatever with a count and gets back a cloud... user with
topic.count, topic with comment.count, files with download.count, etc etc etc

maybe django.contrib.webdesign would be a good place for it. ;)

Original comment by jefferso...@googlemail.com on 18 May 2007 at 8:59

GoogleCodeExporter commented 9 years ago
I'm happy to open a separate ticket for this if you like, but along siimlar 
lines --
the tag subcloud should perhaps have the option to have its steps not be 
relative to
the complete cloud.

For example, let's say we have two bloggers ('b1' and 'b2').  Blogger b1 uses 
tags t1
with 20 entries and t2 with 2 entries.  Blogger b2 uses tags t1 with 1 entry 
and t2
with 2 entries.  The resultant global tag cloud will result in t2 having a 
bigger
font than t1.  Same is true for b1's tag cloud.  However, for b2, that same tag 
cloud
would be misleading.  Rather, t2's font should be larger than t1's font for the
second blogger.

I hope that makes sense?

Original comment by seema...@gmail.com on 5 Jun 2007 at 4:07

GoogleCodeExporter commented 9 years ago
please ignore me, for I know not what I speak.  I tested the wrong case and 
that's
why I failed to see that it does already work the way I suggested in comment 2. 
Sorry for the bugspam and the time wasted in reading it. :(

Original comment by seema...@gmail.com on 5 Jun 2007 at 6:16