WordPress Plugin: Weighted Interests

I recently ran into Matt Kingstons’s Weighted Categories plugin. It was inspired by flickr’s tag list, showing tag usage with a font size for each tag proportional to the number of photos tagged.

I decided to clean it up a bit and make it work on pages that didn’t include all posts, and then turned it into an example of how to extend the FOAF Output Plugin profile page (example, download, source).

The current version is 1.1 (released 2005-01-02).

Changes since 1.0:
  • Fixed problems when no interests were found.

This plugin requires the FOAF Output Plugin. Note that only categories that are classified as interests by the FOAF Output Plugin (that is, the ones that have a URI in their description) are included in the list. If you wish to show all categories, simply change the line that gets the list of interests:

$cats=get_foaf_output_interests(falsetrue);

In case you are interested, here’s the CSS I added to my global stylesheet to make it look like it does:

.profile dl dd.weighted-interests { 
  text-align: center; 
  padding: 0.5em; }
.profile dd.weighted-interests li { 
  list-style: none; 
  display: inline; 
  margin: 0.2em; }
.profile dd.weighted-interests a { 
  text-decoration: none; } 

5 thoughts on “WordPress Plugin: Weighted Interests

Comments are closed.