Adding tagging to my php CMS
March 22, 2006 1:51 PM
Subscribe
Whats the best way to setup and implement a tagging/folksonomy system into a php content management system from scratch?
I use a custom php based content management system at my work and i'm wondering what what the best way to set up a tagging/folksonomy type system like the ones you see here and delisous, etc. i'm building it into my system by hand, but i'd really like some advice on where to start, such as table structure, useful functions, etc.
I appreciate any help, this has been a difficult thing to google for.
posted by yeahyeahyeahwhoo to computers & internet (12 comments total)
1 user marked this as a favorite
You have a tags table in your db, and it should have fields for tag_name and parent_id at the very least. The parent_id corresponds to whatever you are associating tags with, be they single pages, blog posts, whatever.
Then you create a form to add tags however you want (flickr style, or make them like yahoo's myweb) and associate them with your parent_ids when adding new content or editing old content.
Finally, you just display them on the appropriate page where parent_id = foo and you grab all tag_name items with parent_id = foo.
posted by mathowie at 2:08 PM on March 22, 2006