{"id":311,"date":"2009-05-15T13:02:12","date_gmt":"2009-05-15T17:02:12","guid":{"rendered":"http:\/\/burianek.com\/blog\/archives\/311"},"modified":"2009-05-15T13:17:55","modified_gmt":"2009-05-15T17:17:55","slug":"now-reading-plugin","status":"publish","type":"post","link":"https:\/\/burianek.com\/blog\/now-reading-plugin\/","title":{"rendered":"Now Reading Plugin"},"content":{"rendered":"\n<p>I&#8217;ve been using the <a href=\"http:\/\/robm.me.uk\/projects\/plugins\/wordpress\/now-reading\/\" target=\"_blank\">Now Reading Plugin<\/a> by Rob Miller as a means of keeping track of the books I read. I encountered&#160;a problem a couple months ago in that it was no longer able to retrieve books from Amazon and so I had to enter them manually.<\/p>\n<p>Yesterday I came across <a href=\"http:\/\/heliologue.com\/\" target=\"_blank\" >A Modest Construct<\/a> which has a post on <a href=\"http:\/\/heliologue.com\/projects\/now-reading-for-wordpress-27\/\" target=\"_blank\" >Now Reading for WordPress 2.7+<\/a> this version actually works! I like how Helio has made adding a book manually always available. Something of note however is that when you add a book manually, you don&#8217;t have the option to include or later edit an ASIN.<\/p>\n<p>I started looking around the code and found where  to make a few simple additions to allow the editing of the ASIN of a book.<\/p>\n<p>In the file admin-manage.php, after line 126 add:<\/p>\n<p>\t\t        <code> &lt;tr class=&quot;form-field&quot;&gt;<br \/>\n&lt;th valign=&quot;top&quot; scope=&quot;row&quot;&gt;<br \/>\n&lt;label for=&quot;asin-0&quot;&gt;' . __(&quot;ASIN&quot;, NRTD) . '&lt;\/label&gt;<br \/>\n&lt;\/th&gt;<br \/>\n&lt;td&gt;<br \/>\n&lt;input type=&quot;text&quot; class=&quot;main&quot; id=&quot;asin-0&quot; name=&quot;asin[]&quot; value=&quot;' . $existing-&gt;asin . '&quot; \/&gt;<br \/>\n&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<\/code><\/p>\n<p>Then in the edit.php file, after line 49 add:<\/p>\n<p>\t\t        <code> $asin\t\t\t= $wpdb-&gt;escape($_POST['asin'][$i]);<\/code><\/p>\n<p>and after line 104 add:<\/p>\n<p>\t\t        <code> b_asin = '$asin',<\/code><\/p>\n<p>And now the ASIN number is editable when you edit the book&#8230; having an ASIN number for a book allows the plugin to create the links to amazon. It annoyed me that half my books had links and the other half did not.<\/p>\n<p>Now that I have managed to get the plugin actually working, I might look at actually styling the individual book pages&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using the Now Reading Plugin by Rob Miller as a means of keeping track of the books I read. I encountered&#160;a problem a couple months ago in that it was no longer able to retrieve books from Amazon and so I had to enter them manually. Yesterday I came across A Modest Construct [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/posts\/311"}],"collection":[{"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":0,"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burianek.com\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}