‘Adventures in Coding’ Archive

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…
(more…)

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>
</th>
<td>
<input type="text" class="main" id="asin-0" name="asin[]" value="' . $existing->asin . '" />
</td>
</tr>

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…

WordPress Lessons Learned

My Adobe CS4 Master Collection arrived on the 23rd… since it was my son’s birthday I didn’t do much with it beyond install… an install that seemed to take forever.. Before installing, I decided to uninstall the CS3 programs that aren’t in high use… Contribute was in that batch leaving only Photoshop, Illustrator, InDesign and Dreamweaver on my system…. Only thing is for some reason my wordpress was being odd and wouldn’t let me connect with Contribute CS4 so decided to try reinstalling CS3. I thinks the re-install of that one program took as long as CS4 total as it kept making me switch between CS3 and CS4 disks. So lesson learned – make sure you really don’t want the CS3 items before uninstalling. Still not sure what was causing the issue as the same settings seem to work fine now on CS4… might have been something quarky with the server.

Friday I felt pretty miserable with a migraine so I didn’t do much of anything. Saturday morning I played around with the battles I had missed on the NAPP boards the past several weeks. See previous post.

Yesterday afternoon/evening I decided I was going to finally tackle the “Library” section and actually customize it a bit. Once I got the books lining up nicely (View the Library) I decided I had finally had enough of the “Currently Reading” showing up on the Library pages and the home-is() wasn’t really working. I found a great solution on Blue Mushroom which suggested modifying the functions.php page..

While that worked great, I also happened to add an absentminded extra return after the ending ?> which apparently causes problems with WordPress… My entire Dashboard disappeared until I found the offending carriage return and deleted it. So second lesson learned – don’t have extra carriage returns in your WordPress php files.

More Blog Updates

Elton John: To Be Continued

Watched the 2nd Contribute tutorial by Terry White and have now learned how to insert some custom html in contribute.. it is quite interesting… yet another Adobe program for me to figure out.

I’ve done some customization of the sidebar – still playing around with it. I think I’ve figured out what each of the php template files do – I haven’t customized them all yet but least I have an idea as to what is available.

I’m trying out a library plugin called now-reading which allows what books I’m currently reading to be displayed. I’ve only done a little customization to the ‘sidebar.php’ of its templates so even more php files to figure out and style.

I wanted one that would do a currently listen to however I couldn’t find a plug-in I liked so playing around with just a “CurrentMusic” div and links from amazon associates… Not sure how annoying that is going to be in keeping up…

Next project is to work some more on the library and do some customization in there and I also want to download and play around with Lightbox2 a bit…

More Style Edits

Spent some more time playing around with the php and css that runs the blog. I’ve now made it so the sidebar is visible on most pages (I think)… I’ve added a couple links to the header, changed the title structure a bit, and modified the background slightly… here is a new screen shot of the current state.

26Dec2007 Blog Screen shot

Next task is to work on the Sidebar a bit more…

Entries (RSS) and Comments (RSS)
Return to Burianek.com - Blog Home Page