MTYahooRank

by john on February 28, 2004

MTYahooRank is a Movable Type plugin that allows you to programmatically determine the Yahoo Rank of a keyword or phrase. Have a keyword that is special to you that you always want to know where you stand on Yahoo? MTYahooRank is for you. MTYahooRank is a page rank checker similar to my MTGoogleRank plugin, but actually has a couple of additional features that I have not yet been able to get working via the Google API. To see one example of how this could be used I’ve added a simple SearchRanks widget toward the bottom of my sidebar on my front page.

To use simply download YahooRank.txt rename to YahooRank.pl and place in your Movable Type plugins directory. Then include the tag in your templates and away you go.

MTYahooRank includes the following tags:

MTYahooRank – The main tag – arguments documented below.
MTYahooRankVersion – Returns the version number of MTYahooRank.
MTYahooRankPoweredBy – Returns the phrase “Powered By MTYahooRank” with a link to my site. No obligation to use, but it would be cool if you did.

The main MTYahooRank tag takes one required argument and optionally up to five additional arguments:

query = the actual query to pass to Yahoo. This is a required argument and you will get a rebuild error if you don’t include it.
url = by default MTYahooRank uses your own weblog’s url as defined within MT to use in the search. You can override this default if you choose.
pages = by default MTYahooRank only searches through the first page of results in Yahoo. You can override this default if you choose. Take caution when doing so, however, as this will slow rebuilds down.
count = when the count argument is included MTYahooRank will return the total estimated number of results for the given query. When this argument exists it is assumed you want the count returned – the value you use does not matter.
link = when the link argument is included MTYahooRank will return an html formatted anchor to the yahoo search page for the given search parameter. When this argument exists it is assumed you want the link returned – the value you use does not matter.
linktype = works in conjunction with link, if linktype = “text” then the query value is the text, otherwise the result number is the text

Unless count or link is specified, MTYahooRank returns either a numeric value representing the YahooRank calculated or a string formatted like “>#” where # is the number of results searched. So if you passed the argument pages=3 that would actually search through the first 30 results on Yahoo (10 results per page by default) and if your search string was not found the value “>30” would be returned. If the count argument is included then the numeric value returned will be equal to the estimated total result set size.

Here are some usage examples:

<MTYahooRank query=”rubber chicken”/>
<MTYahooRank query=”rubber chicken” url=”www.microsoft.com”/>
<MTYahooRank query=”rubber chicken” url=”www.microsoft.com” pages=”3″/>
<MTYahooRank query=”rubber chicken” pages=”3″/>
<MTYahooRank query=”rubber chicken” link=”1″/> would return “>10″:http://search.yahoo.com/search?ei=UTF-8&fr=sfp&p=rubber+chicken
<MTYahooRank query=”rubber chicken” link=”1″ linktype=”text”/> would return “rubber chicken”:http://search.yahoo.com/search?ei=UTF-8&fr=sfp&p=rubber+chicken

Thanks to code from Adam Kalsey MTYahooRank also supports embedded MT tags, for example:

<MTYahooRank query=”[MTBlogName]” url=”[MTBlogURL]” pages=”3″/>

Note that instead of using the tag as you would find it in your templates, <$MTBlogName$> you need to use [MTBlogName] with the square brackets.

In a future article I will show you how you can utilize Brad Choate’s MTMacro plugin to include MTYahooRank results within an entry.

I hope you find it useful. I’d also love to get suggestions for improvement, there should be many.

History

* 11/02/2004 – Version .20 released.
* 02/28/2004 – Version .10 released.
** Initial release.

{ 3 comments }

MT Plugin Directory February 29, 2004 at 9:13 pm

YahooRank

Similar to the GoogleRank plugin….

Reckless Abandon September 1, 2004 at 4:23 pm

MTGoogleRank and MTYahooRank plugins installed

Well I finished installing MTGoogleRank and MTYahooRank. Both of which are very nifty plugins. All blogomatic.net users have access to both of these and information on how to use them can be found on the plugin’s respective page….

0:0:0:0:0:0:0:1 September 2, 2004 at 5:06 am

Major site updates

Where do I start.. Basically I upgraded from MovableType 3.01D to 3.1. This upgrade brougt out quite a few new features such as: Dynamic Pages Scheduled Posting Sub-Categories Application-Level Callbacks I started with sub-categories a few releases ago…

Previous post:

Next post: