
This allows you to Add a live badge to your blog or website that queries Site Explorer for the number of links to your site or page on the web.
I've tried to use the generated code in blogspot but it will not display the links number. However everything works perfectly after some modification on the original code.
Modified version:
<!-- START CODE -->
<script type="text/javascript">
var selfurl = location.href;
var siteurl;
var regex = /(^\w+:\/\/)((\w|\.)+)\//;
var results = regex.exec( selfurl+"/" );
if (results==null) siteurl = selfurl;
else siteurl = results[1]+results[2];
function Goto() { location = "http://siteexplorer.search.yahoo.com/advsearch?p="+siteurl+"&bwm=i&bwmf=s";}
</script>
<div id="ybadge" style="position:relative;left:0px;top:0px;width:110px;height:55px;z-index:1;border: 1px solid #8ea9ba;background: url(https://sec.yimg.com/us.yimg.com/i/us/sch/el/siteex_badgebig_bg.gif) repeat-x;overflow: hidden;cursor:pointer;" onclick="Goto()">
<div id="ylogo" style="position:absolute;left:6px;top:5px;width:18px;height:10px;z-index:1;">
<img width="96" src="https://sec.yimg.com/us.yimg.com/i/us/sch/el/siteex_badgebig_logo.gif" height="12"/>
</div>
<div id="ynum" style="position:absolute;left:2px;top:21px;width:106px;font:bold 14px Arial, Helvetica, sans-serif;color: #2d2a25;height:15px;z-index:2;text-align: center;">
<script type="text/javascript">
function ws_results(obj) { var div = document.getElementById("ynum"); var numofres = obj.ResultSet.totalResultsAvailable; div.innerHTML += numofres; }
document.write('<script src="http://api.search.yahoo.com/SiteExplorerService/V1/inlinkCount?appid=YahooBadge&entire_site=1&query=cwkhang.blogspot.com&output=json&callback=ws_results"></script\>');
</script></div>
<div id="ytxt" style="position:absolute;height:15px;z-index:3;font:normal 11px Tahoma, Verdana, Arial;left:2px;top:38px;width:106px;color: #2d2a25;text-align: center;">
Links to Site </div></div>
<!-- END CODE -->
[Generate Code]


1 Response to Yahoo! Site Explorer links badge under blogger platform
Nice one for the code for the badge. it works on my blog http://newsblog-365.blogspot.com now all i need are some links. thanks.
Something to say?