How To Make a Tag Cloud

Jeffery Zeldman proclaims that tag clouds are the new mullets. However, as I'm sure you're aware some people just can't resist the mullet.
I actually find my tag cloud quite handy because it lists all my tags on one page, and I can see what topics I post about most frequently quite easily. I also use it as a way to see which tags I have already used, so I can be consistent when tagging posts.
Anyways a lot of folks would like to know just how you can get one of these mullets, er tag clouds. I have shown how I do it below using CFML. If you don't use ColdFusion you should still be able to follow along.
At this point you may be wondering what's a tag cloud? If so consult the picture below:
Ok, now let the mullets reign...
Step 1 - Get a list tags, and their frequency
<cfquery datasource="#dsn#" name="tags"> SELECT COUNT(tag) AS tagCount, tag FROM tblblogtags GROUP BY tag </cfquery>
In my tag cloud I list all my tags, but if you have a lot of tags you may want to limit the min number of occurrences using a HAVING statement. For example HAVING tagCount > 5
Step 2 - Find the Max and Min frequency
<cfset tagValueArray = ListToArray(ValueList(tags.tagCount))> <cfset max = ArrayMax(tagValueArray)> <cfset min = ArrayMin(tagValueArray)>
Step 3 - Find the difference between max and min, and the distribution
<cfset diff = max - min> <cfset distribution = diff / 3>
You can define the distribution to be more granular if you like by dividing by a larger number, and using more font sizes below. You will probably need to play with this to get your tag cloud to look good.
Step 4 - Loop over the tags, and output with size
<cfoutput query="tags"> <cfif tags.tagCount EQ min> <cfset class="smallestTag"> <cfelseif tags.tagCount EQ max> <cfset class="largestTag"> <cfelseif tags.tagCount GT (min + (distribution*2))> <cfset class="largeTag"> <cfelseif tags.tagCount GT (min + distribution)> <cfset class="mediumTag"> <cfelse> <cfset class="smallTag"> </cfif> <a href="/tag/#tags.tag#" class="#class#">#tags.tag#</a> </cfoutput>
Step 5 - add css classes to your stylesheet
.smallestTag { font-size: xx-small; }
.smallTag { font-size: small; }
.mediumTag { font-size: medium; }
.largeTag { font-size: large; }
.largestTag { font-size: xx-large; }
There are probably lots of different ways to build a tag cloud, but this is the first method that came to mind.
Tweet
add to del.icio.us
| Tags: tags, blog, tagging, folksonomy, tag cloud, cfml, tips
Related Entries
- Make your blog better with tags - October 14, 2005
- Increase Productivity with Action Tagging - August 1, 2005
- Some del.icio.us Tips - June 16, 2005
- Related Posts - April 8, 2005
- Visualization of my del.icio.us tags - April 24, 2006
Trackbacks
Trackback Address: 396/0DC2E1468A11C1CA211B6EB893BEA4E5
- Profile: TagCloud TechCrunch
- DIY Tag Cloud Library clips
- Tag Cloud per AVBlog Andrea Veggiani - Blog personale
- TagClouds Obervations, font sizes and colors ? 3spots ? ? ?
- BRAND TAG CLOUDS Population Statistic
- How To Make a Tag Cloud ????????? ??
Comments
On 06/27/2005 at 11:54:50 AM EDT ForgetFoo wrote:
1
awesome post!
thanks alot for posting this, along with some code... much appreciated ;)
/foO
On 07/03/2005 at 1:16:34 AM EDT Francis Shanahan wrote:
2
I made this: "TagLines" http://www.francisshanahan.com/taglines/default.aspx?cat=All
it's an auto-folksonomy tool built using the Term Extraction APIS. It combines Ajax with Folksonomies and Yahoo Web Services to allow you to search on RSS feeds, News, Movies, Images or just obtain the original story, all without a page-refresh.
Would love to get some feedback on it or suggestions for improvement. regards, -fs
On 07/05/2005 at 9:54:04 PM EDT Scott Burton wrote:
3
Coolness, now I will just need a mullet to match. I might even let my hair grow in the middle back into a "tail" like we used to in the 80's now that would be cool!!!!
I need to implement this on my site www.similarthings.com :) Minus the mullet!
On 07/06/2005 at 12:51:04 PM EDT Pete Freitag wrote:
4
Cool Site Scott, "Not Even in Beta", I like it!
On 07/06/2005 at 3:04:00 PM EDT Scot Burton wrote:
5
Hehe, I'm glad you like that. I figured I might as well jump on the whole "BETA" bandwagon.
Did you sign up? You should check it out, I have added some nice Ajax and Effects to some of the admin.
On 07/07/2005 at 1:34:01 PM EDT Michael Arrington wrote:
6
Great Post.
On 10/21/2005 at 1:39:22 PM EDT Jake - BlogFusion wrote:
7
Oh man! I wish I'd found this earlier... I'm working on the new version of BlogFusion (v5.0) and am building in tags.
I did the font sizing a bit differently, but it's the same basic premise.
The task I'm working on now, however is: How would one add the capability to display at least one tag for every letter of the alphabet?
Assume for a second that you have 5500 tags in your tag table. That's alot of tags to display - so what I would want to do is find enough tags to fill out a max of 100 tags, for instance, with at least one tag from each letter of the alphabet. (otherwise, you might have the first 100 tags be A-G, rather than A-Z...looks strange to users, and skips cool content in the H-Z range)
Anyway, tags are cool, and thanks for the ideas!!
On 12/04/2005 at 1:54:20 AM EST Travis Reeder wrote:
8
Muchos gracias!
I used your ideas here: http://www.rel8r.com/tags/
On 01/13/2006 at 6:18:28 AM EST Henry wrote:
9
Hi Pete. New year greetings. Nice work. Tagging will be used on the Do Me a Favor Buddy site soon too. I'll keep you posted: www.domeafavorbuddy.com
On 03/07/2006 at 10:51:15 AM EST Ryan Guill wrote:
10
Awesome, once again, you are the man
On 03/21/2006 at 7:58:12 AM EST DENiAL wrote:
11
Awesome, I hope I can use this. I have an idea, and it involves tagclouds. :D
On 04/07/2006 at 1:03:11 PM EDT Ujwala wrote:
12
Hi!
i loved the idea of having my own tag cloud. i tried eurekstr and zoomcloud but this seems like a better idea.
I tried cutting an pasting this in my template under the sidebar section and I get no results. I also tried adding <script> and </script> after now the #tag thingies disappear but there is no tag cloud.
I know that I doing something wrong. I hope it is simple and I hope you can help.
On 04/15/2006 at 5:07:03 PM EDT Tomasz Topa wrote:
13
Great post. The method presented here is very simple and very easy, which results in being extremely useful.
Thanks!
On 04/26/2006 at 10:14:54 AM EDT Richard Harlos wrote:
14
Hey! Thanks for this article!
I was just talking with a friend about how to create a tag cloud for my blog but I wasn't sure how to go about it.
Although I don't use ColdFusion, your article was (as you said!) easy enough to follow. I'm going to get to work on creating my own tag cloud today! (I use WordPress as my blogging engine so I guess I'll be writing my code in PHP as a plugin.
Thanks for this helpful article!
On 07/07/2006 at 11:30:45 PM EDT thomas wrote:
15
alright, no matter how far i search though google, i always end back up here, so would anyone be able to help me change this into php & mysql so i can use it on my small site. Thanks you in advance, and i'll be willing to do a web design or promote your site or what ever, just either post here or email me ar thrasher.basher@gmail.com
On 07/17/2006 at 10:55:21 AM EDT Anders Dahnielson wrote:
16
Thomas: I've written a entry on how I implemented this for my WordPress blog (in PHP).
http://en.dahnielson.com/2006/07/blog-overcast-tagclouds.html
On 07/19/2006 at 9:52:07 AM EDT Chris Estes wrote:
17
I had no idea tag clouds were as cool and hip as mullets.
On 09/09/2006 at 2:00:36 PM EDT Jason Bartholme wrote:
18
Hi Pete, I used your script and have it running on my CF powered article directory.
http://www.ArticleOnRamp.com/Tag-Cloud.cfm
Thanks!
On 09/29/2006 at 8:40:56 AM EDT HM2K wrote:
19
Could you provide details of your table structure so this method of implimentation can be used on other systems.
On 10/10/2006 at 10:45:22 AM EDT Mary wrote:
20
Hi all, I only started looking into tag clouds since yesterday and I have to say I am a bit confused. I am an excellent user on html and DreamWeaver but I have never touched Coldfusion. Does anyone now any other articles or tutorials that would help me understand more about tag clouds, where they are used and how!
Some of my questions:
Are they only or mainly used for blogs?
What kind of tags do I use to link the key words with the tag link generator (tag cloud links I supose).
Does the above script goes in the head or the body of the page.
As you can understand I am completely lost. Thank you all in advance
On 10/13/2006 at 4:48:47 AM EDT Richard wrote:
21
What's your database table like for that?
On 11/20/2006 at 10:47:15 AM EST Iscandar wrote:
22
Hey, love the idea, but also am having issues trying to figure out how the database table is set up. Any help?
On 12/09/2006 at 3:33:13 AM EST Druckerpatronen wrote:
23
great site with very good look and perfect information?is a very good site? like it
On 01/11/2007 at 11:47:28 AM EST Ed wrote:
24
Jeff, I just wanted to say thanks for this, you saved me loads of work and the cloud works beautifully. I adapted it to run with percentages rather than a straight COUNT. Anyway, it seemed only polite to say thank you :-)
On 01/11/2007 at 1:26:26 PM EST wan1980 wrote:
25
I do not sure how this tag cloud work What DB you connect it and what language is that??XML??
http://www.8coupons.com
On 01/25/2007 at 1:10:36 PM EST Anil wrote:
26
Fantastic information. I could build a cloud in django using this.
On 02/26/2007 at 3:26:07 PM EST Anteuz wrote:
27
Very nice, simple yet effective. I translated it to Java 5 for usage in my website http://unitedcxp.org/BulletBlog
On 03/12/2007 at 3:41:22 PM EDT Praveen Angyan wrote:
28
Thanks, I've created a design primer for developers who want to implement tagging in their applications and I've linked to your article for creating a Tag Clouds in Coldfusion.
http://www.taskfly.com/blog/?p=6
On 03/22/2007 at 12:19:47 PM EDT FP Images wrote:
29
We made this tag cloud: http://www.featurepics.com/editorial/tag-cloud.aspx
We have added a little bit "colors" to the final styling (selected a main color and blended it).
On 03/22/2007 at 7:48:48 PM EDT Mark King wrote:
30
I couldn't post HTML so go here to see my version of this (allows as many tag sizes as you like).
http://mgk1969.wordpress.com/2007/03/23/making-a-tag-cloud-in-coldfusion/
On 04/14/2007 at 5:52:41 AM EDT im ben wrote:
31
we made this tag cloud http://www.gencler.info
On 04/25/2007 at 8:36:22 AM EDT Bill wrote:
32
Have this:n
On 04/29/2007 at 12:48:46 PM EDT Bob wrote:
33
Have this:n
On 05/31/2007 at 10:49:58 AM EDT exl wrote:
34
Or (if one still have the list of tags) one could use this http://jsbuzzwords.axelschneider.info/ script to generate a tag-cloud. It is described in german but you could translate it - or you read the sources.. ;-)
Many regards, exl
On 07/03/2007 at 10:55:03 AM EDT mike7 wrote:
35
I have bought the paid module. Works without problems. I recommend http://www.magneticone.com/store/CRE.Loaded.Modules/Tag.Cloud.CRE.Loaded.Module
On 08/16/2007 at 3:17:45 AM EDT Sally wrote:
36
I'm a Chinese girl, and Google guides me to your site.Thanks to your idea. It's very cool.
On 08/16/2007 at 3:18:17 AM EDT Sally wrote:
37
I'm a Chinese girl, and Google guides me to your site.Thanks to your idea. It's very cool.
On 09/14/2007 at 6:52:34 PM EDT Frosty Trees wrote:
38
I recommend MakeCloud.com It offers a very easy way to make a tag cloud and embed it in a blog or anywhere else.
On 10/18/2007 at 9:05:04 AM EDT Ankush wrote:
39
U r a genius.I was very new to this bt then after reading this,I am feeling very comfortable.
On 10/29/2007 at 1:22:22 PM EDT VIVi wrote:
40
Hi,
Do you think that I can implement this tag clouds on my html website? http://www.jocuri.pe-net.info or it's working only on php sites,
Thank you
On 11/01/2007 at 3:34:35 AM EDT euxx wrote:
41
I find that using log functions gives better results.
http://blogs.dekoh.com/dev/2007/10/29/choosing-a-good-font-size-variation-algorithm-for-your-tag-cloud/
On 11/08/2007 at 7:21:49 PM EST Anonymous wrote:
42
lreeeeeeeeeeeeeeeeeeeeeeeeeehrgesg jkvfjkldjklbnklbklbvklbvckljjg ;htri;otomjytbypbnm6kgvfjklsrusypsdfmgnlnvcmavher to f artiapoce c8dfaepo eea ee v era ef t rtyovhvuia t auhrlhfvreuifypsa4ehpapepasuprfgljrsaghlrhjsgahlrjghrjkgerhgrjhjrehtu4yt8p4r458499344jr89eeeeeeeee gjksvhgrsghlp;svhgdn;ugjkjl;gjs
On 12/09/2007 at 11:24:26 PM EST Brad wrote:
43
If anybody's having trouble, just replace step 4 with something like this -- <cfloop query="tags"> <cfif tagCount EQ min> <cfset class="smallestTag"> <cfelseif tagCount EQ max> <cfset class="largestTag"> <cfelseif tagCount GT (min + (distribution*2))> <cfset class="largeTag"> <cfelseif tagCount GT (min + distribution)> <cfset class="mediumTag"> <cfelse> <cfset class="smallTag"> </cfif> <cfoutput>[wrapper]#tag#[/wrapper]</cfoutput> </cfloop>
With this mod, I had a working tag cloud in about 15 minutes. Thanks a lot!
On 12/28/2007 at 4:31:32 PM EST Pat wrote:
44
Here is a nice tag cloud script with mysql database, easy to configure : http://www.ilikeyoutube.com/cloud/ Enjoy.
On 01/25/2008 at 4:31:53 AM EST Alina wrote:
45
Great code! I used it on my essay about tag clouds. You can find it here: http://webhomework.wordpress.com
On 07/02/2008 at 8:26:48 AM EDT Sallyanne - Web Designer wrote:
46
I think Tag Clouds can be a good way to get visuals (that arent really visuals!) into your site / blog without using a bog standard image. They can break up a page of text with something that looks creative.
However, Im sure there are advantages to having a mullet...like keeping your neck warm!
On 07/11/2008 at 3:06:47 AM EDT james wrote:
47
interesting, but a few things.
1: as someone said elsewhere, all tutorials seems to assume you know how to populate your database, and
2: all the techniques i've seen assume one has a fresh site to which one can start adding tags for articles/pages with each added article/page from scratch.
But what can be done for sites which already have tens of thousands of pages of content in database and where it is impossible to add tags for each of these articles because it would take forever?
Secondly i dont understand how the tags sizes in your tag-cloud relate to anything at all (such as number of pages using the word)? because each tag simply links to one page, and I can't see any relationship between tag size and anything which loads when one clicks a tag (?)
Also this assumes one's site loads pages based on a single word at the end of the address-string, so how would one do this for sites where content page links require full link addresses rather than the tag-word itself?
Simply put, i couldnt find a single decent documented page on this subject for beginners anywhere on the www in 6 hours of searching, which is quite incredible given tag-cloud popularity. All articles assume the user knows a hell of a lot already. But this is a general shortcoming of most computer peoples' tutorials online - they are good at coding but hopeless at understanding the principals of teaching a subject. There is simply no real explanations at all given with this tutorial although i realise this may not have been made for beginners.
On 08/06/2008 at 2:35:59 PM EDT talapoku wrote:
48
In your opinion, what's the best movie ever created?
On 09/01/2008 at 5:20:03 AM EDT cristi wrote:
49
Hi , anyoane can put here the cod of the SQL database -table of this script tag cloud ? THX
On 10/09/2008 at 1:42:06 PM EDT digital52 wrote:
50
Very cool script, I was able to get it up and running almost immediately.
One question though, how do you recommend dealing with multiple tags for an entry? I initially set up a test DB Table that had a "tag" field with multiple tags separated by a comma, obviously this code wasn't able to break up the list into various keywords, and simply grouped them all into one big tag. Looking through it I don't really see how it could be modified to deal with a list.
Is having a separate tags table that is then linked back to the master record the answer? That seems like the only plausible way, as having only one tag per record seems very limiting.
On 01/01/2009 at 9:02:49 AM EST Don Q wrote:
51
Late in the game, but...
http://pastebin.com/f1d04c178
And, for those asking about the db table, it should look something like.. (Here's to hoping it lines up..)
+---------+-------------+ | Field | Type | +---------+-------------+ | id | numeric | | tag | varchar | +---------+-------------+
On 10/30/2009 at 9:10:15 PM EDT Arowolo wrote:
52
@digital52
The today blog structure have more than one tag.
So your new blog table might look like this. "BlogId", "Title", "Description", "Content", "Date", "AuthorId" and "Tag"
You can try cold like 1. Pull all the Tags from the table, 2. Create a new query with "Tag" and "TagCount" and populate it with step 1. 3. You can know continue from step 1 of the this original post.
Looks like a loot of code, you might catch your result for better performance.
On 11/07/2009 at 3:05:10 AM EST sukumar wrote:
53
how can i create tag cloud in webpart could plz tell me step by step
On 11/16/2009 at 9:45:45 PM EST Joshua Ravinin wrote:
54
Great article, thanks for sharing your tag cloud technology. I have found a completely free (including commercial websites) tag cloud script written in PHP on http://www.softwaremastercenter.com/free-tag-cloud-generator-script.html. I like it because it has a built-in text-to-tags parser and it filters out common words - if you inspect the code they provide you will see maybe a thousand common words. For fact, I have actually added more words to it. The styling options are pretty decent.
On 04/12/2010 at 6:58:52 PM EDT suffi wrote:
55
i just update some tag cloud for my site http://www.irtouring.com/default.aspx?id=28#tagcloud
On 05/02/2010 at 4:20:53 PM EDT TekNight wrote:
56
Here's a question for you: can you store more than one tag in the sql table for each picture? Or do you need separate columns (i.e. Tag1, tag2, tag3)?
On 05/11/2010 at 6:51:41 PM EDT choose golf clubs wrote:
57
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
On 05/16/2010 at 5:31:04 PM EDT vemma wrote:
58
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
On 05/17/2010 at 3:21:30 PM EDT seized cars wrote:
59
Great Post. I add this Blog to my bookmarks.
On 07/08/2010 at 2:19:07 PM EDT Flirting Tips For Girls wrote:
60
Man does not live by bread alone
On 07/30/2010 at 8:04:37 AM EDT tahitian noni juice wrote:
61
Great Post. I add this Blog to my bookmarks.
On 08/01/2010 at 9:51:14 AM EDT scuba diving wrote:
62
Awesome Blog. I add this Blog to my bookmarks.
On 08/02/2010 at 7:14:42 PM EDT mbt shoes wrote:
63
i am happy to find it thanks for sharing it here. Nice work.
On 08/03/2010 at 2:27:38 AM EDT mbt shoes wrote:
64
Good journey and experience!
On 08/04/2010 at 12:37:51 PM EDT free registry cleaner wrote:
65
Nice post...Thank you for sharing some good things!!
On 08/05/2010 at 3:01:00 PM EDT konta osobiste wrote:
66
Awesome Blog. I add this Post to my bookmarks.
On 08/25/2010 at 9:34:14 AM EDT kosmetyki wrote:
67
Very Interesting Post! Thank You For Thi Blog!
On 08/27/2010 at 11:03:45 AM EDT gry online wrote:
68
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
On 08/29/2010 at 11:07:54 AM EDT tapety wrote:
69
Thank You For This Post, was added to my bookmarks.
On 08/29/2010 at 6:15:43 PM EDT home mortgage rate wrote:
70
Thanks very good for report, I follow your blog
On 08/29/2010 at 9:28:47 PM EDT sok noni wrote:
71
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
On 08/30/2010 at 2:15:34 AM EDT noni wrote:
72
Very Interesting Blog! Thank You For Thi Information!
Post a Comment
Recent Entries
- Howto Install and Run the Android Emulator
- jQuery UI Autocomple IE 6 Select List z-Index Issues
- Path Traversal Vulnerability Security Hotfix for ColdFusion Released
- Using AntiSamy with ColdFusion
- Writing Secure CFML Slides from CFUnited 2010
- Locking Down ColdFusion Presentation Slides
- Cross Domain Data Theft using CSS
- Using jQuery UI Autocomplete with Hidden ID's
thanks alot for posting this, along with some code... much appreciated ;)
/foO
it's an auto-folksonomy tool built using the Term Extraction APIS. It combines Ajax with Folksonomies and Yahoo Web Services to allow you to search on RSS feeds, News, Movies, Images or just obtain the original story, all without a page-refresh.
Would love to get some feedback on it or suggestions for improvement. regards, -fs
I need to implement this on my site www.similarthings.com :) Minus the mullet!
Did you sign up? You should check it out, I have added some nice Ajax and Effects to some of the admin.
I did the font sizing a bit differently, but it's the same basic premise.
The task I'm working on now, however is: How would one add the capability to display at least one tag for every letter of the alphabet?
Assume for a second that you have 5500 tags in your tag table. That's alot of tags to display - so what I would want to do is find enough tags to fill out a max of 100 tags, for instance, with at least one tag from each letter of the alphabet. (otherwise, you might have the first 100 tags be A-G, rather than A-Z...looks strange to users, and skips cool content in the H-Z range)
Anyway, tags are cool, and thanks for the ideas!!
I used your ideas here: http://www.rel8r.com/tags/
i loved the idea of having my own tag cloud. i tried eurekstr and zoomcloud but this seems like a better idea.
I tried cutting an pasting this in my template under the sidebar section and I get no results. I also tried adding <script> and </script> after now the #tag thingies disappear but there is no tag cloud.
I know that I doing something wrong. I hope it is simple and I hope you can help.
Thanks!
I was just talking with a friend about how to create a tag cloud for my blog but I wasn't sure how to go about it.
Although I don't use ColdFusion, your article was (as you said!) easy enough to follow. I'm going to get to work on creating my own tag cloud today! (I use WordPress as my blogging engine so I guess I'll be writing my code in PHP as a plugin.
Thanks for this helpful article!
http://en.dahnielson.com/2006/07/blog-overcast-tagclouds.html
http://www.ArticleOnRamp.com/Tag-Cloud.cfm
Thanks!
Some of my questions:
Are they only or mainly used for blogs?
What kind of tags do I use to link the key words with the tag link generator (tag cloud links I supose).
Does the above script goes in the head or the body of the page.
As you can understand I am completely lost. Thank you all in advance
http://www.8coupons.com
http://www.taskfly.com/blog/?p=6
We have added a little bit "colors" to the final styling (selected a main color and blended it).
http://mgk1969.wordpress.com/2007/03/23/making-a-tag-cloud-in-coldfusion/
Many regards, exl
Do you think that I can implement this tag clouds on my html website? http://www.jocuri.pe-net.info or it's working only on php sites,
Thank you
http://blogs.dekoh.com/dev/2007/10/29/choosing-a-good-font-size-variation-algorithm-for-your-tag-cloud/
With this mod, I had a working tag cloud in about 15 minutes. Thanks a lot!
However, Im sure there are advantages to having a mullet...like keeping your neck warm!
1: as someone said elsewhere, all tutorials seems to assume you know how to populate your database, and
2: all the techniques i've seen assume one has a fresh site to which one can start adding tags for articles/pages with each added article/page from scratch.
But what can be done for sites which already have tens of thousands of pages of content in database and where it is impossible to add tags for each of these articles because it would take forever?
Secondly i dont understand how the tags sizes in your tag-cloud relate to anything at all (such as number of pages using the word)? because each tag simply links to one page, and I can't see any relationship between tag size and anything which loads when one clicks a tag (?)
Also this assumes one's site loads pages based on a single word at the end of the address-string, so how would one do this for sites where content page links require full link addresses rather than the tag-word itself?
Simply put, i couldnt find a single decent documented page on this subject for beginners anywhere on the www in 6 hours of searching, which is quite incredible given tag-cloud popularity. All articles assume the user knows a hell of a lot already. But this is a general shortcoming of most computer peoples' tutorials online - they are good at coding but hopeless at understanding the principals of teaching a subject. There is simply no real explanations at all given with this tutorial although i realise this may not have been made for beginners.
One question though, how do you recommend dealing with multiple tags for an entry? I initially set up a test DB Table that had a "tag" field with multiple tags separated by a comma, obviously this code wasn't able to break up the list into various keywords, and simply grouped them all into one big tag. Looking through it I don't really see how it could be modified to deal with a list.
Is having a separate tags table that is then linked back to the master record the answer? That seems like the only plausible way, as having only one tag per record seems very limiting.
http://pastebin.com/f1d04c178
And, for those asking about the db table, it should look something like.. (Here's to hoping it lines up..)
+---------+-------------+ | Field | Type | +---------+-------------+ | id | numeric | | tag | varchar | +---------+-------------+
The today blog structure have more than one tag.
So your new blog table might look like this. "BlogId", "Title", "Description", "Content", "Date", "AuthorId" and "Tag"
You can try cold like 1. Pull all the Tags from the table, 2. Create a new query with "Tag" and "TagCount" and populate it with step 1. 3. You can know continue from step 1 of the this original post.
Looks like a loot of code, you might catch your result for better performance.








