Code


One of the most frustrating things about working with MS’s Composite UI Application Block or CAB has been the inability to use the search function over at the GotDotNet forums.

Well, opensource to the rescue….

A gracious user just started a Wiki for the Composite UI Application Block over at http://cabpedia.com.

Hopefully this post will help spread the word about the new site so more users can contribute :)

A-motivated is the name of the game.

I *hate* VB6.

Someone please kill me (or give me another job)…

But on an uplifting note HelluvaBlog is back online…

And Mr. Horsepower has been kicking out some outstanding music reviews. Check out his Made/Remade series that’s showcasing some very interesting covers that have been made.

Well, I just took a few seconds and found all of the missing end tags, double li tags, etc and I’m finally W3C XHTML transitional valid…

Valid XHTML 1.0 Transitional

And my CSS is valid as well, YAY!

Valid CSS!

So I’ve spent most of this day at work playing around with WordPress, and various plugins that have been made for it.

For instance This Audioscrobbler plugin for WordPress made by Chris Coggburn. (Seen at the right under Recent Tracks) Unfortunately, Chris no longer updates that blog, and I can’t post the fix to a bug I found in his script.

I am not a PHP guru (by any means), but a bit of google goes a long way…

Anyway, here’s the fix, hopefully google will pick this up and it will help some other helpless soul out along the way:


Ok, i figured out why this thing is refreshing the cache file on each hit (at least on my site)

the function time() returns the number of seconds since the Unix Epoch and the function that is trying to figure out if the cache file needs to be updated uses it.

But it uses teh multiplier $rdfcachetime as if it’s for minutes because it only multiplies it by 60 instead of 3600 (the number of seconds in an hour).

So basically, change the following line (in audioscrobbler.php):
if (((!file_exists("cache_".$asusername.".rss")) || (time() - filemtime("cache_".$asusername.".rss")) > ($rdfcachetime * 60))) {

TO:
if (((!file_exists("cache_".$asusername.".rss")) || (time() - filemtime("cache_".$asusername.".rss")) > ($rdfcachetime * 3600))) {