Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


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!


More Useful HTML, JavaScript and Web Site Programming Articles:
✔   How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔   Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔   Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔   How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔   How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  








Reader Comments To Date: 7

Neville Hobson said, on March 14, 2005 4:38 PM:

Dave, this is awesome! Thanks for doing this!

Tantek said, on March 29, 2005 2:44 AM:

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>

SS said, on December 27, 2005 12:02 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.

Dave Taylor said, on December 27, 2005 11:11 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.

SS said, on December 28, 2005 2:14 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 :)

Dave Taylor said, on December 28, 2005 9:41 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.

SS said, on December 28, 2005 10:19 PM:

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!

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

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











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 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. Further, 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. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.