Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

Technorati Searchlet doesn't work on my site?

Dave, you can restore my sanity. I'm trying to get the Technorati searchlet to work on my Web site and the darn thing just isn't working out right. I've even blogged about it to no avail. Help!


Dave's Answer:

That's most puzzling because when I look at the searchlet, it seems pretty straightforward, albeit more complex HTML than it needs to be. Let's step through it and see what we can figure out, okay?

Rather than start out with their full, complex, HTML, here's the core search box for just your own Blog:

<form method="get"
 action="http://technorati.com/cosmos/search.html">
<input type="hidden" name="sub" value="searchlet" />
<input type="text" name="url" maxlength="255" value="" />
<input type="hidden" name="from"
 value="http://www.intuitive.com/blog/" />
<input type="submit" value="Search" class="search" />
</form>

This is a very basic search form and lets you search for recent weblog entries on my other weblog, The Intuitive Life Business Blog. Try it: search for 'HP' or 'trade', as examples:

That works, right. Now, the question is, how do we tweak this code for your blog, Neville. This is where a little experimentation comes in handy! Replacing the value attribute of the from tag with your base URL doesn't work:

<input type="hidden" name="from"
 value="http://www.nevon.net/" />

In fact, when I searched for 'skype' it showed me a whopping 16,000 matches. You're prolific, but not that prolific, mate!

My second attempt was to use the URL http://www.nevon.net/nevon/" and lo and behold, it worked just fine. A search for 'skype' produced six matches, not sixteen thousand. So, here's the minimalist Technorati searchlet for your site, Neville:

<form method="get"
 action="http://technorati.com/cosmos/search.html">
<input type="hidden" name="sub" value="searchlet" />
<input type="text" name="url" maxlength="255" value="" />
<input type="hidden" name="from"
 value="http://www.nevon.net/nevon/" />
<input type="submit" value="Search" class="search" />
</form>

Try it here:

Now that we have the basics out of the way, here's the full blown Technorati search box -- with a wee additional CSS tweak or two -- for my own Intuitive Life Business Blog site: simply change the code in red and you should be just fine...

<style type="text/css">
.legend { font-size:80% }
.legend a,.legend a:link,
.legend a:vlink { color: #009; text-decoration: none; }
.legend a:hover { text-decoration: underline; }
</style>
<form method="get" action="http://technorati.com/cosmos/search.html"
 style="width:12em;text-align:left">
<fieldset style="padding:4px">
 <legend><span class="legend"><a
  href="http://technorati.com/">Technorati</a>
  search</span>
 </legend>
<input type="hidden" name="sub" value="searchlet" />
<input style="width:12em" type="text" name="url"
 maxlength="255" value="" /><br />
<input type="radio" checked="checked" name="from" id="ts_yb"
value="http://www.intuitive.com/blog" />The Intuitive Life<br />
<input type="radio" name="from" id="ts_www" value="" />All
weblogs</label><br />
<input type="submit" value="Search" class="search" />
</fieldset>
</form>

And displayed:

Technorati search
The Intuitive Life
All weblogs

I hope that helps you out!



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

Dave, this is awesome! Thanks for doing this!

Posted by: Neville Hobson at March 14, 2005 4:38 PM

This is a GREAT tutorial Dave! Thanks for writing this up.

The only I thing I might add is that you don't need the extra <span class="legend"> inside the <legend> in your last example. You can simply use the <legend> elements directly in your style rules. And you want a:visited, not a:vlink, e.g.:

<style type="text/css">
legend { font-size:80% }
legend a,legend a:link,
legend a:visited { color: #009; text-decoration: none; }
legend a:hover { text-decoration: underline; }
</style>
<form method="get" action="http://technorati.com/cosmos/search.html" style="width:12em;text-align:left">
<fieldset style="padding:4px">
<legend><a href="http://technorati.com/">Technorati</a> search</legend>
<input type="hidden" name="sub" value="searchlet" />
<input style="width:12em" type="text" name="url" maxlength="255" value="" /><br />
<input type="radio" checked="checked" name="from" id="ts_yb" value="http://www.intuitive.com/blog" />The Intuitive Life<br />
<input type="radio" name="from" id="ts_www" value="" />All weblogs</label><br />
<input type="submit" value="Search" class="search" />
</fieldset>
</form>

Posted by: Tantek at March 29, 2005 2:44 AM

Hi Dave,
It's pretty helpful but I can't seemed to get it work in my blog.
My blog is just using plain simple HTML, nothing fancy like Worpress or whatever.
Why?
Summore it doesn't pop out a new window instead it shows in the parent window.
Thanks in advance.

Posted by: SS at December 27, 2005 12:02 AM

SS, I've found that a lot of blogging tools strip out certain HTML without telling you, so I bet that if you did a "view source" you'd find that was the problem.

Posted by: Dave Taylor at December 27, 2005 11:11 AM

Hmmm... Dave, thanks for looking but I don't get what you meant. The chunck of code seemed so innocent LOL... it's so straight forward but strange that my blog can't use it.
"View Source" on my own website or yours? I viewed both but can't seemed to find any problem.
Sorry if I sounded so blur... in fact I'm really blur LOL...
Happy new year in advance to you :)

Posted by: SS at December 28, 2005 2:14 AM

Sorry for the confusion, SS. What I mean is that if you copy and paste the HTML block into, say, a Blogger weblog entry, you'll find that it silently chops out some of the code so that it won't work, As far as I know, there's no workaround.

Posted by: Dave Taylor at December 28, 2005 9:41 AM

I see... but I don't use any of these things. I did my blog with Dreamweaver ahahah... That's why I don't understand why it can't work. Strange. So there's no reason that anything will chop those chunck of code off, unless I chop them off myself LOL...
Well.. it's all right then. Thanks for your help.
Cheers!

Posted by: SS at December 28, 2005 10:19 PM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]