Tags in Lifetype

Tags in Lifetype

Postby chromos on Sun Nov 16, 2008 10:46 am

I am actually implementing onsite tags into lifetype. They should work similar to categories.

I am thinking about making everyting taggable: Users, Blogs, Articles, (Resources?) and it should be as easy as the technorati plugin ( seperating the tags with a commata)
I am actually thinking about which sql table structure to choose.

I've thought about a similar structure to the article_categories_link but I'd have to create 3 different tables, so I am actually thinking about creating just one big tags_link table.

The problem that would arise is that we have all different kind of ids mixed in this very table ... user ids, resource ids, articles ids, blog ids.
That's why I am asking for suggestions on which way to go. We'd also need some kind of boolean flag which shows whether it is a user, resource etc.

I added for testing purpose just a column with a text field with either 1 or 0 in it to indicate which kind of id this tag belongs to.

My favorite is the one big table solution. So you'd be easily able to get all tags e.g. for the summary, but you'd have to differentiate between all kind of different objects ...
any thoughts?
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Tags in Lifetype

Postby jondaley on Sun Nov 16, 2008 10:57 am

For your test column, perhaps it should be an "enum" of sorts - where instead of just zero and one, you have 0=users, 1=blogs, 2=resources, 3=articles, etc.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Tags in Lifetype

Postby chromos on Sun Nov 16, 2008 1:47 pm

hey nice tip. I am not that experienced with mysql yet, so I'll have to figure that one out :)
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Tags in Lifetype

Postby jondaley on Mon Nov 17, 2008 5:14 pm

I put "enum" in quotes, because I'd probably just make it an integer, and stay away from things that are bound to be incompatible with various versions.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch


Return to Requests and Suggestions

cron