I’ve had a few requests for this in the last 24 hours, so here ya go.

Folding@Home is a distributed computing project with the goal of better understanding protein folding, misfolding and related diseases.  I recommend anyone that has some extra clock cycles on their computer to contribute towards this and other worthy distributed computing projects.

Folding@Home Stats is a WordPress plugin that displays just what is promises.  Currently, this plugin will display your total score, overall rank, number of processes completed in the last 50 days, number of processes completed in the last week, and the last time any of your computers reported a complete work unit.

You can download the latest version of Folding@Home Stats here.

Requirements:

This plugin has been tested on versions 2.0.4, 2.0.5, 2.0.7 and 2.1.  It should (technically) work on anything from 1.5 up, but I can’t promise this.  PHP 4.0 to 4.3 or 5.0+ is required.

Installation:

  • upload the contents of the zip file to your “wp-content/plugins” directory (be sure to write them to the folding-stats directory)
  • ensure your folding-stats directory is writable (required for caching)
  • go to the “Plugins” main menu and find “Folding@Home Stats”, then click “Activate”
  • go to the “Options / Folding Options” menu and enter your account id, and set the number of hours between stat refreshes

Usage:

  • modify the theme file where you wish to display your SETI stats (usually sidebar.php) and type in the following line:

<php get_folding_stats(); ?>

Uninstallation:

  • go to the “Plugins” main menu and find “Folding@Home Stats”, then click “Deactivate”
  • delete the files from your “wp-content/plugins” directory

Change Log:

0.1 - Initial Release

Bug Reports:

As always with initial releases, I’m sure there will be one or two things that I forgot to check.  If you happen to find a bug, please let me know.

Enjoy!

March 21st, 2007SETI@Home WordPress Plugin

SETI Stats is a WordPress plugin that displays your current SETI@Home Stats.  This was put together in a short amount of time, so it’s a little light on the features.  Currently, the plugin will display the total credit and average credit values, as well as your team name (if applicable).

In the future I hope to add the number of units completed and number of computers in use.

You can download SETI Stats here.

Requirements:

SETI Stats has been tested on WordPress 2.0.4, 2.0.5, 2.0.7 and 2.1.

Installation:

  • upload the contents of the zip file to your “wp-content/plugins” directory (be sure to write them to the seti-stats directory)
  • go to the “Plugins” main menu and find “SETI Stats Display”, then click “Activate”
  • go to the “Options / SETI Options” menu and enter your account id, and set the number of hours between stat refreshes

Using:

  • modify the theme file where you wish to display your SETI stats (usually sidebar.php) and type in the following line:

<php get_seti_stats(); ?>

Uninstallation:

  • go to the “Plugins” main menu and find “SETI Stats Display”, then click “Deactivate”
  • delete the files from your “wp-content/plugins” directory

Change Log:

Bug Reports:

As always with initial releases, I’m sure there will be one or two things that I forgot to check.  If you happen to find a bug, please let me know.

Enjoy!

 Update:  For those of you interested in getting Global Translator 0.6 to work with FireStats, go here.

 I’ve had several requests from people who use Omry Yadan’s FireStats and want to use Davide Pozza’s Global Translator Plugin, as the two plugins tend to behave poorly together.  For anyone that hasn’t used these two together, what happens is the wrong source page is sent to the Google Translation service, and readers receive either a 404 or a white blank page.  This appears to be a mod_rewrite issue that only affects Global Translator.  Luckily, there is a very quick and dirty fix that will resolve the issue.

First off, I’d like to say that this fix has been tested on both WordPress 2.0.x and 2.1 with FireStats 1.1.0 through to the current 1.1.5 Stable and Global Translator 0.4.1.  I have not updated to the most current version of Global Translator because this one suits my needs just fine.

Now the fun stuff.

There are only two lines that need to be changed in the translator.php file found in your /wp-content/plugins/global-translator/ directory, and in the translate function.

$url_to_translate = BLOG_HOME . ‘/’ . $url;
should be changed to:
$url_to_translate = preg_replace(’(it|ko|zh-CN|pt|en|de|fr|ja|es|ar|//)’, ”, $_SERVER['REQUEST_URI']);

And below that:

$resource = $translator_base_url . $language . ‘&u=’ . $url_to_translate;
should be changed to:
$resource = $translator_base_url . $language . ‘&u=’ . BLOG_HOME . $url_to_translate;

These changes eliminate the $url variable’s use from the translate($lang, $url) function, but the second variable should not be removed from the definition.  This is not a complete solution to the matter, but it’s a quick solution that will work for the majority of sites.

Keep in mind that you need to use “Date and Name based” permalinks and your .htaccess file should be updated acccordingly (this is done by WordPress automatically if the appropriate permissions have been granted).  All of this is outlined in the Global Translator instructions, but it’s a critical component that I’ve seen missed elsewhere.

For anyone that has not used these plugins, I highly recommend them.  The Global Translator is a great way to help foreign visitors enjoy your site (despite the occasional inaccuracies in machine translation), and FireStats will give you a great idea of where your readers are coming from and what browsers they’re using.  This last point is important if you are designing sites to be optimized for certain browsers.

If there are any questions with this change, just drop me a line.  I’ll be sure to offer what help I can.

Update: 

As requested, here is the modified translator.php file that I use on this site.  Please note that this is from version 0.4.1 rather than the current release.

Before using this file, please make sure that your site has the “WordPress should compress articles (gzip) if browsers ask for them)” checkbox cleared.  This can be found in the Options menu, under Reading, down at the very bottom.  Several users have reported that after this is cleared out, Global Stats will work without fail on their site.

Enjoy,


© 2007 Jason’s Random Thoughts | Powered by Hot Coffee and Sheer Will