that site seems to be a little broken - i'm clicking on the "recently created" links and nothing is happening...
now - your basic tag cloud has the tags as seperate keywords to the content of an article (or whatever your unit item is) - some sites like the public add tags - others are less free in their input...
i will be describing a skeleton system - i am very tired - results may vary, and any code is under a negative warranty
now, for this basic model, all you need is a text input, and specify that tags are seperated by a specific character (comma is a good one - this allows you to have two-word tags...
then, in your backend, you explode/split the tag string, and now you have an array of tags for that article.
the database is really where all the action is at...
near as I can tell, the best thing is to have a table where the primary key is the article ID combined with the tag
easily done in MySQL:
Code:
CREATE TABLE tag (
article_id BIGINT UNSIGNED,
tag VARCHAR(255),
PRIMARY KEY article_tag (article_id, tag)
);
note: i know that MyISAM allows FULLTEXT indexes, but I'm not sure how that works for primary keys, so I specified VARCHAR with the maximum allocation
so, that array of tags for an article, just run through it with a REPLACE query for each tag:
Code:
REPLACE INTO tag SET id=$article_id, tag=$tag;
after sufficient processing and cleaning of input, obviously
MySQL
REPLACE is great
Want the tags for a specific article?
Code:
SELECT tag FROM tag WHERE article_id=$article_id
Want a cloud?
Code:
SELECT UNIQUE tag, count(tag) FROM tag;
gets you a list of all tags and how often they're used - then some maths and manipulation of relative font-sizes, and you have a nice looking tag cloud...
changing, deleting, and adding are all just as easy with this db setup, really
possible enhancements
well, I haven't really covered presentation...
auto-tagging (from your content) - now that would be complex
tag hints - start tagging, and then suggest related tags that could also be used