Posted Sat, 29 Oct 2005
Folksonomy 1.2 is avaialble for download
Folksonomy is a pyBlosxom plugin that infers relationships between your blog entries based on tags; providing links to related stories, links to related tags, a tag cloud, and the ability to search for entries by tag.
What's New: As of Folksonomy 1.2, there are no longer any dependencies on other plugins. Folksonomy is now a complete tagging solution for pyBlosxom. If you're already using Tags or Tag Cloud, simple replace those plugins with Folksonomy, and you'll still have all the same functionality you had before!
Folksonomy Quick Guide:
Configuration
Add the following entries to your config.py:
py['pretext'] = "<div class="tags">Tags:"" py['posttext'] = "</div>" py['tagsep'] = ", " #py['tag_url'] = "http://mysite/tags" # defaults to $base_url/tags #py['tag_url_display'] = "http://mysite/tags" # defaults to tag_url #py['ignore_tags'] = []
pretext, posttext and tagsep will be used to render the $tags variable for your story template. tag_url is the
base url to search for tagged entries. Links to tags will be to the url: $tag_url/
Install Folksonomy
This parts easy, just copy folksonomy.py to your plugins directory, and enable it in your py['load_plugins'] if necessary. If you already have Tags or Tag Cloud installed, you may uninstall those plugins now.
Tag Your Entries
This part could be, as they say in French, the suck. Especially if you have a lot of entries. Tagging a single entry is very easy, just add a line like the following:
#tags tag1,tag2,tag3
Below your entry title. I've created a little helper script that will tag all your entries based on their category just to get you started (BACK UP FIRST, I TAKE NO RESPONSIBILITY FOR LOST OR DAMAGED CONTENTS). My friend Matt used it successfully though.
Set Up Your Templates
Now that everything's tagged, we need to set up your templates to show all the cool stuff. Starting with your story template:
- Add $tags to your story, mine is located just underneath the body. This will show the tags for your entry.
- Add $relatedstories, mine is located at the very bottom of my story template, and I use CSS to make it look nice.
- Add $relatedtags, I don't show this on my blog because I don't think it adds much value, but it's there if you want to use it.
Then your header or footer template for the tagcloud:
- Add $tagcloud or $populartagcloud wherever you like, mine is in my side bar defined in my footer template.
$popular tag cloud is a rebalanced subset of your full $tagcloud -- use this if you have a lot of tags with very few entries. It'll help reduce clutter on your page. I'm currently working to enable a URL that will show the full tag cloud for use with this feature.
Voila!
Your blog should now be folksonomy enabled. Easy, right?
Leave Feedback
I'm very excited about how well Folksonomy has been received so far in the pyBlosxom community, and I fully intend to keep it under active development. Please leave your feedback as comments here, or feel free to email me.
add to del.icio.us



