A bugfixed Bookmarks Displayer Widget

I upgraded to WordPress 2.5.1 today due to some major security issues (German link) and was reminded that one of my widgets was not working correctly. Nathan Oliphant wrote this widget to display bookmarks in the sort order of the users choosing. Unfortunately, it had two minor bugs which 1. caused changes not to be made persistent correctly with recent WordPress versions and 2. broke proper sort order selection. I fixed those bugs and added optional support for Ozh’s Click Counter plugin.

Again, here’s a direct link for your convenience, tested with WordPress 2.5.1:
Nathan Oliphants Bookmarks Displayer Widget (rename to .PHP after downloading)

Next Article

MyBB Registration eMail Check

  1. Hi Matt,
    I wanted to try out your fixed version of the Bookmarks Displayer Widget since I’ve been too lazy/busy to fix it myself. Unfortunately, the link you provide (http://www.digitalbreed.com/wp-content/uploads/2008/05/bookmarks_displayer_widget.php) does not permit me to download the widget, but instead displays a php error page. Do you happen to have it saved as a .tar or .zip somewhere?

  2. Nathan, right-click on the link, then select “Save target as…”. Feel free to merge my trivial changes into your version, no credit required.

  3. I switched from Firefox to IE and tried right-click->Save target as… and got the same results. Instead of php, the resulting file consists of the following:

    Fatal error: Call to undefined function: add_action() in /www/htdocs/dbreed/wp-content/uploads/2008/05/bookmarks_displayer_widget.php on line 160

    It looks like your server is executing the php and returning the error message rather than just sending the file itself to the browser. If you add a .txt extension to the file, or tar/zip it, it should then be downloadable.

  4. Oops, I never actually looked in the downloaded file. Sorry, fixed.

  5. Matt,
    Thank you very much. That indeed fixed some rather annoying bugs. I had to remove “‘echo’ => false” from the array in function wp_bookmarks_order to get the bookmarks to display in the version of WordPress I am running (2.5.1), but other than that, this is a vast imprevement over what I had.

    I’ll have to try the Click Counter plugin at some point and see what that is like. I’ve added links to your site in the source code where you made changes and will post an updated version of the plugin on my site as well. Once again, thank you.