Mar
3rd
Technorati Rank WordPress Plugin Released
After a couple weeks of modifications and improvements, I present the Technorati Rank WordPress Plugin:

Here are some instructions:
- Requires WP2.1 or higher AND PHP5.0 or higher (it utilizes SimpleXML). If you don’t have PHP5.0 or higher, you can download this version from Samanathon.
- Get your API Key from Technorati
- Copy the files to the plugin/technorati-rank directory.
- Go to Options > Technorati Rank and fill in your API Key and your Blog’s URL.
- Optionally, you can set how often you would like to refresh the Cache. The default is 4 hours.
- Once you update the plugin, you should see your blog rank on the Options page along with the snippet to add to your sidebar (or where ever you’d like to put it).
That’s it! Questions or comments welcome. There’s a lot of opportunity to expand this plugin with other Technorati API capabilities. I’ll continue to develop those over time.
See the Project Page for the latest and the download link.


Douglas Karr
Thanks!
Doug
I’m going to assume it’s when the plugin refreshes but I’m still a little confused if that’s the case.
Based on your default refresh time of 4 hours, that means the plugin would refresh 6 times in a 24 hour period, so 6 calls.
Maybe I’m just not seeing it as my brain is in rest mode today but I am curious about this.
At any rate, very cool plugin. That makes 2 in 2007 for you. w00t.
Thanks! I think it’s cool, too. I’m going to continue to expand it as well.
Doug
I’ll avoid the embarassment of putting this onto my web site though, if you add a couple of zeros onto your ranking you’ll get a ballpark figure of how my site ranks with Technorati!
As for your rank… that’s not embarrassing at all! I only utilize it as a gauge one whether I’m moving in the right direction - not to say I’m better than anyone. Most of the blogs I read are in the 6-digit rank but I love reading them!
Unfortunately, you forget to add the alt attribute to the two images. I tried correcting it, but either I have a plugin interfering (which doesn’t seem likely), or it’s ignoring my addition of the alt attributes to each image.
As a result, those two images pitch errors in the W3’s validator.
Thanks! And it’s an excellent catch and I’m a little embarassed. I was so excited to get it out that I missed that. I’m going to work on making it 100% style controlled, even placing the graphics in div styles. I’ll see what I can knock out tonight.
Doug
I’ve uploaded a minor revision that adds both (deprecated) alt tags and title tags to the img tags. I tested it on the W3C validator and it passed.
I’m still working on a much nicer CSS version using an inline list… but I’m working through some issues. I love CSS but cross-browser can be a challenge!
Regards,
Doug
I remember when I was fighting with it, and eventually said, “Oh, bugger that.” and just ended up going with compliant code, instead.
I stopped caring if it didn’t look right in one major browser, as long as the data that I intended would get across to the viewer.
In your code, you have this:
function wptr_add_style() {echo "<style>\n#technorati-rank
I neglected to mention yesterday that I had fixed this locally, since the validator was gagging on this, to:
function wptr_add_style() {echo "<style type='text/css'>\n#technorati-rank
That, however is a rather, aheh… trivial thing. I just wish I had mentioned it yesterday, while you were already pushing in the other stuff.
Thanks for all the assistance.
However, with my (german version) 2.1.2 of WP I get this error after I entered my API key:
—–
Your current rank:
Warning: fopen(/Applications/xampp/xamppfiles/htdocs/wp/wp-content/cache/technorati-rank.html) [function.fopen]: failed to open stream: No such file or directory in /Applications/xampp/xamppfiles/htdocs/wp/wp-content/plugins/technorati-rank/technorati-rank.php on line 91
Warning: fwrite(): supplied argument is not a valid stream resource in /Applications/xampp/xamppfiles/htdocs/wp/wp-content/plugins/technorati-rank/technorati-rank.php on line 92
Warning: fclose(): supplied argument is not a valid stream resource in /Applications/xampp/xamppfiles/htdocs/wp/wp-content/plugins/technorati-rank/technorati-rank.php on line 93
—–
Should I simply create that “cache” directory in wp-content and everything will be fine?
Thx,
Stefan.
Yes, that should do it! I’m sorry about that - I should absolutely write the check to see if the folder already exists. If you want, you can also install WP-Cache and that will take care of putting the folder there.
There’s also a brand new version of this plugin available! I released it today.
Thanks for letting me know about this!
whoa! WHAT a fast reply — THANKS!!
So I made this directory “cache” but still can’t get it running. Instead of “no such file or directory” I now get “permission denied”.
But that was just due to the fact that my default umask does not allow the group to write in that directory.
So I changed the access rights for the “cache” directory to allow the group to write into it and — voilá — everything looks fine now!
(oh, btw: already had 2.0.0 ;-))
So thanks again, Doug, for this nice & nifty little tool!
Cheers,
Stefan.
You caught me sitting at the book store, online.
Glad that took care of it, I forgot about the CHMOD needed to write to the directory. Details, details!
Keep an eye out soon for an entry in German. I have quite a few readers in Germany and really appreciate all the feedback. I’ve read that, culturally, Germans weren’t as open to blogging as some other countries; however, my experience is much different. I actually find myself copying and pasting many German blog entries into translation engines to read them.
I’ve also told my friend, Michael, when he translates the entry, he has total freedom to make fun of me in it. I’m sure he’ll take advantage and I hope the translation engine will be able to translate the slang. My grandfather lived in Germany for many years, so I’m hoping he’ll be able to help out, too!
Thanks!
Just a note, I just put up version 2.0.1… it now ensures that the cache directory exists and is writeable. Thanks for letting me know about this issue!
Regards,
Doug
thanks a lot for your effort! Really Appreciate it!
You’re still right: I, too, think that most of the Germans who are online still have some kind of technology fear. For sure more than the Americans!
I’m not representative here, unfortunately. I’m a geek, I guess. Lots of toys here in the real and in the virtual world.
–
I still have a problem with your plugin, Doug: I’m using the Widgets plugin, too, and my theme is capable of displaying the widgets in the sidebar.
Now I dragged a pure Text widget into the sidebar and entered the code your plugin produces into it.
However, nothing appears at the location of the text widget in my sidebar.
Do you happen to know whether the Text widget can handle HTML/PHP code?
cya,
Stefan.
I think you can use Widgetize Anything. It’s a plugin that allows you to actually put PHP code in any sidebar widget.
Cheers!
Doug
However … Because my rank ist something around 1.7Mio. the text rendering is a little bit ugly as you can see here: http://cocoa.wops.de.
There *would* be enough space for the line “Blog Rank:” and the line with the number below it if the first line would start a little bit more at the top of the badge …
Any chance for this cosmetic fix?
Greetings,
Stefan.
Worst case scenario, you can modify the size of that text in the plugin folder in the style.css file.
PS: Looks great in Firefox
Doug
With Camino (a native OSX browser that uses the Gecko engine) the badge looks fine, too. And for the rest, I’ll use your hints. Great!
But besides that, I really should work on my technorati rank …
Take care,
Stefan.
Thanks for the tool though
Cheers
PS: You can use the plugin without showing your rank on your site.
failed to open stream: Permission denied in /home/.hoagie/brevesnotas/blog.saboya.org/wp-content/plugins/technorati-rank/technorati-rank.php on line 121
Im using WP 2.1.3. Strange…
Warning: include(/usr/local/www/flossdk/www/wp-content/plugins/technorati-rank/cache//technorati-rank.html) [function.include]: failed to open stream: Permission denied in /usr/local/www/flossdk/www/wp-content/plugins/technorati-rank/technorati-rank.php on line 143
Warning: include() [function.include]: Failed opening ‘/usr/local/www/flossdk/www/wp-content/plugins/technorati-rank/cache//technorati-rank.html’ for inclusion (include_path=’.:/usr/local/share/pear:/usr/local/www/serverinfo’) in /usr/local/www/flossdk/www/wp-content/plugins/technorati-rank/technorati-rank.php on line 143
i get this problem think chmod all correct !
Looks like you’re host is lacking the required versions of PHP and/or the associated libraries. Please see the requirements on the project page and check with your host.
Thanks,
Doug