‘ Adventures in Coding ’ Posts

Changed to Responsive Design

I received a nasty gram from google last week because my blog was not ‘mobile’ friendly… so I spent the day reworking my design into a responsive one… I haven’t not reworked the menus which are using a hover effect to display so the menus are not working properly on touch devices.

Long needed update to my WordPress theme…

I originally created my wordpress theme back in 2007.. before widgets and nifty menus etc… hence it was frustrating having to code in widgets I was interested in by hand so nothing got added or updated.

This week I’ve spent time updating some of my own sites. Back in April I got a SmugMug account which I wanted to style a bit. I finished that on Monday and then decided it was time to tackle my WordPress site. I knew I wanted to keep the basic look I’ve had but wanted to bring it into the WP3.0 relm with support for Menus and Widgets.

I just put it live this afternoon… there is still more I want to do with it. Specifically I want to code a slide out sidebar for on the single posts pages and check out some of the SmugMug/Wordpress plugins. But this will do for now – I think it is much better than I had before..


YAPB and other changes to my WordPress

This weekend I decided to add a photoblog plugin to my WordPress. It is hard to believe that I started this blog 18 months ago in December 2007. Unfortunately, I really haven’t had much time to play around with it to get it to do the things I’d like it to. Not to mention the keep up with the changes WordPress has undergone in that time. Typically the only time I play with my own sites is when I’m not feeling well. Something about working with code on something non-work related is semi-relaxing to me. Thanks to the major change in my schedule due to having a son in middle school my sleep schedule is completely off which means I fought with migraines this past weekend… and so I played with my WordPress blog – demented I suppose…
Continue reading “YAPB and other changes to my WordPress”

Now Reading Plugin

I’ve been using the Now Reading Plugin by Rob Miller as a means of keeping track of the books I read. I encountered 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 which has a post on Now Reading for WordPress 2.7+ 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’t have the option to include or later edit an ASIN.

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.

In the file admin-manage.php, after line 126 add:

<tr class="form-field">
<th valign="top" scope="row">
<label for="asin-0">' . __("ASIN", NRTD) . '</label>
<input type="text" class="main" id="asin-0" name="asin[]" value="' . $existing->asin . '" />

Then in the edit.php file, after line 49 add:

$asin = $wpdb->escape($_POST['asin'][$i]);

and after line 104 add:

b_asin = '$asin',

And now the ASIN number is editable when you edit the book… 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.

Now that I have managed to get the plugin actually working, I might look at actually styling the individual book pages…