Edgardo Vega's Blog

Making it through the day one post at a time
posts - 167, comments - 19, trackbacks - 246

My Links

News

MSN search
Technorati search

PDC'05 - Developer Powered

Disclaimer

This posting is provided "AS IS" with no warranties, and confers no rights of any kind. All opinions included here are mine and do not represent the opinions of my employer or any of its other employees.

Archives

Post Categories

Image Galleries

Auto-Subcribe to this blog

  • Subscribe with myFeedster
  • Add to My Yahoo!
  • Subscribe in NewsGator Online

Top 100 Feed Sites:

Add Technorati Search to your site my way

So you would like to add Technorati Search to your site, but you can't because you don't have full control over the html in your blog. Like me a good example of this would be blogs on .Text. The code given to you by Technorati is a form, which doesn't work in .Text. I really want to add Technorati Search to my blog. I used my Adding Search to my blog the MSN Search Beta way as a template. So I went from what Technorati gave me and created a Technorati Search that will work for me. Hopefully David Sifry doesn't mind what I have done.

Here it is:


<fieldset style="padding:4px">
<legend><a href="
http://technorati.com/">Technorati</a> search</legend>

<input style="width:12em" type="text" name="url" maxlength="255" value="" onkeypress="return TechnoratiSearch(event, this);"/>

<label style="display:block;padding-top:3px" for="ts_yb" title="Edgardo Vega\'s Blog">

<input type="radio" checked="checked" name="from" id="ts_yb" value="http://www.geekswithblogs.com/evega/" />

this blog</label>

<label style="margin-right:.2em" for="ts_www">

<input type="radio" name="from" id="ts_www" value="" /> all blogs</label>

<input type="button" value="Search" onclick="return TechnoratiSearch2('url');" class="search" />

</fieldset>

<script type="text/javascript">

function TechnoratiSearch(event, oInput) {
 var keyCode = (event) ? event.keyCode : keyStroke.which;
if (keyCode == 13) {
if (eval("document.forms[0].from[0].checked") == false)
{
 top.location = 'http://www.technorati.com/cosmos/search.html?sub=searchlet&url=' + escape(oInput.value.replace(/ /g, "+"));
}
else
{
 s = escape(document.forms[0].from[0].value.replace(/:/g, unescape('%3A')))
 s = s.replace(/\//g, '%2F');
 top.location = 'http://www.technorati.com/cosmos/search.html?sub=searchlet&url=' + escape(oInput.value.replace(/ /g, "+")) + '&from=' +  s;
}
 return false;
 } return true;
}

function TechnoratiSearch2(oInputId) {
var oInput = document.getElementById(oInputId);
if (eval("document.forms[0].from[0].checked") == false)
{
 top.location = 'http://www.technorati.com/cosmos/search.html?sub=searchlet&url=' + escape(oInput.value.replace(/ /g, "+"));
}
else
{
 s = escape(document.forms[0].from[0].value.replace(/:/g, unescape('%3A')))
 s = s.replace(/\//g, '%2F');
 top.location = 'http://www.technorati.com/cosmos/search.html?sub=searchlet&url=' + escape(oInput.value.replace(/ /g, "+")) + '&from=' +  s;
}

 return false;
}
</script>

 

To get it to work for you blog change the following:

    <label style="display:block;padding-top:3px" for="ts_yb" title="Edgardo Vega\'s Blog"> Change the title to your blog's title

    <input type="radio" checked="checked" name="from" id="ts_yb" value="http://www.geekswithblogs.com/evega/" />  Change the value to the link to your blog

 

After that you should be ready to go. ENJOY!

Print | posted on Monday, February 07, 2005 11:28 PM |

Feedback

Gravatar

# re: Add Technorati Search to your site my way

This is great! I love it.

Dave
2/8/2005 1:42 AM | David Sifry
Gravatar

# re: Add Technorati Search to your site my way

unfortunately, technorati searchlet has stopped working and fetches results from their entire database
3/1/2005 8:27 AM | amit agarwal
Gravatar

# re: Add Technorati Search to your site my way

This looks great but do you know how to get it to work with a fixed iuplog template:

http://www.iuplog.com

I've managed to add some images as links (which has slowed it down considerably) but the right nav bar is non editable.

Thanks

3/17/2005 6:13 AM | Selfbuilder

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 3 and type the answer here:

Powered by: