How do I begin with categories or a tag cloud?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
helloworld
Forum Newbie
Posts: 3
Joined: Tue Jul 28, 2009 9:40 am

How do I begin with categories or a tag cloud?

Post by helloworld »

Hi everyone,

I have a basic cms and would like to add categories and tags to each picture. The problem is im trying to work out how to tag muliple cats to each picture? Anyone know any good tuts on this, or even better how would I go about doing this?

Thanks! :)

edit: the categories need to be added dynamically and an array to checkboxes to inset muliple data, this is where im stuck also
Theory?
Forum Contributor
Posts: 138
Joined: Wed Apr 11, 2007 10:43 am

Re: How do I begin with categories or a tag cloud?

Post by Theory? »

I've never done this, but I'd think the easiest way would be make a "cloud" object that accepts objects of type "category". Each category could be a unique object that inherits the Category object and I guess those objects should probably have some reflective properties, etc. Give the Cloud object the ability to count the number of instances of each unique category and then create some view logic that translates those numbers into font sizes.

Again, never made a tag cloud before, that just seems like a painless way to do it. Stand by for more informed answers.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: How do I begin with categories or a tag cloud?

Post by VladSun »

Maybe you'll find this thread useful:
viewtopic.php?f=2&t=87657&hilit=+tag
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply