Drupal File Comparison Utility

Drupal File Comparison Utility
Version 1.2
© 2007 Developed by Sam Raheb
Released: January 27, 2007
Designed for all version of Drupal
Type: Free Program

Download: Drupal File Comparison Utility

System Requirements
Microsoft Excel 2000, 2002, 2003, or 2007 with Visual Basic for Applications (VBA) support


This program provides a means for you visually to keep track of changes you made to any of the original core Drupal files. If a new file is released in the future, you can always compare the changes you made in your modified file and apply the changes to the new core file if needed.

For illustration purposes, this program comes loaded with one CSS file and three core modules from Drupal version 4.7.5 (drupal.css, profile.module, user.module, and aggregator.module). The changes you see in the Modified File (column D) were changes I made for my particular Drupal website. Column B contains the original code and column D contains the modified code.

Modifications (column D):

  • drupal.css: Uses the Compact Profile Layout code at the bottom of page.
  • profile.module: Increased the weights from 5 to 40 in the profile drop-down box.
  • user.module: Added more instructions to the "Create new account" Username and Email address areas.
  • aggregator.module 1: Opens all syndicated links in a new browser window.
  • aggregator.module 2: Option to open all syndicated links either in the current browser window or in a new browser window using the image link.

Note: If you want to use the aggregator.module 2 version, then add the supplied "new-window.gif " image to your Drupal misc folder. i.e. /misc/new-window.gif".

To see one of my websites using this aggregator.module 2 version visit Single in SCV at: http://singleinscv.com.

To initially get your code or text into the spreadsheet, perform the following steps:

    (1) Switch to any of the current spreadsheets and press the "Create a New Sheet" button to create a new sheet.

    (2) Switch from Excel to your ASCII text editor and open the original unmodified file you want to transfer to Excel.

    (3) Select all the text / code in the file and copy into memory, the clipboard.

    (4) Switch back to Excel, select the new sheet, and press the "Paste Text" button in column B to paste the contents into the cells of column B (Original File).

    (5) Repeat Steps (1) through (3) for the modified version of the file, but in step (4), choose the "Paste Text" button in column D to paste the contents into the cells of column D (Modified File).

    (6) To rename the spreadsheet, go to the bottom of the application window, double click or right click on the sheet tab and enter a new name.

Clear Text:

To clear the text in column B, press the "Clear Text" button in column B. To clear the text in column D, press the "Clear Text" button in column D.

Any differences in the code / text between the original file and the modified file, columns B and D, will be highlighted in yellow with the text colored red. If you place formulas into the cells, then these cells will highlighted in yellow with the text colored blue. The highlighting and font color changes are done using Excel's Conditional Formatting.

The cells in column C contain a comparison formula that will compare the cell contents in column B to column D. If the cell values are not equal to each other then the Column C cells will read "Not Equal" and highlighted in yellow.

You do not have to worry about vertically inserting or deleting cells in either column B or D, because the comparison formulas in column C and the Conditional Formatting on the cells in both columns B and D are independent of cell reference or location.


The cells in both columns B, C, and D use Excel's Conditional Formatting. Conditional Formatting can only be applied to cells with a character length of less than 256 characters. If the cells contain more than 256 characters, the Conditional Formatting will not take affect, but the "Not Equal" formula comparison cells in column C will still function.

The Conditional Formatting in columns B, C, and D and comparison formulas in column C only go down to row 3,000. If you need more that 3,000 rows, just copy any row above row 3000 and paste it downwards for the amount of rows you need to add to the spreadsheet.

Keep in mind that you can always edit your code directly in the spreadsheet and then copy it back into an ASCII text editor.


Sam Raheb