Since we are dealing with Men it is inevitable that we should be concerned with the most regrettable feature of their nature: their quick satiety with good

This page has been moved to a more permanent spot. Please go there.

§3432 · December 15, 2008 · Tags: , ·

61 Comments to “Now Reading for WordPress 2.7”

  1. Brian says:

    makin’ progress… :) Thanks for your help!

    I just did a search for a book by title (too lazy to go find the book to get the ISBN lol) and got this error:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home2/lookfou1/public_html/blog.thelifeofbrian.info/wp-content/plugins/now-reading/xml/IsterXmlNode.php(286) : eval()’d code on line 1

    I was searching for "Brisingr" if that matters…

  2. Brian says:

    also – I had to make the changes you mentioned in the post above (re: library.php) in single.php as well. :)

  3. Rick says:

    Brian the memory issue sounds like a php.ini setting, you would need to increase PHP memory_limit. With that being said this script shouldn’t use that amount of mem, Ben will need to check for an infinite loop or similar issue in the code.

  4. Melodie says:

    Nice work, it really cleans up the display! I’m also running Rob’s pages addon (automatically pulls page count from Amazon). When I enable it with helio5 it returns this error when searching for a new book:
    "Fatal error: Call to undefined function: getelementbypath() in /path/to/home/directory/wp-content/plugins/now-reading-pages.php on line 12"
    The line in question is this:
    $pages = $item->getElementByPath(‘ItemAttributes/NumberOfPages’);

    Any ideas? Everything else works fine when I deactive the pages addon.

  5. [...] fear! Heliologue from the A Modest Construct blog has updated the plugin to work for WP2.7, and work it does! Tags: 2.7, now reading, [...]

  6. kate says:

    Hi, I just found the original Now Reading plugin and have spent days getting it to work on my site. I’m still not completely there and done with all the editing and was having trouble with the tags–trying to rename them so they all start with a capital letter–but they won’t rename. When save changes, the page reloads with either no tags, or the tags that were there before. I thought it had something to do with the fact that there were other books with the same tag, only slightly varied by different capitalization, so I was trying to just delete all the tags and start over, but it wouldn’t let me delete them…. anyway!

    So a google for others with this problem brought me here. I have no idea what NR looked like in previous versions of WP so I don’t know how it will be cleaned up. I’m worried about downloading and messing with all my customizations, though if you say I just need to not upload the templates folder again, I might give it a go. Do you think your version might take care of my tag issue? Any idea what could be causing it?

    I did upgrade to PHP 5 for this (which fixed the problem of not being able to search Amazon). And I was having the same issue as above with not being able to edit, until I switched to Single view. Now this tag issue is the only thing getting me down.

    I think I might go ahead and try your version. I’d like to see how it’s cleaner, anyway. I’ll let you know what I come up with. Thanks for taking on this project!

  7. Ben says:

    Kate,

    The guts of Now Reading haven’t really changed, so it’s unlikely that my modified version will fix any functionality issues you may have. It’s almost entirely a front-end change.

  8. [...] a 2.7 compatible version of Rob Miller’s Now Reading WordPress plugin. Had to do some minor adjustments to the [...]

  9. ellie says:

    This is excellent, just what I was looking for. I did try the one in SVN but it had some probs.

    I’m just about to download this and install but can anyone please tell me how to get Now Reading to count pages? I would really like to get that working but what I had used to be posted on Rob’s forum which is no more and now I don’t really know what to do to get it to count pages.

    And actually if anyone could also tell me how to get it to display what Rob has on his blog where it shows this:

    15 books and 4,151 pages read so far.

    That’s 29% of the way there with 100% of the year gone, 37 books behind schedule.

    in the sidebar?

    And if I could just ask one more question, does anyone know if there will be changes to how the NR for multiple users will work in the future as for now books can be entered multiple times without a check saying it is already entered. So my problem is that I wanted to create a list displaying how many members have read the same book but it’s impossible in the current setup.

    Sorry for all the questions but with Rob’s forum gone there’s nowhere to ask.

    Thanks

  10. Ben says:

    Elle,

    The display Rob has in his sidebar is a different plugin that only Rob has, and isn’t part of the canonical NR plugin.

    The other features you request aren’t currently part of the plugin’s functionality, and I can’t quote you development timelines.

  11. ellie says:

    thanks for your reply Ben.

    Do you know how to get the page count from amazon to work as I would especially like that. I can post the code that I have if you can maybe make some sense of it. I’m not a coder but I’m really good a copy/pasting :)

  12. kate says:

    Okay, so here’s another problem I’m having…maybe just since uploading this version, but it could just be searching for different books. Some books still work, but some, when I search amazon, it will pull up a few of the raw xml data, and not any of the actual results with pictures and everything, and then give this error:

    Fatal error: Call to a member function CDATA() on a non-object in /home/thethi6/public_html/simplymother.com/wp-content/plugins/now-reading/amazon.php on line 147

    And sometimes it won’t do anything at all: after typing in an author name and clicking enter, the page just reloads.

    But I can still search for some books, so . . . weird? The books that don’t work do exist on Amazon. It even appears to be pulling some of the information over, in the raw XML form.

  13. kate says:

    Well… I messed around with that line 147 … tried to change it back to what the original version said (just copying and pasting, I have no idea what any of it means). Well, it didn’t work, so I just undid everything and went back to what your version says. And now? It’s working fine. I can’t duplicate the problem I was having. All the books that weren’t working before? I’ve added, no problem. Computers are sooo weird.

  14. Ben says:

    Kate,

    I’ve had that intermittent problem with book searches long before WordPress 2.7. I long ago just went straight to Amazon and copied the ISBN.

    So, long story short, your problem is with the core of NR and beyond my current purview.

  15. dave says:

    Kate, try these modification (make a backup first) and let us know if it works. I was able to get the author/title query to work correctly using this fix. PS I add my thanks to the original author for porting!

    On line 31 of amazon.php

    } else {
    	$query=''; // this is the line that is different
    	if ( !empty($title) )
    		$query = 'title:' . urlencode($title);
    	if ( !empty($author) )
    		$query .= 'author:' . urlencode($author);
    }

    On line 147 of amazon.php

    $size = "{$options['imageSize']}Image";
    	if (empty($item->$size)) // this is the line that is different
    		continue; 
    $image = $item->$size->URL->CDATA();

    On line 67 of admin-add.php

    if (  !empty($_POST['u_isbn']) || !empty($_POST['u_author']) || !empty($_POST['u_title']) ) {
  16. I recently installed (thanks for working on this!) and ran into one problem: the plugin has a bunch of require statements that have filenames in mixed case, but the archive that I downloaded (Version 4.4.4-helio5) had the files in lowercase. I renamed the files and things seem OK, but thought you’d like the feedback.

    Cheers.

  17. Ben says:

    Dave,

    Much obliged! I’ve incorporated your changes into my port and released the code as 4.4.4-helio6.

  18. Ben says:

    Johnathan,

    I’m not exactly sure to what you’re referring. Can you give me file+line for the mixed-case requires you see?

  19. I didn’t keep track of all of them, but the first one to cause trouble was line 102 in amazon.php.