New Blog Feature – Now Reading….

July 15, 2006

I’d decided to install Rob Miller’s “Now Reading…” version 4.0 plugin ages ago to replace my Read in 2005 and 2006 categories. But I knew there was a new version of my current theme out. So, it didn’t make sense for me to manually add the required template changes especially when the new version of Binary Blue supported Widgets and writing a Now Reading Widget woud be simpler than updating the template all the time. Skip a few months and now Rob himself has investigated widgets and made his own available for Now Reading. So I rushed over to his site, grabbed it and installed it right away! S0000 SWEEET!

Unfortunately, my excitement got the better of me. I failed to notice that the download page for Now Reading had, not only the widget available, but also an updated version of the plug in. The current version of Now Reading was 4.2 and installing the plug in with 4.0 caused the side bar to blow up with a missing function error. I realized my probably mistake right away, uninstalled it all and reinstalled in the correct order with the latest.

Unfortunately, my woes did not end there. I found three problems with 4.2 that could be fixed with relative ease. The first problem was a ” *Fatal error*: Cannot redeclare now_reading_add()” Error. That was very easy to find. I had one link that didn’t work and one link for the same page that did work. A quick change to make now-reading-admin.php always use the “post.php?page=now-reading-add.php” syntax instead of “post.php?page=now-reading/now-reading-add.php” and the problem was solved.

The next problem was a “1 book *Warning*: Cannot modify header information -” error message that came up each time I edited a book. That looked just like a debug comment, and indeed Rob confirmed that this one was fixed in his own code already but didn’t say how. I didn’t have access to check out the latest code yesterday, so I fixed it myself. The total_books routine takes a parameter to termine whether or not to print to the screen. In one place, the parameter was needed but not specified. So I changed
if ( $count > total_books(0) )
to:
if ( $count > total_books(0, false) )

and that problem was solved.

I sent those two changes and a recommendation that the widget check for the correct version of the plugin to him and he replied with a thanks, he’d put in the changed the code as I’d suggested (b4 or after I don’t know) and notice that 4.21 was released! Cool, that means no one else should get these errors.

Unfortunately, I noticed two minor things after that point. First, one book I entered had an apostrophe in the title. Unfortunately, the plugin now put a slash in front of the appostrophe. I SUSPECT that this is a WP 2.03 issue and I have not reported it to Rob. I’ll install 2.04alpha/beta/whatever soon and see if the problem goes away.

The next minor issue was reported to Rob with the fix. After I put in the 12 books I read this year, the plugin was reporting that I had an average of 144 books a month. I admit that my 2 books* a month average this year is pathetic compared to last year’s 3.6 (I read nothing in March this year oddly enough – I guess that’s when I started the blog and nothing struck me as interesting enough to take my time away from that. And I’ve also been reading a lot from Orson Scott Card’s Intergalactic Medicine Show), but I’m not going to bolster it to 144 books a month…

So, I dug into the average query and found the problem…

I shot another email to Rob just before two this morning:

>I’ll add a version check to the widget now, good idea.
Thanks!

Oh and I have one more update if you haven’t fixed this one already too..

Your average books calculation was off. You’re missing a MIN statement around the b_added.

So it should look like this:
SELECT
( COUNT(*) / ( TO_DAYS(CURDATE()) – TO_DAYS( MIN(b_added) ) ) ) AS books_per_day
FROM
{$wpdb->prefix}now_reading
WHERE
b_status = ‘read’

Nice plugin… Now I’m just trying to remember all of the books I’ve read so far this year… I just remembered another… So that’s 12…

That change is in template-functions.php around line 145. I think I’ll keep my current version installed till the fix is out.

So, now you can look at my sidebar now and see all of the books I am reading and have read this year. And if you like the idea of any of the books I’ve read, you can purchase it through the links and I’ll get a peice of the action. (Actually for now Rob will. I’ve not put in my own Amazon ID yet.) I don’t think I’ll put in last year’s 44+ books for a while yet. Each book deserves a comment but that’s 44 more blog entries I need to write. So, I’ll piece meal them in. If you like what you see, please visit Rob’s site and download the latest and greatest versions of now reading. Just click this link: http://robm.me.uk/projects/plugins/wordpress/now-reading/

BTW, I put together the promised context menu post I mentioned the other day, but was debugging something and decided to backup the file and wipe out most of the file so that I could Isolate what I was debugging. Unfortuately, I forgot I’d also already changed the name of the working file. *smacks head* So, I lost some of my change and all of my extended commenting. I just need to re-review the comments ( the second time you put in comments they are never as good as the first time you put them in ) and I’ll publish the post. Probably tomorrow. I’ve got a lawn to mow and a carpet or two to shampoo… Cheers!

* One of the people in our shipping department had a discussion with the UPS guy saying both stated that they’d each only ever read 1 book cover to cover. How sad (not not meaning pitiful but saddening) is that…

Share and Enjoy:
  • del.icio.us
  • Fark
  • Reddit
  • Digg
  • DZone
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Netvibes
  • Ping.fm
  • Posterous
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Tumblr
  • Yahoo! Bookmarks
  • Add to favorites
  • Blogosphere News
  • HackerNews
  • Identi.ca
  • LinkedIn
  • MySpace
  • Print
  • Yahoo! Buzz

Comments

2 Responses to “New Blog Feature – Now Reading….”

  1. rob on July 16th, 2006 8:08 pm

    The other fixes are in SVN, btw.

  2. Brian on July 17th, 2006 8:53 am

    Great!

    What did I tell ya… Good support!

Got something to say?





Who is Brian Layman

I am a WordPress expert living in North East Ohio. I am part of the ever expanding Open Source Internet workforce. I am able to stay at home, with my wife and four home schooled kids, while working as the Senior Developer for b5media - a blogging network that has hosted over 300+

I co-host the NEO WordPress Monthly meetup. I am the board chair of our local church. I host and have provided development services for clients such TV personalities Rhett and Link as well as corporations such as Borland International.

In my spare time I try to sneak out, canoe, mountain bike and camp as often as I can. Sometimes I also defend the earth against zombies and aliens, but usually not during the camping trips.

Services Provided

In providing hosting, email, theme and plugin development to my clients, I function as a single point of contact answering to the needs of their expanding sites.

My service portfolio includes but is not limited to WordPress hosting, optimization, theme development and custom plugin creation. Community creation via vBulletin, Ning and BuddyPress and bbpress

I also am well experienced in site conversion, transition and merges. To clarify this, website technologies change and giving up your data is not an option. I have transitioned literally hundreds of sites from one platform to another.

viagra 50 mg indian version of viagra cialis cheapest viagra india online viagra cost comparison viagra for sale without prescription generic tadalafil online buy viagra in korea indian levitra discount cialis online viagra prescription over the counter vardenafil cialis otc cialis no rx cialis 30 mg viagra ranbaxy buy levitra in uk cialis low price tadalafil tablets 10mg cheap viagra fast shipping cheap generic levitra cialis discount cialis 5mg viagra discount prices buy levitra without prescription vardenafil online generic levitra canada viagra professional price cheapest sildenafil citrate indian version of cialis viagra lowest price viagra online prescriptions tadalafil 10mg levitra over the counter levitra prescriptions online buy viagra without a prescription liquid tadalafil citrate buy viagra prescription online tadalafil 20mg india india viagra generic sildenafil citrate for sale vardenafil hcl 10mg cialis discount coupon buy levitra australia viagra over the counter in canada liquid sildenafil tadalafil price comparison viagra cost in india cialis mail order sildenafil sales buy vardenafil cialis offer cheap vardenafil generic cialis no prescription viagra tabs generic indian names viagra price canada vardenafil hcl 20 mg generic viagra without prescription viagra by scilla biotechnologies buy generic cialis free viagra viagra over the counter viagra pills kamagra 100 mg cialis from india tadalafil australia tadalafil 20mg tablets tadalafil soft tabs sildenafil pills viagra no prescription required generic viagra paypal tadalafil online indian viagra cost tadalafil online pharmacy generic soft viagra sildenafil soft tablets viagra generic names buy viagra in ireland levitra without prescription levitra online purchase cialis pill indian tadalafil levitra 5mg cialis cost per pill tadalafil oral jelly sildenafil no prescription vardenafil price generic cialis 10mg cheap cialis no prescription order sildenafil citrate indian generic viagra blue viagra buy cialis usa apcalis 20mg tablets viagra overnight delivery sildenafil india purchase viagra without a prescription viagra prescriptions order viagra without prescription viagra with no prescription levitra for sale purchase viagra canada discount levitra viagra 200mg cheap viagra 100mg cialis overnight delivery buy sildenafil online viagra made in india cialis tabs 10mg viagra indian pharmacy viagra for sale in ireland viagra uk prices buy viagra in europe generic cialis india levitra online viagra for sale india buy viagra in dublin generic cialis soft tabs viagra 50mg cost generic sildenafil 100mg tadalafil generic viagra super active 100 mg kamagra 100mg sildenafil 100 mg tablets cialis no prescription viagra low price online cialis suhagra tablets buy cialis daily use tadalafil sample cialis prices viagra prescription online buy cialis pill kamagra from india cialis online levitra mg vigora india vardenafil 10 mg sildenafil citrate 100mg buy viagra in india buy cialis professional viagra in india buy viagra in singapore generic revatio viagra substitutes sildenafil canada viagra no script cheap kamagra viagra retail price cheap lovegra order viagra uk buy cialis in mexico viagra prescription price purchase cialis online without prescription online cialis prescription ranbaxy caverta buy viagra in hong kong sildenafil price cialis mastercard buy viagra in england viagra mail order canada cialis tablets for sale order cialis cialis soft tabs generic levitra india tadalafil prices cheap sildenafil citrate tablets cialis online prescriptions cialis 5 mg daily levitra prices prescriptions viagra viagra over the counter alternative cialis 20 mg tablets cialis generic india cialis prescribing cialis 20mg daily sildenafil 50 mg viagra drug prices tadalafil generic india cialis sale viagra prices buy viagra 50 mg levitra pharmacy buy viagra generic viagra prescription drug cialis daily cost vardenafil uk viagra soft tabs online buy viagra super active cialis 10mg price 25mg viagra silagra 100mg online viagra prescriptions cialis prescription cheap cialis india revatio 20 mg indian equivalent of viagra tadalafil india viagra capsules cheapest viagra buy cialis without prescription tadalafil overnight cheap tadalafil online purchase viagra online no prescription