August 01, 2004
HELP FOR THE BLOGSPOTTED: GOOGLE SEARCH YOUR SITE - UPDATED 5-24-05
Google bought Blogger a while back, and yet Blogger still doesn't have a native search function included in the blogging software.
Which isn't really a problem... until that day comes (and it will) when you want to find one of your old entries, but you don't remember when you posted it, and you can only remember a couple words from it. Sure, you could manually search 3 or 4 months worth of archive pages, but what a pain in the ass THAT would be.
And even if YOU don't care about your old posts, other people might. What if they want to link one of your old posts, but have no idea where to find it? What if that one link would FINALLY push you up to Flappy Bird in the Ecosystem?
You NEED a search function on your blog.
Fortunately, Google provides free cut & paste code so you can have just that. All you have to do is paste in your site URL where it says "YOUR DOMAIN NAME". Simple.
And freakin' HUGE! This thing is like 10,000 pixels wide!
Fortunately, you can tweak a few things to shrink it to fit into your sidebar. Here's what I've done at my old Blogspot site:
<!-- SiteSearch Google -->
<FORM method=GET action="http://www.google.com/search">
<TABLE bgcolor="#FFFFFF"><tr>
<td>
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Google Search">
<font size=-1>
<input type=hidden name=domains value="http://badmoney.blogspot.com"><br><input type=radio name=sitesearch value=""> WWW <input type=radio name=sitesearch value="http://badmoney.blogspot.com" checked> Bad Money <br>
</font>
</td></tr></TABLE>
</FORM>
<!-- SiteSearch Google -->
Just change the bolded items to your URL in the first two spots and the name of your blog in the last one.
You can change the width of the box by changing the "size" variable to something less than 25.
There's also the bare-bones option which appears underneath, the code for which is:
<form action="http://www.google.com/search" target="_blank">
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
<input class="go" type="submit" name="submit" value="Search Bad Money" />
<input type="hidden" name="as_sitesearch" value="http://badmoney.blogspot.com" />
</form>
Again, change the bolded items to your blog name and your blog URL, respectively.
Also again, you can change the width of the box by changing the "size" variable to something less than 25.
How well this works is debatable. It seems to be pretty good about picking up words in post titles. Words in the body of the entry or in comments... not so much. However, it's better than nothing.
If anybody knows how to tweak this code to make it a little more sensitive/responsive, please speak up in the comments.
UPDATE 5-23-05: William of Pirate's Cove has some additional tweaks for the code.
UPDATE 5-24-05: [If you've found this post useful enough to blog about, send a trackback or e-mail the permalink to me at harvolson-at-gmail.com and I'll add you to my Bad Example Groupies blogroll. See this post for details]
» King of the Blogs links with: KOTB Week 5 Ruling
» King of the Blogs links with: Results are In
» King of the Blogs links with: Results are In
» basil's blog links with: Learning To Blog VI: Google Search Code
» MY Vast Right Wing Conspiracy links with: Site search, etc.
» A Bama Blog links with: Google Search
» Pirate's Cove links with: Site Search Functionality
» hiking gear links with: web ecommerce software
Excerpt: Neva Post: Neva introduces many of us to reading. While some of us may be loathe to undertake this academic pursuit, others, including myself, need a good book with which to settle down at the end of the day. At...
Weblog: King of the Blogs
Tracked: January 30, 2005 06:17 AM
Excerpt: News From the Great Beyond King of the Blogs Tournament: Week 6 Judging For the last time, all hail King Jon of Personal Trainer - the first of the KotB contestants to retain his crown for three weeks and be...
Weblog: King of the Blogs
Tracked: February 6, 2005 07:07 AM
Excerpt: News From the Great Beyond King of the Blogs Tournament: Week 6 Judging For the last time, all hail King Jon of Personal Trainer - the first of the KotB contestants to retain his crown for three weeks and be...
Weblog: King of the Blogs
Tracked: February 6, 2005 07:10 AM
Excerpt: In my efforts to be a better blogger (I gave up long ago on being a better person), I've been taking Harvey's blocks of instruction and tips. Some of what he suggested, I actually stumbled across. Some is stuff I
Weblog: basil's blog
Tracked: May 1, 2005 12:52 AM
Excerpt: [THANK YOU, basil and Harvey!] I know it sucks that I haven't had a site search here. I've wanted to use Google's site search box, but the damn thing doesn't fit anywhere...but lo and behold, basil posted how to get it to fit, based on Harvey's ins...
Weblog: MY Vast Right Wing Conspiracy
Tracked: May 1, 2005 07:12 PM
Excerpt: I've finally added a Google search function to my blog, in case anyone feels the need to search through my old posts for something in particular. You can find it near the bottom of the right-hand sidebar. Thanks to Harvey at Bad Example for the ho...
Weblog: A Bama Blog
Tracked: May 1, 2005 07:22 PM
Excerpt: Basil has a series going on Learning To Blog. He is on Part VI: Site Search. Just wanted to chip in my 2 gold dubloons, and add a little bit. Also, you can visit Harvey,who really isn't a Bad Example,
Weblog: Pirate's Cove
Tracked: May 1, 2005 09:54 PM
Excerpt: TechWeb - Oct 07 4:41 PM Retailers overall are doing a slightly better job at treating their customers online, compared to six months ago, a research group says.
Weblog: hiking gear
Tracked: October 9, 2005 10:38 AM
OK! OK! I'm doing it NOW. LOL!
oops, how do i keep forgetting to do this? thanks for the reminder, harvey.
Thanks!
For a change you have something useful to add... instead of the mindless pecking of 10,000 typing monkeys!
[Really... thanks... I'll use that code in the two commercial sites I'm working on right now]
Hey GoogleBoy... I installed both those scripts on a site and it did not return any results on anything... I wonder if I have to wait for the Google spider-bot-thingys to index the site before it will work... do you remember where you ran across that code?
So... I found another program to index/search your site... it is here... select the FREE option, fill in the required information, and it will generate the code to cut and paste into your site... works like a champ so far... might have to re-index occasionally - I haven't read the instructions that far yet...
Index the site 1 time per month on demand...
I think Google needs to spider it before it works well. My Blogspot site barely gave me shit, but then again, it's been pretty much dormant for the last year, and no one links it. Boudicca has it running on her blog and it seems to work much better. Probably because her site is active and people actually link her.
You are a G-dsend for newborn bloggers!
Tom - Thanks. That's very kind :-)
I think Blogger added this to the navbar, it looks pretty much the same, and uses sitesearch.
However, that just searches Google and adds the site parameter. I have typed the exact heading in and still not brought up my article. (I mean months old, so whatever spider should have crawled it by now).
There is a better search on the edit posts screen. I tried linking to it from my front page, but it only works for the blog owner if they are logged in.
That fusionbot looks pretty cool. I'm setting it up now.
Thanks for the advice, it is working great for me
sfsf
wtf is this???? :)
Thanks for the reminder, Harvey. This is the one thing I forgot about when I did the domain change.
Because I live in denial of both my verbosity and my prolixity (Word Power, guys n dolls--heh), I had never thought my blog could ever become so large or cumbersome that a search function would be useful.
Of course, given my nature, I rarely know when to shut up, so...
Gee, Harvey, this is gonna be handy! Now I don't have to do some kludge of my own, I can rely on your expert hack. I like being a lazy script kiddie. Gives me more time to shoot off my mouth.
YAY! I used Google's cut and paste off their adsense website but it has never worked............this does
Hooha
Thanks man
Your new best friend and stalker
soooooooooo kidding
Pamela - I hope you're the crazy-psycho
bunny-boiling kind of stalker. They're LOTS
of fun :-)
This seems to do the trick! woo-hoo! Todd N. Lokken














TrackBack URL for this entry:
http://blog2.mu.nu/cgi/trackback.cgi/39361