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');
34 Responses for "TTLB Ecosystem Cache Wordpress Plugin"
What’s your opinion on having the ability to alter the output? For instance, I’m much more interested in having a function that only displays my status (so that I can place it next to my custom TTLB button). Additionally, the javascript strips the slash from my blog and breaks the link somehow.
Funny you should mention that, the next thing I was planning on doing was stripping out the javascript & turning it into plain text.
At that point I suppose it wouldn’t be too hard to just extract the anchor links abd display whatever you want.
What I’d really like is for someone more graphically inclined than me to come up with some icons to correspond with the categories, and you could just display that. But then that might be considered tacky by some
Just to correct: stripping the slash did not break the link. Manually including the slash breaks the link.
If the graphics conformed to the 80×15 format, I’d probably use them. Perhaps you could comment that out in delivered code, with a brief note to “enable this to turn on graphics”. Also maybe have whoever creates the graphics create a few different sets for various sizes. I like 80×15, but someone else might prefer a larger format.
I’ve been trying to get your plugin working, but I can’t seem to get it right. If you go to http://blog.gpiper.org/blog/stats.php and look on the right, you’ll see two TTLB links. The first, which correctly lists my status, is using the TTLB script. The second, which doesn’t correctly list my status, is using the call to the plugin.
On the page, I’ve tried calling the plugin both with & without the blogname variable — e.g.,
and
Either way yields the results currently seen on that page.
Any ideas?
Thanks for your help!
Regards,
-ghp
ghp - I have the same issue. I am thinking it may be the fact that in order for the plugin to save the cached file with your status in it, write permissions are necessary somewhere. I am not sure where - I am tracking down wheere the cached file is supposed to be saved.
ghp - Try this:
1. Completely remove the plugin.
2. Delete tlbstatus.php from /wp-content
3. Make sure you put ttlb_ecosystem_details(’http://yourURLhere’) with your URL parameter in your template.
4. Re-install the plugin.
OK, as Robert has already discovered there are two possible problems. One is that the web server must have write permissions on the wp-content directory to write the cache.
But I think that this problem comes from the script pulling the url from WordPress. If the link you use for the ecosystem has a slash on the end, and the url you’ve set inside WordPress doesn’t then the ecosystem thinks it’s talking about 2 different sites.
This is why a added the ability to pass a url to the tag.
I seem to be missing something on this, as I can’t figure out exactly what to do to make this work.
What is the code that has to be added to the sidebar in order for this work? I’m pretty much a php dummy, so everything I have tried has resulted in internal server errors.
Thanks for any help on this.
The code (assuming you’ve activated the plugin) is
ttlb_ecosystem_details();
If that doesn’t work you could try
ttlb_ecosystem_details(’**url**’);
Where **url** is replaced by the url that your blog is identified by in the ecosystem
Can you copy & paste the errors that you’re getting here so I’ve got an idea of what’s happening?
Now I’m not getting the internal server error, but I am getting this error:
Fatal error: Call to undefined function: ttlb_ecosystem_cache() in /home/steelerd/public_html/blog/wp-content/themes/cleanbreeze/sidebar.php on line 98Paul, it’s easier to debug this through email, I’ll post the fix to the site once we’ve worked it out
Robert,
You (and/or updating from 1.1 to 1.2 of the plugin) fixed it!
Thanks for the help…
-ghp
Did you ever get Paul’s ‘call to undefined function’ error fixed? I still get it.
Using version 1.3
Thanks!
Paula, sorry, I forgot to update this.
What’s the code you’re putting into your template to show the TTLB code?
is it
ttlb_ecosystem_details();orttlb_ecosystem_cache(), if it’s the later you need to change it, because it was inccorect (I had it displayed wrong here). It should bettlb_ecosystem_details();ttlb_ecosystem_details();
that is what I just put in, per your message.
Got a File 500 error
Then I tried
ttlb_ecosystem_details(’http://paulaoffutt.com/blog’);
Both with and without the trailing /
Again, File 500
I had the less-than mark( in the end.
does it need the get_?
I just get a blank.
I have the plugin installed and activated, have write permission enabled on wp-content and I have the following line inserted in my sidebar.php -
I also tried:
Help?
http://online-poker-online-poker.net
http://online-poker-online-poker.net/online-poker/ online poker
TTLB Echosystem
…
I had some trouble and had done a bit of troubleshooting. I think what really fixed me up was upgrading from 1.3 to 1.4. For anyone troubleshooting and not having any luck, here’s a tip that I forgot about and would have saved a bit of time on: Once changing your ttlb_ecosystem_cache.php file or your call to ttlb_ecosystem_details(), you need to remove/rename the tlbstatus.php file in your wp-contents folder. (I think that, if you’re using 1.4+, you may also be able to add a second parameter to the function call and force an update, but Glenn will have to confirm that one.)
The second parameter has been there since the beginning, but yes you’re right Novac, if there’s any problem with the plugin displaying, deleting the cache file (ttlbstatus.php) is a good option.
Ensuring that the webserver can write to it is also a good idea too. Unfortunately I can’t write instructions on how to do that because there are just too many different platforms, if anyone knows of a good tutorial on how to make things writeable by the webserver on multiple platforms, please post it here!
Ok, I think it is updating however when you click on adorable little rodent the host= is blank. So I tried:
ttlb_ecosystem_details(’http://uncooperativeblogger.com’)
Still no good, it is not passing the url
Brian, I’ve found that you need the trailing slash, ie
ttlb_ecosystem_details('http://uncooperativeblogger.com/')It seems something recently changed in the ecosystem, because my version here suddenly stopped working until I put the trailing slash in.
Nope. It is not that it is not the proper url, it is not passing the url at all. it ends in host=
Nothing else. Strange.
I was obviously not clear in my previous post. Whther I put the trailing slash in or not it doesn’t work. this is what it is passing regardless if it is empty, which used to work, or I put in the url manually.
http://www.truthlaidbear.com/showdetails.php?host=
Sorry Brian, I’ve been dead slack in not getting back to you.
What I’ve found is that it appears that the ecosystem site isn’t displaying your info correctly. If you go to here: http://www.truthlaidbear.com/MyDetails.php?style=javascript&url=http://uncooperativeblogger.com which is the link that the plugin uses to create the javascript to display, view the source code of that page and you’ll see that the http://www.truthlaidbear.com/showdetails.php?host= link is showing up there too.
Sorry mate, there’s not a lot I can do about that. I’m hoping in the next release of the plugin to allow you to change the layout of the display, so hopefully it can get fixed then, but for now your best bet is to email NZ Bear and let him know what’s happening
Thanks! It seems to have fixed itself. I guess it was on their end.
I do have another question:
I use plug-in to Automatically select the best content type based on what the browser accepts. So in firefox it is xhtml. xhtml does not show javascript, is there a way to fix this so it does display properly for xhtml?
[...] Anyone who has a site that displays the TTLB Ecosystem status, or has visited one, knows that when TTLB slows down, every one slows down. This is a handy plugin I found on the WP-Plugin database that caches your status daily to a file. It both alliviates stress on TTLB and bullet proofs your site when TTLB is having a “growing pain.” [...]
The plug-in is not working for me, and I have no clue what I’m doing wrong (I’m sort of new to this whole blog thing).
I’ve installed and activated the plug in, but I don’t see anything on my site.
http://www.mormonstories.org
Any ideas?
Thanks/sorry.
John
John-did you add the template tag into your sidebar?
You’ll need to add
?php ttlb_ecosystem_details(’http://YOUR_BLOG_URL/’); ?
Put all that inside a less than and greater than symbol.
HTH
Wow, someone needs to port this over to a movable type plugin. Great idea.
[...] Update 2: I’ve solved the issue by temporarily turning off the TTLB Ecosystem Cache plugin. The plugin sets the TTLB status to only update every 24 hours, which speeds up loading the blog but for some reason broke my theme. Will post another update once I figure out why. Discuss! | Email This Post | Print This Post | Permalink [...]
i try to find something at google.com and take it on your site…thanks
zoloft drug
What I want to do on my blog, is every few hours take the oldest post and move it to the
front of the queue, all automatically. Anyone know if there is a plugin that can do this or
a simple way to set up another plugin to do this (use my own feed perhaps)?
Thanks.
Leave a reply