68 Classifieds Blog

Features

Custom Changes

Posted on October 27, 2008 by Eric Barnes

68 Classifieds was designed to be as simple and easy to use as possible. Even with it designed this way we still have a lot of customers that want to create custom changes and add in little features that do not come standard. In this post I will try and outline some of the methods you can use to make changes and not have to worry so much when an upgrade comes out.

First off 68 Classifieds comes with a module system, plugins, and custom templates. If at all possible it is recommended to use one of these three routes because they are independent of the core and make upgrading easier.

Code Changes

Code changes are little pieces you add in that enable new features to your site. When you make changes like these upgrading is harder because you need to make those same changes to the new files. We do try and make this easier by including a changelog between each minor revision so instead of the whole package you only have a handful of files you need to look through and edit.

Before making any custom changes it is highly recommend to make a backup of both your files and your database. Just in case any changes made cause problems. With a backup you can always revert back, otherwise you may have to do a fresh install which you would not want to do.

1. Text File - Create a text file and list the changes you make in it. If nothing else include the file so later you can use a file comparison application to spot your changes. For example you could create a file like this:

October 24, 2008 - Changed printer.php - Added new var for title.
October 19, 2008 - Changed contact.php - Added a new field.

2. Comments - Another good idea is to wrap comments around your changes:

// added by me for mysite.com on October 16, 2008
$my = 'customcodechanges';

When doing this it is best to use some sort of common term in your comment. That way you can search all the files for your comments.

3. Use version control - This is not really for the beginner because you would have to setup a cvs or svn server and then use it compare differences. I will not go in much detail about this because it can get complex.

File Comparison

With any of these methods you will need a good file comparison application and I will list some of the ones I know about here:

Project Searching

Beyond file comparison you will also want to be able to search all your files for the changes you made. Most ide’s will allow you to create a project and add all your files. Then you can use it to search the project and find all files that have a specific string in it. I use TextMate and Eclipse and both support this.

Hopefully this post will help those that are wanting to create custom changes and if you have a better method or a different method please post in the comments.

Comments

October 27th, 2008 at 5:38 pm

Something else that wasn’t mentioned, but is extremely important if you are going to make changes to ANY existing file. ALWAYS MAKE A BACKUP FIRST BEFORE MAKING ANY CHANGES TO THE ORIGINAL FILE.

October 28th, 2008 at 12:25 am

Good point Mike. I just altered the post to include that.

Comments