So I’ve been using the Now Reading plugin for a while, but there was one feature I wanted: an “on hold” status so that if I am in the middle of reading a book but stop for a while, I don’t have to mark it as “Currently Reading” or as “Yet to Read” (the two non-complete statuses). So, I added the “On Hold” feature yesterday. It was pretty simple (modify two files and run one SQL query). Here’s the file changes:
in now-reading.php around line 36:
-
‘unread’ => __(‘Yet to read’, NRTD),
-
‘onhold’ => __(‘On Hold’, NRTD),
-
+ ‘reading’ => __(‘Currently reading’, NRTD),
-
‘read’ => __(‘Finished’, NRTD)
-
);
and line 340:
-
case ‘unread’:
-
case ‘reading’:
-
case ‘read’:
-
+ case ‘onhold’:
-
break;
-
default:
-
$status = ‘all’;
Then, in template-functions.php, around line 130:
-
function book_status ( $echo = true, $unread = ”, $reading = ”, $read = ” ) {
-
+ /*
-
if ( empty($unread) )
-
$unread = $nr_statuses['unread'];
-
if ( empty($readin) )
-
$reading = $nr_statuses['reading'];
-
if ( empty($read) )
-
$read = $nr_statuses['read'];
-
switch ( $book->status ) {
-
case ‘unread’:
-
$text = $unread;
-
break;
-
case ‘reading’:
-
$text = $reading;
-
break;
-
case ‘read’:
-
$text = $read;
-
break;
-
default:
-
return;
-
@ } */
-
if ( $echo )
Finally, run this query through your favorite MySQL interface (phpMyAdmin):
-
ALTER TABLE `wp_now_reading` CHANGE `b_status` `b_status` VARCHAR( 8 ) NOT NULL DEFAULT ‘read’;
And presto, an “on hold” status that removes the book from the library’s public lists, while keeping it in the manage books section.




Lovely stuff! I made a couple of modifications (like still allowing the overriding of message text in `book_status()`, but it’s now in SVN and will be in the next release of Now Reading.
Thanks!
Sweet. I’m also finishing up a K2-compatible set of templates . I’ve also made the NR widget into a Sidebar Module (for easier use in K2). I’ll post those soon as well.