Sjeiti

Librarything widget

Sjeiti @ 28/01/2007 13:11 in none

Librarything lets you search libraries and Amazon to catalog your books, and see what people with similar collections read.

Although it does’t have an API to control or interact with your collection, it does allow you to add a widget to your webpage containing your latest entries or a random collection. The downside of this widget is that their server is sometimes slow and the widget (an url returning a javascript snippet document writing html) does not return xhtml.

This Worpress plugin solves that. It caches the returned javascript, which contains the references to the last 200 books from your collection, and interprets the data. You can choose the number of books to display in your sidebar. If you update your Librarything collection you’ll also have to update the cached data through the widgets options.

An additional feature is that where the original plugin linked to Amazon (a sponsor thing), these links all go to Librarything. I have nothing against Amazon but I just want to plug Librarything (besides the Librarything website contains enough links to Amazon).

You can see the plugin in action to the right here. Have fun with it, and don’t forget to leave a note to tell me what you think (there’s always room for improvement).

download

version size date download
1.0.1 4KB 2007 01 31 download

installation

Unzip and place the folder in your plugins directory.

This plugin is a widget for the ‘Sidebar Widgets‘ plugin. So install that first before trying to get this to work!

Also don’t forget to download the cronfaker plugin for automatic regular download of the Librarything data (the Librarything plugin works fine without it, it’s just to make your life a little easier).

changelog

version date changes
1.0.2 2007 02 12
  • cache by fake cron
  • interpret data before caching
1.0.1 2007 02 12
  • added header parameter

todos

  • cache by fake cron
  • interpret data before caching (in case of errors)

comments

15 comments
  1. Suzanne’s blog » Blog Archive » widgets decided: 31/01/2007 01:52

    [...] So now I’ve gone widget crazy! In some ways I like it better – it is much easier to upload all of the books I am reading but without the titles and with the small little images, I don’t like it as well as my handmade sidebar. (Oh no misspellings found. How delightful. It now checks my spelling!) Anyway, I miss the recent tracks of lastfm (which was available before I installed widgets) and am still trying to get that to work. Now it just shows the album covers from my favorites. I can’t configure my flickr photos as well (it just grabs a handful of them at random rather than from sets) and there is the ever present problem of old widgets that do not work in Ella wordpress 2.1. Other than that? Fine? Oh, and no more random popular del.icio.us, I liked that. So I’m working on it folks. It should get better. [...]

  2. Suzanne’s blog » Blog Archive » cleaning up: 04/02/2007 06:04

    [...] cleaning up Well I just updated by Sjeiti Library thing in the sidebar (thanks!)  And then I discovered that WP-Amazon has a notify groupfrom visiting this site. So I’ll be updated on all the progress that happens while manalang gets his Ajax together.  Yay for plugins!  Other than that I have scoured my computer and worked on getting it in really good shape now.  No not outside the computer- inside doh although I should also dust it and buy some of that pressurized air etc. too.  I have Ad-aware, CCleaner, AVG Anti-Malware, Trojan Hunter plus I’m running updated Norton and Firewall. Do you think I’m safe? Probably not. But I’m safer than I was.  And it is running like a dream.  So that’s good. [...]

  3. Chris Gray: 08/03/2007 06:39

    Thanks for the great plugin – you might want to warn people that it’ll not function without the cronfaker plugin (unlike what you say above). Unless I was doing something wrong it crashed on line 53 without cronfaker, yet worked perfectly once I installed it.

    Again, nice work. ;)

  4. Sjeiti: 09/03/2007 23:18

    Hmmm that’s strange, line 53 says:
    if (function_exists(‘register_cronfaker’)) etc…
    If the function exists it will execute it, if it doesn’t nothing happens. That doesn’t give me any problems here. I’ll try recreate the error on some other webservers.

  5. Heather: 20/03/2007 04:56

    I keep getting this error when I try to work with you widget. http://www.fascistpanties.com/ScreenShot001.jpg

    It seemed to work perfectly well when I first installed it but it never loaded. My attempt to look at the plugin afterwards give me the error you see in the screenshot above. Is there any advice you can give me? :)

    Thank you!

    Heather

  6. Sjeiti: 21/03/2007 08:50

    Heather, this is a security thing in php. If you’re on a local server you can switch it on in the php.ini file (look for allow_url_fopen). Otherwise there’s not really much you can do. Oh you can ask your hosting provider to turn it on, but I doubt they will. I’ll try to find some other ways to do the same thing, but I can’t promise anything.

  7. Rich Lafferty: 13/04/2007 16:42

    For what it’s worth, url_fopen is usually off on shared hosting, because of the possibility of insertion attacks where attackers trick poorly-written software into opening a URL when the code intends to open a local file.

    The usual workaround is to use the curl library instead — since it’s *only* for URL access, it avoids the problem of remote loading when local was expected and is thus typically enabled.

  8. Sjeiti: 15/04/2007 21:23

    Oh damned… it looks like the people at Librarything changed their js widget in a way that broke this plugin. That’s what you get when you have no api to your service :-p. I just checked and it’s nothing I can’t fix. Just have to find some time to find some smarter way to extract the content from the js (and have a look at curl while I’m at it).

  9. WP Plugins DB » Plugin Details » Sjeiti librarything widget: 28/06/2007 07:44

    [...] Visit [...]

  10. Sjeiti: 14/08/2007 21:19

    Oh wow, it seems to have fixed itself. That’s rare. Still, I should have a look at it one of these days.

  11. aricow33: 29/09/2007 10:29

    tried to download your widget. it seems to be down.

  12. aircow33: 29/09/2007 10:52

    hey I can’t seem to be able to download it off your website. it seems to be down.

  13. Sjeiti: 03/11/2007 12:00

    Yeah… eddies in the server I think… it’s up again

  14. Sjeiti Librarything | SURPI: 04/12/2007 19:24

    [...] Plugin Page Author: surpi Time: Tuesday, December 4th, 2007 at 6:21 pm Category: WordPress Plugin Comments: You can leave a response, or trackback from your own site. RSS: You can follow any responses to this entry through the RSS 2.0 feed. Navigation: « Sidepic Widget Spicy Page » [...]

  15. home < memory banks: 16/11/2008 15:24

    [...] and Ron Valstar’s LibraryThing Widget. Go books. Post a comment | Trackback [...]

Leave a comment: