24 Feb
N.Z. Bear has for a while now provided The Truth Laid Bear Ecosystem, which ranks sites based on incoming links & daily traffic, assigning a site a cute animal name based on their ranking (I’m currently a Marauding Marsupial. Awww.)
Orange Haired Boy wrote a great script which provided a javascript function to display your status on your site. This works really well, unfortunately it has the disadvantage that it has to pull data from TTLB site every time your page is loaded, which is time-consuming for the user. Not to mention that I don’t even want to think about what N.Z. Bear’s bandwidth costs are.
So to alleviate both problems, I’ve written a caching plugin for Wordpress. Basically what this does is when it loads on your site for the first time, it goes and grabs the content from the http://www.truthlaidbear.com/showdetails.php script for your site and then puts that content into a file. Then, every time your site is viewed after that, this plugin checks the file and if it’s not more than 24 hours old it just displays the contents of the file. 24 hours should be a short enough time that if you happen to get an Instalanch or Slashdotted, you’ll still be able to display your hubris to all around.
This plugin has been setup so that it works with the WP Plugins Manager ‘One-Click-Install’ under the External Tool Integration category, and I’ll be putting it up on the Worpress Plugins Repository just as soon as I get access.it is now available from the WordPress Plugins Repository
Manual Installation
You can download the plugin here (1KB, .zip file), and then extract the PHP file & put it into your plugins directory. Activate it and that’s it.
Usage
The plugin adds a template tag called ttlb_ecosystem_details(), which will display the ecosystem status. This takes an optional string argument ‘$my_blog’ which you can use to set the URL you want to display the status for, but if you leave it blank it will default to the URL you set in the options in Wordpress.
This site is currently using this plugin, you can see the results on the sidebar on the front page. From a users perspective there should be no difference between sites that use this plugin & sites that use the original javascript tag (other than load times).
Comments & suggestions are more than welcome
Update: Troubleshooting A couple of people have noticed that when used, the plugin doesn’t display the status to their sites, just the surrounding text, like this: Now, the script is ’supposed’ to pull the url to use from your WordPress setup, but as you can see here, it isn’t showing a url. Now this could be for two possible reasons. Either way, both problems should be resolved by adding your url to the function, e.g. I would use I'm a
in the
TTLB Ecosystem
ttlb_ecosystem_details('http://blog.slaven.net.au');