Books are one of my passions. I like ‘How To’ books, science fiction, non-fiction, engineering and science, suspense — books of many types. So I found this website called Shelfari and a plugin (BookList.php) that is supposed to show Shelfari lists here. And it didn’t work. Bummer. It crashed and bailed. It seems that it was written before PHP5 came out and some new additions to the NuSoap package. The major change is a change to the function call from ’soapclient’ to ‘nusoap_client’.

Well, dig out my old tool kit and get to work. First error was a parameter type mismatch. The first piece of solution for this was to install the latest NuSoap (nusoap 0.7.3 November 6, 2007) package. Replace everything in the plugin subdirectory ./nusoap. (Pay a bit of attention here as, I think, typically NuSoap wants to be in the subdirectory ./NuSoap.)

Next edit line 74 in classes.php (in the BookList plugin) from:

$client = new soapclient($requestURL, true); // true is for WSDL

to:

$client = new nusoap_client($requestURL, true); // true is for WSDL

This solved the crash problem and the plugin now correctly served up book lists from Shelfari.

The next problem has to do with the functionality of the widget shell. Chris Stanley worked up a nice little wrapper for use with WordPress/Automattic widgets. But I needed a widget to work with the BookList plugin and that provided a list of entries not a set of paragraphs. So…

In the netflix_widget.php file change lines 44-47 from:

echo $before_widget . $before_title . $title . $after_title . '<br />';
// Call Albert Banks' Netflix plugin
netflix();
echo $after_widget;

to (and rename to booklist_widget.php):

echo $before_widget . $before_title . $title . $after_title . "\n<ul class=\"booklistwidget\">\n";
// Call Shayne Holmes' BookList plugin
booklist();
echo "</ul>\n" . $after_widget;

And that’s it. BookList for widget ready templates.