You are here

Drupal PinBoard Theme Upgrade Manual

I originally bought the PinBoard theme from ThemeSnap back in October of 2012 for my startup, Collectiboard (although now I am focusing 100% of my efforts on Over the past few months, there were numerous updates to the theme, and I also made a ton of changes and also wrote another ton of custom code to make Collectiboard look like what it does today. The big problem was, I started losing track of all the changes I made and upgrading the theme to the next version was beginning to become a chore, overriding my own changes & trying to organize everything in vain that was spiraling out of control with each new update adding new headaches. I remember initially looking forward to every update because it always had bug fixes that I really needed. But slowly but surely, the upgrade process itself was becoming a nightmare. Does this sound familiar to you? Read on to learn how I solved this problem once and for all using a simple system (the example used below can actually be downloaded to visually see what exactly is going on).

Here are some initial reminders:

1) First of all, the manual that I'm writing here is done for newbies (which most of you are anyway), meaning there's no Git (version control) involved.

2) The most important thing to remember here is to figure out how to track custom changes for each new update without ever forgetting about them.

So let's do a hypothetical example. Let's say you bought PinBoard v2.1.6 (which was released on April 18). Now let's say you made the following changes:

1) Changed the footer & got rid of unfollowers immediately (v2.1.6).

2) Changed "You Follow" to I follow" a month later (v2.1.7). -> First upgrade!

3) Added some custom code to change the location of the counter for each pin page another month later (v2.1.8). -> Second upgrade!

4) No custom changes for the current version (v2.1.9). -> Third upgrade!

The current version as of this writing is v2.1.9, released on July 2, meaning you need to have somehow upgraded three times without messing up. Here's the system that I came up with that enables me to upgrade Collectiboard within minutes. No more headaches, no more worrying about overriding my own custom code, just pure excitement that ThemeSnap, my replacement CTO (chief technology officer), took care of a bunch of bugs and came up with new features:

1) Create a separate directory (in the downloadable example, it's called "Changes") for all changes made.

2) Create a separate text file with changes & notes (in the example, every file has a text file with the same name).

3) Create a separate text file with files (in the example, it's called "Last Edited Files.txt").

So using the example, I'll go over these in detail to give you an idea of how everything works:

1a) The footer is initially changed within page.tpl.php in v2.1.6. And then since ThemeSnap made changes in the file in v2.1.7, it's in the changed folder for that directory too, with the same exact notes to ensure that custom changes are included before it's overwritten.

1b) To get rid of unfollowers, initial changes were made to node--pin.tpl.php, pinboard_helper.module & user-profile.tpl.php in v2.1.6. And then ThemeSnap made changes to node--pin.tpl.php in v2.1.8 & v2.1.9, pinboard_helper.module in v2.1.7, v2.1.8 & v2.1.9, and user-profile.tpl.php in v2.1.9, so the same notes were all carried over to their respective directories in those versions. One thing to note here is how I kept track of the difference in line numbers, due to code additions by ThemeSnap in later versions. For example, some code in line 92 had to be deleted within node--pin.tpl.php in v2.1.6 & v2.1.8 to get rid of unfollowers in the pin pages, but in v2.1.9 it's in line 105. Similarly, some code in line 27 had to be deleted within user-profile.tpl.php in v2.1.6 to get rid of unfollowers in the user profile pages, but in v2.1.9 it's in line 22.

2) To change from "You Follow" to "I follow", initial changes were made to page.tpl.php in v2.1.7. Since then no changes were made to this file by ThemeSnap. This is why you see this file as "Pinboard-v2.1.7: page.tpl.php" in Last Edited Files.txt, so that even if it's changed months later, you'll know instantly in which version it was edited last (without looking through each and every changed directory).

3) To change the location of the counter for each pin page, initial changes were made to node--pin.tpl.php in v2.1.8 (deleted some code in line 92 & inserted code at lines 125 - 126). And then ThemeSnap made changes to it in v2.1.9 (resulting inline 92 becoming line 105 & lines 125 - 126 becoming lines 138 - 139).

And that's it. This might not be the best way to do it, but it's worked for me fabulously, and I hope it works for you too.

You are here