Ticket #5171 (assigned enhancement)

Opened 1 year ago

Last modified 9 months ago

Add parameters to "tag_cloud()" to bypass size variation, and to show frequency counts

Reported by: brh Assigned to: westi (accepted)
Priority: normal Milestone: 2.9
Component: Template Version:
Severity: normal Keywords: has-patch
Cc:

Description

I wanted to display a "tag cloud" using the tag_cloud() tag, but without any inline font-size tags, and with the frequency of the tag displayed beside the tag (like it can be with categories). You can see an example at http://brh.numbera.com/blog/. To do this I added the "varysize" and "showcounts" parameters to the tag.

Attachments

category-template.php.diff (1.6 kB) - added by brh on 10/09/07 03:18:12.
Patch against trunk (rev. 6206) to add these two parameters

Change History

10/09/07 03:18:12 changed by brh

  • attachment category-template.php.diff added.

Patch against trunk (rev. 6206) to add these two parameters

10/09/07 15:06:55 changed by foolswisdom

  • milestone set to 2.4.

10/09/07 18:48:21 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

Accepting Ticket - I will review this and checkin.

10/09/07 18:55:35 changed by westi

Note to self - See also #5131 and #5172

10/16/07 06:45:01 changed by Otto42

I think the whole tag cloud function might need a rethink here. This is the first tag cloud function I've seen using inline styles instead of simply assigning weight and ID classes. Inline styles are generally bad form, and move presentation out of the theme and into the core, which is the wrong way to go.

I propose getting rid of the inline styles entirely, and adding some styles to the bundled themes, so as to show how it's done. I suggest tag-cloud-weight-X and tag-cloud-id-X classes.

Yeah, it'll break some things. So deprecate for a version if you feel it's needed, but 2.4 should clean this up a bit and ditch the style="whatever" entirely from the tag cloud.

01/23/08 15:47:16 changed by AaronCampbell

+1 for the inline styles being a bad idea

03/19/08 23:44:58 changed by ffemtcj

  • milestone changed from 2.5 to 2.6.