Technorati plugin

Freshness Warning
This article is over 15 years old. It's possible that the information you read below isn't current.

Dave Sifry has opened up a Technorati interface that allows outside developers to use the Technorati data. I’ve whipped up a quick MT plugin that can get the Technorati link Cosmos for your entire blog or a specific entry and insert it into your blog pages.

Tim Appnel has taken over the maintenance and support of this plugin as of Oct 2004.

Requirements

  • Movable Type 2.21 or greater.
  • XML::Simple
    The plugin will check to see if this is installed. Any version newer than 1.0 should work, but the plugin has only been tested using v1.08. You can get the module here, or directly from CPAN. Copy the XML directory into your Movable Type extlib directory.
  • XML::Parser
    This is required by XML::Simple. If you don’t already have this installed, your hosting provider will have to do it for you.
  • File::Spec
    Movable Type needs this to run, so you already have it. Don’t worry about it.
  • LWP::UserAgent
    You can run mt-check.cgi to see if you have this. If you need it, follow the Movable Type installation instructions

Suggested

  • MTPlugins::Expressions
    My Expressions plugin is optional and is only needed if you want to use MT tags in your attributes.

Download

Technorati 1.1

Installation

Unzip the Technorati zip file to a directory on your computer.

Configuration

Open the file called technorati.config. You can set common configuration options in this file.

  • Key (required)
    In order to use the Technorati plugin, you’ll need to get an API key from Technorati. Without it, the plugin can’t get any information from Technorati. Find the line that starts with “Key” and change the portion that reads XXXXXXXXXXXX to your developer’s token.
  • CacheDir (optional)
    By default, Technorati looks for a directory called cache in your MT directory. If you would like to have the cache directory located somewhere else, uncomment the line that starts with CacheDir and change it to match your preferences.
  • NoCache (optional)
    If for some reason you don’t want to use the caching features of Technorati, uncomment this line and caching won’t be used. This is not recommended, as it will increase the rebuild times for your pages, but if you are unable to create a writeable cache directory, you can disable caching.
  • Parser (optional)
    You probably don’t need to set this, but if you get XML parsing errors mentioning ASCII encoding, uncomment this line in the config file. Advanced users can specify their own parser instead of XML::Parser if desired.
  • Debug (optional)
    If you are having trouble with the plugin, uncomment this line. Messages will be shown to you during rebuild that tell you whether or not the cache is being used, the Technorati API URL being used by the plugin, and some other information.

Upload

Open your FTP program and navigate to the directory where you have Movable Type (MT) installed.

Upload the MTPlugins directory to MT’s extlib directory in ASCII mode.

Upload technorati.pl in ASCII mode to MT’s plugins directory. If you don’t have a directory called plugins, create one inside your MT directory.

Upload technorati.config in ASCII mode to your MT directory. This file should be in the same place your mt.cfg is.

Create your cache directory. Unless you changed the location in the config file, you should create a directory called cache inside your MT directory. Set the permissions on this directory to 666. (Tip: On some hosts, you may need to set the directory permissions to 777. Try using 666 first and if you get errors about writing to a file, then use 777.)

The cache directory is where the cache files are stored. You may find that this directory ends up with a large number of files in it. If this concerns you, all of the files in the cache directory can be periodically deleted without causing any harm. Technorati will recreate any cache files it needs.

Usage

Oonce you’ve installed the Technorati plugin, you�ll have a set of new Movable Type tags. Use these in your templates to display information about who’s linking to you.

Available tags.

MTTechnorati
A container tag that defines what information you want to retreive from Technorati. MTTechnorati is a smart tag. What it does depends upon the context where it is used. If you use the tag inside an entry, the tag will retreive a list of incoming links to that entry. If you use it outside an entry, the tag will create a list of blogs that link to your blog, a reverse blogroll of sorts. If you want to override this behavior, you can add some attributes to the tag and tell it what URL you would like to retreive Technorati data for.

This container can have the following attributes:

  • url If you define the url attribute, the smart behavior of Technorati is turned off. Instead of getting the links for the blog or for the entry, the plugin will get the links for the URL you specify.
  • mode You can choose to get the Technorati link cosmos for the weblog or a specfic permalink. If you don’t specify the url attribute, the mode is set automatically, but you can override it if you want. If you do set a url, the mode defaults to the cosmos for the weblog. Valid values here are weblog and link.
  • lastn This tells the plugin how many links you want to get back. The plugin will retreive all the links up to the maximum you define. The default is 10.

MTTechnoratiLinkTitle
A tag representing the title of the blog or page that is linking to you. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkURL
The URL of the blog that is linking to you. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkRSS
The RSS feed for the blog that is linking to you, if it is known by Technorati. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkInbound
The number of inbound links to the blog that is linking to you. This is not the number of links to you, but rather the number of links to them.

MTTechnoratiLinkBlogs
The number of blogs linking to the blog that is linking to you. Like MTTechnoratiLinkInbound, this is not the number of blogs linking to you. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkPermalink
Technorati’s best guess as to the permalink URL for the blog entry that is linking to you. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkExcerpt
An excert from the page that is linking to you. This will be blank for reverse-blogroll searches. It supports an if_blank attribute that specifies alternate text to display if the tag is empty. The attribute can contain MT Expressions.

MTTechnoratiLinkCreated
The date that Technorati first became aware of the link. This will be blank for reverse-blogroll searches. You can use MT’s date tag formatting to format this the way you would like.

MTTechnoratiVersion
The version number of the Technorati plugin.

MTTechnoratiCacheDateTime
The date and time that the plugin cache was last created. The date and time when the cache was last updated. If the cache is new, the current date and time are returned. You can use MT’s date tag formatting to format this the way you would like.

Examples

Get the last 25 sites that linked to your blog:

<ul>
<MTTechnorati lastn="25">
<li><a href="<MTTechnoratiLinkURL>"><MTTechnoratiLinkTitle></a></li>
</MTTechnorati>
</ul>
<p>Last 25 inbound links. <a href="http://technorati.com">Powered by Technorati.</a></p>

Get a list of sites that link to any given blog entry:

<MTEntries lastn="15">
<p><MTEntryTitle></p>
<p>Inbound links to this entry. <a href="http://technorati.com">Powered by Technorati.</a></p>
<ul>
<MTTechnorati>
<li><a href="<MTTechnoratiLinkURL>"><MTTechnoratiLinkTitle></a><br>
<MTTechnoratiLinkExcerpt></li>
</MTTechnorati>
</ul>
</MTEntries>

License

Like our other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but we�re not responsible for anything that goes wrong.

Revision History

1.1 - Jun 25, 2004

  • (change) XML errors now give a message in the activity log instead of halting the rebuild.
  • (new) If Technorati doesn’t respond, a message is added to the activity log.
  • (change) The Technorati API’s output is now UTF-8. Removed Jacques Distler’s patch (added in 0.92) to strip control chars, as it now causes problems with multi-byte characters.
  • (change) Support for the LIMIT parameter to the API. You can now request up to 100 lastn items from the plugin without slowing hte rebuild or using more than one request.

1.0 - Jul 24, 2003

  • (Change) Default parser is now XML::Parser on all systems
  • (Fix) Parser preferences are sometimes ignored
  • (New) If Technorati service doesn’t respond, the plugin doesn’t interrupt the build
  • (Change) Better handling of nocache option
  • (New) New arguments on inside tags. ‘if_blank’ allows you to specify text to use if the tag is empty.

0.93 - May 15, 2003

  • (Fix) True/False values in the config file are always interpreted as false in some versions of perl.
  • (Fix) Date formatting tags don’t work on some perl versions.

0.92 - May 14, 2003

  • (New) Added an optional configuration variable for a prefered XML parser.
  • (New) Added an optional configuration variable to disable the cache.
  • (New) Added an optional configuration variable to display debug information.
  • (New) Added an optional configuration variable that forces XML::Simple to use a specific XML parser.
  • (New) TechnoratiLinkCreated tag now accepts date formating arguments.
  • (New) Plugin attempts to correct some common XML mistakes like unescaped ampersands. Thanks to Jacques Distler for the patch.
  • (Change) The Expressions plugin is now optional. If it is installed, MT tag attributes will be processed for embeded tag expressions.

0.91 - May 12, 2003

  • (Fix) Documentation error. The Expressions plugin is required, but wasn’t listed in the documentation or included in the download.
  • (Fix) When using date formatting tags, errors occur.

0.9 - May 12, 2003
* Initial release.

Alexander Payne
July 24, 2003 11:49 AM

As much as I hate to comment on yet another fine Kalsey product, I just today started getting the _exact same_ error that James describes above. That leads me to believe it's something on Technorati's end...

Adam Kalsey
July 24, 2003 12:08 PM

Indeed. The Technorati API service is down. Download the latest version of the plugin and your rebuild problems will be solved.

Trackback from Reflective Reality.
August 16, 2003 2:40 AM

Technorati plugin

Excerpt: Technorati plugin v1 - This is the best plugin yet! Thank you Adam Kalsey! Using the Technorati API it creates links to the blogs that link you. Top toy! No referral logs, no dodgy blog title problems (c/o Musings) just...

Chris
August 16, 2003 7:06 AM

Isn't using an older version going to break everything in the future when ISP's update their servers. Cpanel, ensim and plesk will update this automaticaly for instance. Sounds like a storm brewing to me. Very smart plugin though. Well done!

Trackback from Musings
August 17, 2003 7:17 AM

Technorati Plugin Patch

Excerpt: Adam Kalsey's Technorati 1.0 plugin is out. It fixes may of the bugs I'd previously archives/000161.html">complained about. Unfortunately, it still...

Jacques Distler
August 18, 2003 11:38 AM

Hmmm. Trackback doesn't seem to work. So here's a link to a patch for Technorati 1.0: http://golem.ph.utexas.edu/~distler/blog/archives/000202.html It fixes the problem noted by Gianluca Neri above.

Jacques Distler
August 18, 2003 11:41 AM

Ha. Ha. Apparently the Individual entry doesn't get rebuilt when Trackbacks are received. Adding the previous comment caused the page to be rebuilt (and the trackback to appear). This is a *fixable* problem.

Trackback from bookmarks
September 11, 2003 12:06 AM

Technorati MT Plugin Docs

Excerpt: Technorati plugin :: Kalsey Consulting Group...

Jason
October 4, 2003 12:14 PM

Is there any way to tell this plugin not to display links from my own site?

Paulo Querido
December 5, 2003 2:08 PM

Hi. 1. It's a great plugin, Adam, but I have a problem. My blog is in Portuguese language (usually charset=iso-8859-1) and it does not display correctly AFTER using the Technorati plugin. The names of the retrieved blogs are well displayed, but all the rest is not. I think there is a conflict between MT's construction of the HTML and the output of the plugin. The browsers (tested in Mozilla Firebird and IE 6) don't assume automatically the Unicode enconding, therefore the page is not correctly displayed. ONLY IF I manually override the browser's enconding to UTF-8 all content is well displayed. My few skills of HTML, MT, PHP and Perl are not enough to get a satisfatory solution on this. So I beg for your help. You can see my blog in http://pauloquerido.net and the test blog with MTTechnorati in action in http://pauloquerido.net/index.teste.php . 2) Assuming I have more than one blog in the same MT instalation, but in diferent URLs and with distinct Technorati APIs, is there a way of having the plugin to work well for both? There is only one technorati.config with ONE Key... Thanks.

Paulo Querido
December 5, 2003 2:23 PM

Hi again: forget my question 1., I found the anwser 5 minutes after putting it :) Quite simple, indeed. So simple and obvious that i'm feeling stupid ;) Just replaced charset=iso-8859-1 by charset=UTF-8 in meta-content tag. So don't waste your time seeing my test blog. Best regards

Trackback from mashby.com
December 7, 2003 10:21 AM

Sprucing Up The Place

Excerpt: After yesterday's entry regarding Plugin and how to tweak MT, I couldn't help but do a little tweaking myself. That coupled with the comments from my review at The Weblog Review, I thought of a few things that I could do to kind of spruce up the place....

iced glare
December 18, 2003 10:31 AM

how do you the inbound links to an entry because the sample code you have is not working.

Trackback from Tech-Weblog by Christoph C. Cemper
December 27, 2003 6:29 AM

Technorati Plugin rules over Technorati's watchlists

Excerpt: Technorati Plugin

Byrne Reese
November 13, 2004 1:29 PM

I am having difficulty - I keep getting this in my MT activity log: "Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.3/XML/Simple.pm line 231." But my cache is working and there is content in the cached file: http://www.majordojo.com majordojo http://www.majordojo.com http://www.majordojo.com/index.rdf http://www.majordojo.com/atom.xml 4 6 2004-11-12 21:43:29 GMT 218998 4 6 1 Movalog - All things Movable Type http://sideblog.movalog.com http://www.movalog.com/index.rdf http://www.movalog.com/atom.xml 1 8 2004-11-13 09:02:40 GMT Jay Allen :: The Daily Journey http://www.jayallen.org/journey http://www.jayallen.org/journey/index.rdf 130 192 2004-11-13 05:02:42 GMT What on earth could be the problem? Byrne

These are the last 15 comments. Read all 53 comments here.

This discussion has been closed.

Follow me on Twitter

Best Of

  • Pitching Bloggers Forget what you learned in your PR classes. Start acting like a human instead of a marketer, and the humans behind the blogs will respond.
  • Debunking predictions Read/Write Web's authors have some goofy predictions.
  • Google on the desktop Google picks up Picasa, giving them an important foothold on people's PCs.
  • Best of Newly Digital There have been dozens of Newly Digital entries from all over the world. Here are some of the best.
  • Rounded corners in CSS There lots of ways to create rounded corners with CSS, but they always require lots of complex HTML and CSS. This is simpler.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

15

Recently

Networking as an entrepreneur (Oct 23)
Having a network is crazy important. Networking is not.
Stretching your team (Jun 11)
Stretching your team is one of the best ways to improve your output, your team's happiness, and your velocity. But they'll need coaching.
Physical camera shutter for Cisco Spark Board (Jul 6)
A 3d printable design for a camera shutter for a Cisco Spark Board
My Travel Coffee Setup (Jan 20)
What my travel coffee brewing setup looks like, and how you can build your own for under $100.
Turkey Legs (May 30)
Product naming gone awry.
Speaking for Geeks: Your Slides (Dec 17)
Tips and tricks for creating great slides.
Speaking for Geeks: Writing Your Talk (Dec 14)
Don’t wait until the night before the talk to write it. Crazy, I know.
Speaking for Geeks: Tell a Story (Dec 13)
Telling a story keeps your presentation focused, keeps your audience interested, and makes it easier for you to remember your talk.

Subscribe to this site's feed.

Elsewhere

Tropo
Voice and communications platforms, including Tropo and Phono. Work.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2018 Adam Kalsey.
Content management by Movable Type.