New to compact framework tutorials? Learn to write your first compact framework application here.
Zac Efron - Hairspray star and Mythbusters' Kari Byron at Celebrity Treat. Check out income and career information in Singapore.

Tuesday, November 22, 2005

- Blogging_: generate categories for your blog

Updated Nov 24: see my latest post with step-by-step instructions on creating categories.

Following my previous post on how to create categories in Blogger easily (see also FreshBlog's posts on other methods here and here) , I wrote some JavaScript code to generate code for anyone who's interested to add categories to his/her sidebar template. Here's how to use it:
  1. First, decide what are the category names you want. These names must be searchable by the Blogger search engine. My way to ensure this is to "tag" every of my posts by prefixing the category name in its title. For example, this particular post has "Blogging" as the title prefix.
  2. Next, visit this page at my other site (Blogger doesn't allow me to embed the JavaScript in a post, so I have to upload my script generator elsewhere).
  3. In the first textbox, enter the URL of your blog. For my case (as an example), it will be netcf2.blogspot.com




  4. There's a link beside the word Categories. Click on it to add more textboxes (as many as the number of categories you intend to have). Then type in the category names in the textboxes.
  5. Finally, click Generate code. And copy the generated code to your Blogger template code (place it in the sidebar). This is similar to adding Google Adsense code.


Categories: [Blogging_] Tags: [] []

56 Comments:

Blogger deviousdiva said...

Well, I just want to say a huge thank you to you and your brilliant hack. It works, it was easy and I am more than happy.

11/27/2005  
Blogger danchong said...

Thank you very much. I've looked at your blog - the categories fit nicely. And you have many of them!

11/27/2005  
Blogger lisa schamess said...

thank you, thank you, thank you! even a technodummy like me can get it right on the first try. As soon as I can, I will plug this hack to my fellow Bloggers.

Yay!

12/06/2005  
Blogger Darren said...

I added the categories and it seems to work, yet it only seems to search the first 50 posts. How can we change that so it searches the ENTIRE blog, archives and all (Blogger)?

-d

12/06/2005  
Blogger danchong said...

hi Darren, yes it seems that Blogger returns only the top 100 results that match the category. thanks for pointing out. i think this is a shortcoming of this hack, but it shouldn't affect too many people IMO.

12/06/2005  
Blogger Darren said...

We really need to be able to search the entire blog. if you look at http://davidvaldez.blogspot.com you'll see that he has an extensive archive on many topics.

12/08/2005  
Blogger danchong said...

hi Darren, thanks for your comments. Unfortunately, my little hack depends on Blogger Search, and I'm not able to make it return more than 100 results for a particular blog. Sorry.

12/08/2005  
Anonymous Chris said...

Thanks for coming up with this work-around to create categories...it's very clever!! But I'm having problems getting the blogger database to include all of my posts in its searches (and there are only 55 on the site right now)...which obviously affects the performance of the keywords. Any suggestions? I've reposted the entire site several times tonight but that's not helping. Thanks. Chris, hlswatch.blogspot.com

ps. One suggestion for others: if you change the "%20"'s (ascii space) in the search field in the code to dashes, it makes it possible for the keyword phrase to be searched...and not all of the words. This improves performance dramatically if you have multi-word categories.

12/13/2005  
Blogger danchong said...

hi chris, i visited your blog. i think it's working now, is it not?

12/14/2005  
Blogger danchong said...

hi chris, you are right on the dashes. i've also updated my script generator to include quote-marks (""), which basically achieve the same thing. thanks for the tip!

12/14/2005  
Blogger pablo said...

Thanks for the great hack. It's exactly what i've been looking for. But I can't get it to work. I did everything you spelled out & still nothing. My site is not hosted on blogger but on my site, therefore blogger would be searching psolis.com/dreamscapes not on a blogger spot. Could this be the problem?

1/01/2006  
Blogger danchong said...

hi pablo, thanks for using my hack. I tried doing a general search for "vivid dreamscapes" in Blogger Search, but your blog does not turn up. Other keywords yield nothing too. I suspect that Blogger Search is not indexing your blog which is hosted outside of blogspot. Maybe you could check with the Blogger staff?

1/01/2006  
Blogger pablo said...

Thanks for the reply. Happy New Year!

I tried support @ blogger search, but as you know an email may not be forthcoming in direct reply.

Could you speculate as to why I am not being indexed? I do have the 'ping Weblogs.com' turned on.

I also did some searches on getting indexed on blogger, but still looking.

Any suggestions would be greatly appreciated.

1/04/2006  
Blogger John said...

Thanks, it works !
As I just re-started my blog from scratch, I was really considering dropping blogger for some platform where Tags and Categories would be available. True, I'm hosted outside blogspot and it does take some time for the indexing to work but it really is fair enough considering my usage.
Thanks for you clever trick and happy 2006

1/04/2006  
Blogger danchong said...

hi John, thanks for using my little hack!

1/05/2006  
Blogger danchong said...

hi Pablo, I'm trying to help you with the Blogger Search issue. I note that your blog isn't hosted at blogspot. Could you check your Settings if your Blog URL is set correctly? It seems from the HTML of your site that your Site Feed URL is invalid - http://www.psolis.com/dreamscapes/index.html/atom.xml and this could cause problems when the search bot tries to index your pages.

Perhaps if you configure your Blog URL to http://www.psolis.com/dreamscapes/ (without the index.html in the URL) will help?

Let me know. Thanks.

1/05/2006  
Blogger pablo said...

Daniel;

thank you for taking the time to look into this for me. I did the changes you suggested.

Again thanks for the great hack & for you taking the time to look into it.

1/05/2006  
Blogger danchong said...

hi Pablo, I think it works now! I checked "stories_" and "poetry_". Both categories worked.

1/05/2006  
Blogger Jill said...

Blogger refuses to search my blog! Do you know how to fix this?

1/06/2006  
Blogger danchong said...

Hi Jill, from the HTML of your blog, I think you're not subscribed to the site feed.

To include your blog in Blogger Search, you have to enable the "site feed" feature (which is enabled by default).

To do it, go to Settings-> Site Feed, and select Yes for "Publish Site Feed".

Hope this helps.

1/06/2006  
Blogger Jill said...

Hi Dan, Thanks for this! I have changed the setting and I'm hopeful it will work. I guess it will take a while for my pages to be indexed. You have helped out a lot of people! :) Thanks heaps!

1/06/2006  
Blogger danchong said...

hi Jill, it's my pleasure to help. :)

1/09/2006  
Blogger Jill said...

Just an update... it's working! Yippee!

1/12/2006  
Blogger Gretchen Louise Acheson said...

I wrote up a simplified line-by-line explanation of http://pappmaskin.blogspot.com/2005/10/blogger-categories.html at http://www.ylcf.org/2005/12/blogger-categories.html

1/14/2006  
Blogger Rarity said...

Thanks man, works like a charm! One or two irreleant hits, but hey - I'm happy!

1/21/2006  
Blogger Rarity said...

Just wondering is it possible to have multiple keywords in one category? (like 'fun OR funny' both under category Funny)

1/21/2006  
Blogger danchong said...

hi Rarity, you can try putting the "pipe" character | between the 2 words. It tells the search engine you want to search either word. Try it and let us know!

1/22/2006  
Blogger Rarity said...

Great! That did the trick! You're my hero, Danchong!

1/23/2006  
Blogger Bibleweb.com said...

Thank you! I have used your script to create categories for my Blogger blog Bibleweb.com. You have made my life MUCH easier!

-- Bill Blue

1/23/2006  
Anonymous Geligent said...

Why the search doesn't show the newest posts?
What can I do to make it show the latests?

2/01/2006  
Blogger danchong said...

hi Geligent, do you mind giving me the URL of your blog. I suspect it could be due to your blog config.

2/01/2006  
Blogger Amit said...

you can check out what i have done at my blog.

2/10/2006  
Anonymous Anonymous said...

Hi:

I'm having problem with blogger search. Checked both settings, they all look correct. Can you please check my site???

Thanks!

nicotinewithdrawal.blogspot.com

2/12/2006  
Blogger Blog Bloke said...

Combine the power of Google to make categories for Blogger blogs as well as tags for del.icio.us, technorati or whatever else you can imagine. Perhaps some smart programmer out there will create a javascript for it.

3/26/2006  
Blogger audreytmv said...

This post has been removed by a blog administrator.

4/10/2006  
Blogger Thrass said...

Hi, thanks for the tip, it worked for me.

I also think I figured out what's going on with the posts that refuse to be included in the search:

The trick (that worked on my blog) is this: blogger search releases its spiders once a day or something. So for the posts of the past, one has to wait till next spider-visit.

But then, the spiders only visit the main page or something like that! So, if one makes all posts available on the main page, they will all have been "searched" within 24h. Then you can limit your main page again (all it takes is one visit for them to be included, at least for my blog, where I didn't have too many posts!).

But I have another problem myself:
I would like to find a way to display the number of entries of each category on the sidebar. Sth like this:
Science (11)
Art (3)
Sports (6)

etc, but I cant' find a way to make it happen automatically.

4/11/2006  
Blogger danchong said...

hi Thrass, I have an idea of implementing the count for each category, but it'll require scripts to run on a fast server. If anyone can donate server cpu time and some space for php scripts, I'd be happy to do it and let everyone use it freely.

(Alternatively, if I receive enough donation to get hosting for a sustainable period of time, I'd also do it.)

4/11/2006  
Blogger Morgan said...

Thanks for this, I've been considering leaving Blogger because they don't have categories! However, I can't seem to get it to search correctly. I've put tags in both the title and the body, but the search doesn't find any of my posts. Help?

http://morganpdx.blogspot.com/

5/11/2006  
Blogger danchong said...

hi Morgan, I visited your blog. Seems like you got it working!

5/14/2006  
Blogger Frida said...

Oh please please will you help me? I followed your instructions and I put a tag in one of my post but blogger still doesn't find it when I search? What's wrong?

6/03/2006  
Blogger danchong said...

hi Frida, your "Om mig_" category is working. For the older posts, you'll have to wait a while for the search engine to "re-index" those posts.

6/03/2006  
Anonymous Prem said...

Hi Thank you so much. Blogger really needs Catogeries like Wordpress. I have used ur valuable inputs. but still I am not able to get the posts of catogeries.

I have done all settings as well its been 5 days, by that time site should have been indexed too.

Please check - http://planetofprince.blogspot.com

Kindly guide me about this.

You can also mail me at
planetofprince AT yahoo.com

6/19/2006  
Blogger danchong said...

hi Prem, you need to include the keywords (or key phrases) in your posts. For example, if your post is to be categorized under "Technology NewZ_", then you should mention the phrase "Technology NewZ_" somewhere in that post. The search bot is definitely indexing your posts - I did a search for "PATOLAS" and it worked.

Hope this helps.

-daniel

6/19/2006  
Blogger Gaby said...

Hi,Thanks so much for all your help! I'm new to blogging and Im trying to learn fast because I love it.
The thing is that I made some categories for my blog but I don't know how do I put a tag in a post for the categories to work. Any help will be very appreciated.

6/22/2006  
Blogger danchong said...

hi Gaby, cute baby you have! To tag a story/post, you can simply add a line to the end of your post, for example:

Filed under: Buenos Aires, My life as a mom

The above example will categorize the post under 2 categories. Of course, you can tag it under more categories, or just 1.

Another way of tagging your story/post is to make sure that the phrase "Buenos Aires" (as an example) appear somewhere in your post. Yes, somewhere, anywhere.

Hope this helps. Enjoy motherhood!

6/22/2006  
Blogger qualityg says said...

Good Morning,

I spent last weekend creating my categories and all seemed well. Starting Yesterday there was only 1 post listed under each category and a couple had none.

I tried reentering my categories and republished numerous times with no luck.

I looked at a couple of other sites lister here and I see many of them with only one post listed.

Are you aware of any problems? I went to the blogger board and saw no other posts on this problem, am I alone?

qualityg

7/20/2006  
Blogger Mary and Emma said...

This post has been removed by a blog administrator.

7/23/2006  
Blogger W. Scott Smoot said...

I'm having the same experience as "qualityg" on 7/20. It's been a few weeks since I inserted the categories side bar, and I've placed the relevant category words in the "permalink" at the bottom of each post. As qg says, I'm getting just one post listed under each category... and it's usually the same one.

I've also started putting category words in the title, as you suggested, but it's not showing up.

My blog is "The Word Sanctuary" at smootpage.blogspot.com

Thanks for any help you can give.

7/24/2006  
Blogger Shannon, TradeMark Express said...

Thank you so much for this hack! The posts were starting to feel unruly to me so categorizing them is going to be great. Thanks again!

8/22/2006  
Anonymous Rose said...

Very helpful. I will be adding you to the resource section of bloggertalk.com. Please feel free to join.

9/11/2006  
Blogger Proactive Acne Treatment said...

Proactiv

Buy Proactiv Solution here and get 50% off.

2/15/2007  
Blogger taint said...

hi i used your javascript code on my site http://mexican-taint.blogspot.com after i embedded the code i got to work on labeling my posts to correspond my categories for searching. this did not work well. the only things that are coming up are actual words in the post and not the label. i want to have different categories such as : Movies, Music, Mixtapes, Programs, E-Books, Misc. and have the corresponding results show up from the category list. plz help me with this u can get at me via my site or themexicantaint@gmail.com thank you

2/24/2007  
Blogger Acne Treatment said...

There are cases where benzoyl peroxide has been reported to irritate and dry out the skin. Dry and irritated skin and hair follicles have the highest susceptibility to new acne, so it is important to have the correct dosage of benzoyl peroxide for your own personal needs. Proactive Acne Treatment has a fairly low level of benzoyl at 2.5%, which helps keep skin irritation to a minimal. There are several products out on the market today, such as NeoBenz Micro that contains higher concentrations of up to 8.5%. Because of this high dose NeoBenz is only available with a prescription.

3/03/2007  
Anonymous Anonymous said...

THANKYOU MATE, brilliant hack, tried it , and please take time out to check my blog

http://envisage-s.blogspot.com/

12/19/2007  
Anonymous lipitor said...

companies marketing mineral makeups and also get the best bargains in mineral makeup you can imagine,
find aout how to consolidate your students loans or just how to lower your actual rates.,
looking for breast enlargements? in Rochester,
homeopathy for eczema learn about it.,
Allergies, information about lipitor,
save big with great bargains in mineral makeup,

change edition interviewing motivational people preparing second
,

interviewing motivational people preparing second time
,

interviewing people motivational preparing for a second time
,

black mold exposure
,

black mold exposure symptoms
,

black mold symptoms of exposure
,

free job interview questions
,

free job interview answers
,

interview answers to get a job
,

lookfor hair styles for fine thin hair
,

search hair styles for fine thin hair
,

hair styles for fine thin hair
,

beach resort in the philippines
,

great beach resort in the philippines
,

luxury beach resort in the philippines
,
iron garden gates, here,
iron garden gates,
wrought iron garden gates
, here
,
wrought iron garden gates
,
You: The Owner's Manual: An Insider's Guide to the Body That Will Make You Healthier and Younger
,
eat eating mindless more than think we we why
,


texturizer,
texturizers here,
black hair texturizer,
find aout how care curly hair,
find about how to care curly hair,
care curly hair,
lipitor rash,
lipitor reactions,
new house ventura california,
the house new houston tx,
new house washington dc,
new house pa philadelphia,
san antonio tx house new,
house new pa philadelphia,
new house washington dc,
new house ventura california,
the house new houston tx,
house new san antonio tx,
the house new houston tx, that you are looking for,
new house ventura california, you need to buy,
new house washington dc,
house new pa philadelphia,
new house san antonio tx,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

chocolate esophagus heartburn study
,

chocolate esophagus heartburn study
be informed,

digestion healing healthy heartburn natural preventing way
,

digestion healing healthy heartburn natural preventing way
,
sew skirts, 16simple styles you can make!,
sew what skirts 16 simple styles you,
rebates and discounts on sunsetter awnings,
sunsetter awnings discounts and rebates,
discount on sunsetter awnings


truck and bus tires 12r 22.5, get the best price,
tires truck and bus 12r 22.5 best price,
tires truck bus tires12r 22.5 best price,
plush car seat strap covers,
car seat strap covers,plush,
car seat strap, plush covers,
oscoda voip phone systems, the best!,
oscoda voip the phone system,
oscoda voip phone systems,
exterior iron gates,
oriental wrought iron gates,
powder coated iron garden fencing,

2/15/2008  
Anonymous fero 52 said...

black mold exposure,
black mold symptoms of exposure,

wrought iron garden gates,
your next iron garden gates, here,

hair styles for fine thin hair,
search hair styles for fine thin hair,

night vision binoculars,
buy, night vision binoculars,

lipitor reactions,
lipitor reactions,

luxury beach resort in the philippines,
beach resort in the philippines,

homeopathy for baby eczema.,
homeopathy for baby eczema.,

save big with great mineral makeup bargains,
companies marketing mineral makeups,

prodam iphone praha,
Apple prodam iphone praha,

iphone clone cect manual,
manual for iphone clone cect,

fero 52 binoculars night vision,
fero 52 night vision,

best night vision binoculars,
buy, best night vision binoculars,

computer programs to make photo albums,
computer programs, make photo albums,

3/24/2008  

Post a Comment

Links to this post:

Create a Link Permalink

<< Home