
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! 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:
I hope that helps you out!
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
CGI Scripts and Web Site Programming
(Article 3924)
Tagged: Previous: How do you become an "Amazon Reviewer"? Next: How do I subscribe to an RSS feed with My Yahoo? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. Dave, this is awesome! Thanks for doing this! Posted by: Neville Hobson at March 14, 2005 4:38 PMThis 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"> Hi Dave, 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 AMHmmm... 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. 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 AMI 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... I have a lot to say, but ...
I do have a comment, now that you mention it!
|
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!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|