A Modest Construct

Now Reading Reloaded

This plugin is now part of the official Wordpress plugins repository. Due to a conflict with an existing plugin, however, its name is now “Now Reading Reloaded.” It is recommended that you disable the existing “Now Reading for Wordpress 2.7+” plugin and enable this one; your books and such will not be affected.

Like many of you, I’m a fan of Rob Miller’s Now Reading plugin. But Rob’s been busy lately, and the plugin, while functional, doesn’t look too great on Wordpress 2.7.

In an entirely selfish effort, I cleaned up some of the code (using the latest 4.4.4-beta code from SVN) to use some of Wordpress 2.7’s built in styles.

Caveats

Before you download it, let me make some things perfectly clear:

  • I have limited testing capabilities; I don’t have access to PHP4, so support for it is limited to whatever happens to work.
  • Translations are no longer up to date, and will be even less so in the future. Contributions are (eventually) welcome.
  • You must have Wordpress 2.7 or higher. Older versions are not supported.
  • Due to a change in Amazon’s API, you must now sign up for an access key in order to use this plugin.

General support questions should be posted to this plugin’s support forum. Patches are welcome via my contact form.

If you still want this, have a go at it.

Roadmap/ToDo

  • Allow other data sources besides Amazon (?)
  • Allow caching/saving of book images (planned for 6.0)
  • Allow configurable book status (planned for 6.0)
  • Tie more closely to Wordpress API (planned for 6.0)
  • Expanded DB schema (planned for 6.0)
  • Shortcodes (planned for 6.0)
  • Reworked templating system (tentatively planned for 6.0)
  • Improve the UI

155 ResponsesLeave one →

  1. Has anyone attempted to implement paging in the library? I’m starting to add more books, and it doesn’t make sense to show all books on the library.php page. I’d like to implement paging, but am more than a bit worried about it. :-)

    Anyone done this yet?

  2. I have yet another question. I’m not sure if it’s possible but I was wondering if there was a way of displaying a tag list for the Now Reading Library so someone could basically browse the subjects and find books in that subject.

  3. hi there.
    still using the old version of the plugin and am happy with it, but I have some “styling problems”.
    please have a look at my customization here: http://pacura.ru/library/ also check tag pages, author pages and single entries.
    My problem is I can’t find a way to format the permalink for the h2 title i.e. in the author pages, check the output: http://pacura.ru/library/karen-miller/ notice the link: Recently read books by and then the author name is missing there :-( here is the code that generated that page: http://pastebin.com/f253febfc

    see? I tried including $nr_author but it seems somethign is wrong because <a href="http://pacura.ru/library/<?php book_author_permalink(); ?>/" doesn’t work.

  4. Strangely, since I upgraded to 4.4.5 Now Reading has stopped working again. I get the 404 error whenever I try to add or edit a book. Searching works fine, though. I also attempted to turn off mod_security, but unfortunately this did not solve my problem. Any fixes?

  5. I posted a rather legthy comment here, last night, seems to have been caught as spam, would you mind checking? otherwise I’ll have to rewrite it all ;-(

  6. thx Ben, doesn’t work. why would it? I doubt there is a function the_book_author, I copied the functions book_author_permalink and book_author from the original templates. I am sure I am just using it outside the loop but I know too little about code to fix this :-(

    I’d really want to display that information on the page like I am trying to...

    • It works in my template, and I didn’t add or remove any functions.... here’s my author template:

      <?php get_header() ?>
       
      <div class="content">
       
      	<div id="content" class="now-reading primary narrowcolumn">
       
      	<div class="post">
       
      		<?php if( can_now_reading_admin() ) : ?>
       
      			<p>Admin: &raquo; <a href="<?php manage_library_url() ? rel="nofollow">">Manage Books</a></p>
       
      		<?php endif; ?>
       
      		<?php library_search_form() ?>
       
      		<p><a href="<?php library_url() ? rel="nofollow">">&larr; Back to library</a></p>
       
      		<h2>Books by <?php the_book_author() ?></h2>
       
      		<?php if( have_books("author={$GLOBALS['nr_author']}&num=-1") ) : ?>
       
      			<ul>
       
      			<?php while( have_books("author={$GLOBALS['nr_author']}&num=-1") ) : the_book(); ?>
       
      				<li>
      					<p><a href="<?php book_permalink() ? rel="nofollow">"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a></p>
      					<p><?php book_title() ?></p>
      				</li>
       
      			<?php endwhile; ?>
       
      			</ul>
       
      		<?php else : ?>
       
      			<p>There are no books by this author!</p>
       
      		<?php endif; ?>
       
      		<?php do_action('nr_footer'); ?>
       
      	</div>
       
      	</div>
       
      </div>
       
      <?php get_sidebar() ?>
       
      <?php get_footer() ?>
  7. hmmm... you are right, but that is just the way, most themes construct pages/posts...
    I guess I’ll have to do without it then, but nevertheless, the function is built-in I am just too stupid to use it :-(

  8. there is still stuff wrong with that page. the H2 tag is missing, the page is based upon this template file: http://pastebin.com/f75d63722 se where it should generate the H2 tag?

    • You mean the <h2><?php book_title() ?></h2> should result in <h2>Graceling</h2>? It does....

      • not there :-( have a look at the source code of the page: its meant to be there where there is only an empty H2 tag, further up in the page :-(

        • Ah, I see now. The information you’re trying to put inside the <h2> has to be inside the loop. So:

           
          <?php if( have_books(intval($nr_id)) ) : ?>
          			<?php while ( have_books(intval(nr_id)) ) : the_book(); ?>
          				<h2 class="post-title entry-title"><a href="<?php book_permalink(); ? rel="nofollow">" title="<?php book_title(); ?>" rel="bookmark"><?php book_title(); ?></a></h2>
           
          				<div class="entry-content entry">
           
          					// other stuff
           
          				</div>
           
          			<?php endwhile; ?>
           
          <?php else : ?>
           
          	<p>That book doesn't exist!</p>
           
          <?php endif; ?>
          • thanks :-) that more or less solved everything. now I’ll just have to find the time needed to fiddle with these tempaltes and perfect them :-)

  9. Hi,
    thanks for the work you put into it. I downloaded your version of “Now Reading” and it works fine.
    Well but I have the same problem like some others who wrote here. The sidebar is moved when single.php or library.php is loaded. I already moved the get_sidebar after the last

    • Lutz,

      The stock template doesn’t jive with your theme. Compare the single.php and library.php pages to your stock page.php template and make sure the <div> tags match up.

      • Thanks for pushing me into the right direction. I already compared page.php and single.php but it didn’t worked untill now. Now it’s looking nice.
        Thanks again. :-)

  10. I’m having the same problem as Christy — Error Adding Book.

    The search seems to go fine. Enabled the error log and this is what I got.

    raw XML:string(8) “raw XML:“
    string(21300) ”

    115aed2c-b3dd-4183-b41a-ca099c8cb04d

    Then when I click on the Use This Result I get the error — Error Adding Book! and the search screen again.

  11. one more issue I just discovered: my library page: http://pacura.ru/library/ shows 70 book,s but if I go manage books, I see its actually 77 books. I already checked, all 77 are marked as read.
    here is the code that generates the numbers on the library page:

    overall; read in the last year; read in the last month;

    Last read books():

    there is nothing wrong with that code :-(

  12. On my library page: http://blog.thelifeofbrian.info/library/

    The right sidebar is not being displayed in the correct position.

    I’ve found this problem and with your help (I thought?) corrected it before, but can’t find where it was discussed. I remember it was a simple one line fix which I had to apply to several template files... I honestly don’t remember the last time I updated the plugin, but I’m guessing I must have done so and the change was overwritten.

    Can you help? :)

    • heh, one other question — I see in the template file that each book on that page is surrounded by li (list) tags, but it’s not showing up as a list on my page. Any idea why?

      Thanks for your help!!

      • Well, for starters, your theme already has a <div id="content">, but the template is producing an extra one (<div class="now-reading primary narrowcolumn" id="content"</div>); that might have something to do with it.

        w.r.t. lists, your template is generating the unordered lists just fine. This because your theme has

        * { margin: 0px; padding: 0px; list-style:none; text-decoration:none; }

        which eliminates the usual list style.

        • ok... Can you tell me what I would need to do to fix it then? I tried changing the div id=“content” to “nr_content” with no change.

          • Comparing the library markup to your colophon, my guess is this:

            Your library template currently has a structure like so:

            <div id="content">
                 <div class="nr_content_class">
                      <div id="nr_content_div" class="now-reading primary narrowcolumn">
                           <!--stuff goes here-->
                      </div>
                 </div>
            </div>

            Make it look like this (add id=left and class=entry):

            <div id="content">
                 <div id="left" class="nr_content_class">
                      <div id="nr_content_div" class="entry now-reading primary narrowcolumn">
                           <!--stuff goes here-->
                      </div>
                 </div>
            </div>
  13. any idea about SEO? I mean I have the all in one seo pack plugin active, and all book/author/library pages, are treated as if its the homepage, so I cna’t use custom meta tags :-( only if I modify the templates, so the header isn’t dynamically generated I can manually include meta tags, but then AIO overrides my metas with its own ones :-(

    anyone with some info on SEO this now reading plugin?

  14. Wow, I just realized version 4.4.6.1 is available — I’ve got 4.4.5 installed. How can I be automatically notified when there are newer versions?

    • What’s the recommended upgrade path? Disable the current version and just copy the files up? Or delete the previous plugin and install fresh?

      • No worries about the ugprade. I just backed up the previous files by renaming the 4.4.5 directory, then uploaded the new one. Of course I had to re-tweak the library.php, and I’m sure there will be other tweaks I’ll find I’ve lost, but at least I have the previous files to look at.

        Any plans for:
        1) automatic notification of updates
        2) a way to modify templates, etc. in such a way that the modifications are not lost with an update?

        • well, the instructions sa to copy all template files you modify into a folder: now-reading inside your active theme to keep them :-)

        • Brian,

          As ovidiu said, you can make a folder inside your current theme called now-reading, and the plugin will prefer the templates in there to its own.

          As for updating, please see this recent post regarding the plugin’s future.

  15. I have installed the latest version (4.4.6.1) on my test/dev site running WP 2.8.1 beta 2 and K2 1.0 rc7 (build 798). The plugin installs fine and appears on the admin page. However, when I try to enter a couple of ISBN numbers I get the message that Amazon.com/.co.uk/.de cannot find the book with that ISBN number.
    Then, when I try to view some of the other pages — Now-Reading, Add A Book, Manage Books, Options — I get the following error: “You do not have sufficient permissions to access this page.” I have checked the ownership and permissions of the plugin folder — www-data and 777 — so I should definitely be able to access the page.
    Has anyone else had this problem? Has anyone got a solution?
    Thanks in anticipation
    Ross

    • I noticed this same problem when I was testing with 2.8.1 betas; I’m waiting to see if the problem is solved in 2.8.1 final.

  16. I have a few queries about this plugin (using 4.4.5 at the moment while I wait for 4.4.6.1 to work with WP 2.8.1):

    First, on the plugin admin page there are four options under the Now-Reading heading — Now-Reading, Add a Book, Manage Books, Options. What is the difference between the Now-Reading and Add a Book admin pages? Is it necessary to have two identical pages?

    Second, how can I add another status option to my options? I’d like to add a “did not finish” option to the yet to read, currently reading, on hold and read options.

    Third, there are more books on my library page than there are in the admin panel Manage Books page. And the extra books that are on the library page are the ones missing cover images. Would that be as a result of upgrading NR? How can I update the entry to include the cover image?

    Thanks for your time...

    • 1. Does 4.4.5 work with 2.8.1? There shouldn’t be any changes between 4.5 and 4.6.x that broke the permissions...

      2. Right now, the book status is not extensible. In the short term, you’d need to hack at the plugin.

      3. To add a cover image, edit the book: there’s a field for a path to an image.

  17. Ben,

    I have a request. Would it be possible to put the currently reading, yet to read and onhold books at the top of the books database? It would be great not have to page thru all the read books to get to the onhold books.

    Thanks
    Diane

  18. Well this morning is the first time I’ve tried to add a new book since upgrading to the latest version of Now Reading (4.4.6.1).

    When I search by ISBN here are the results I get:

    Sorry, but amazon.com did not return any results for the ISBN number 0061015733.

    Sorry, but amazon.com did not return any results for the ISBN number 9780061015731.

    And when I search by title I get this:
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home2/lookfou1/public_html/blog.thelifeofbrian.info/wp-content/plugins/now-reading/xml/IsterXmlNode.php on line 234

    If you go to Amazon.com and search for either of those ISBNs you’ll see they are valid...

    Any ideas what the problem is and how to fix it? :)

    • if you are on your own server edit php.ini and increase max memory size from 33554432 to i.e. 67108864 otherwise ask your hosting company to do that for you.

      • A couple reactions:

        1) why would I need to change anything in my setup? I’ve had Now Reading installed for quite some time and it was working fine before the upgrade.
        2) which php.ini? It looks like there’s one in nearly every directory. I tried changing this line:
        memory_limit = 32M
        inside the php.ini at my blog level (/public_html/blog.thelifeofbrian.info) to 64M, but it had no effect.

        Thanks for your help

    • I’m not sure what’s causing these errors, but I’m getting the “no results” error as well. Possibly something wrong with Amazon?

      When I have the time, I’ll try to go back and test against previous versions of the plugin to see if I broke anything.

  1. Into the Stacks
  2. Connie’s Ramblings » Blog Archive » Now Reading Plugin
  3. muehlenweg.net » Now-Reading
  4. iRants.com » Modifying Now Reading
  5. Now Reading – Pagination = Aggravation « that renee
  6. Procrastination » Movable Type 3.34 to WordPress 2.8.4
  7. Geld verdienen mit dem Now Reading Reloaded Plugin | Geld verdienen im World-Wide-Web
  8. Multiple Authors for Now Reading Reloaded for Wordpress | Power of Suggestion
  9. You have to love opensource | Big Bad Bern's Blog