Modify RankChecker Firefox Add-On for Multiple Users

March 22nd, 2009 by Joyce Johnston

RankChecker is a handy Firefox add-on from SEOBook.com that allows you easily to track search engine results for a particular domain. It rescues you from the wearisome task of entering keywords into a search engine and paging through the results until you find your website. RankChecker also allows you to save results, called presets, to a sqlite database in your Firefox profile.

As a web developer, however, I work with a team of developers and with dozens of websites whose search engine results we want to track and share. To make it easier to do that, I modified RankChecker to allow us to save presets to files stored with clients’ website files on our development server rather than to our individual Firefox profiles. I also modified RankChecker’s scheduled tasks to run presets from each of the databases and, instead of overwriting the preset when the task is run, saving the new data to a new preset. That allows us to keep an historical record of our websites’ keyword performances in search engine results.

There are just a few steps involved in modifying a Firefox extension: setting up a development Firefox profile, opening the add-on’s files, making the necessary changes, zipping everything back up, and installing the modified extension. Here’s an overview of the entire process:

Install RankChecker

If you haven’t already, install RankChecker into your current Firefox profile. You’ll need the files later on. RankChecker is available from SEOBook.com.

Create a Firefox profile for development

Extension development experts will tell you to set up development profile for Firefox before you start fooling around with extensions. Using a different profile for development will prevent you from torpedoing your default profile should the catastrophic occur. Do that first. Regardless of your operating system, start by closing Firefox.

Linux users

From your shell, enter:

$ firefox -ProfileManager

Windows users

Select “run” from the Start menu and enter:

firefox -P

Use the Firefox wizard to create your new profile. The fields are self-explanatory. Uncheck “don’t ask at startup” to force Firefox to ask you which profile you want to use when starting.

Exit the profile manager and restart Firefox, selecting your new profile.

Copy RankChecker to your desktop

Copy the RankChecker extension directory from your default profile to your desktop. We’ll work with it there. Linux users will find the directory, called rankchecker@seobook.com, in ~/.mozilla/your_default_profile.default/extensions/. Your default profile directory is usually made up of a random-looking combination of numbers and letters, like this: 7iriuzu3g.default.

When you open the rankchecker@seobook.com directory on your desktop, you’ll find three items: “chrome.manifest,” “install.rdf,” and “RankChecker.jar.” “chrome.manifest” tells Firefox where to find the extension’s files and registers files the extension needs to work. “install.rdf” includes meta data about the extension and is used by the Extension Manager when the extension is installed. “RankChecker.jar” contains images, .xul files, which are xml files that determine the layout of the extension, and .js files, which do all of the work.

Open RankChecker.jar

The files we will be working with are in “RankChecker.jar.” To get at them, un-jar the archive.

[joyce@mosquito rankchecker@seo.com]$ jar xvf RankChecker.jar

The “content” directory contains the files we’re interested in, so open it up and take a look.

If you’ve played around with RankChecker, you’ll know that clicking the “open” button in the processor window opens your presets and the “save” button saves your presets. We want to modify the behavior of those two buttons to allow you to select a sqlite database from somewhere other than a Firefox profile. We also want to modify the Scheduler so that you can schedule presets to run from a database of your choosing and so that the Scheduler can find the presets when it’s time to run.

Update overlay.js, scheduler.js and options.xul

As their file extensions suggest, “overlay.js” and “scheduler.js” are javascript file that contains all of the functions that make RankChecker work. The updates I made to these files include:

  • Modifying the Storage object to allow you to select a database to work with, rather than always opening the rankchecker.sqlite database in your Firefox profile.
  • Similarly modifying the Scheduler to allow you to choose the database, then the preset when you want to schedule a preset to run, rather than only offering presets from the rankchecker.sqlite database in your Firefox profile.
  • Modifying the Scheduler so that it can find all of the presets when running scheduled tasks. I did that by adding a mainrankchecker.sqlite database. When a preset is saved, the path to its database is stored in the dbpaths table of the main database. When it runs, the Scheduler now looks in that table first to find all of the databases it must search for presets.

I also modified the Options window (whose code is contained in “options.xul”) so that you can change the path to the main rankchecker database. The default is “/usr/local/mainrankchecker.sqlite.”

You are welcome to download the modified overlay.js, scheduler.js and options.xul files. Then simply replace the “overlay.js,” “scheduler.js,” and “options.xul” files on your desktop with the downloaded files.

Jar and Zip

The last tasks are to re-jar and zip the extension’s files, install RankChecker in your development Firefox profile and give it a try.

First, jar the content and defaults directories:

[joyce@mosquito rankchecker@seo.com]$ jar cvf RankChecker.jar content defaults

Next, zip up all of the files in the rankchecker@seo.com directory:

[joyce@mosquito rankchecker@seo.com]$ zip test.zip chrome.manifest install.rdf RankChecker.jar

Then rename the test.zip file to test.xpi.

[joyce@mosquito rankchecker@seo.com]$ mv test.zip test.xpi

Test the modified RankChecker

To install your newly modified RankChecker, simply drag test.xpi to Firefox. Click install. Restart Firefox. Open RankChecker and take it for a test drive.

How to Use Modified Rankchecker

  1. The first thing to do is create all of the databases you want to use. If you are a Linux user, the touch utility works great. You can name the databases anything you like, but Mozilla cautions against using anything but .sqlite as the file extension.
  2. Be sure to create a main rankchecker.sqlite database where RankChecker can store the paths to all of the other databases. Once you’ve chosen a location for it, set the path in RankChecker’s options. Go to your Firefox tools menu, select RankChecker, then Options. Type the full path, including the database name, in the Main Database field.

Once you’ve completed those two tasks, you’re ready to begin creating your presets and scheduling them to run!

  • Share/Bookmark

4 Responses to “Modify RankChecker Firefox Add-On for Multiple Users”

  1. Rene says:

    Hi this is an interesting article. Do you think it would be possible to modify rank checker to work with local google search such as google.com.au?

    What file would I need to modify?

    Thanks

  2. Joyce says:

    Rene,

    You don’t have to modify Rankchecker itself to select a different search engine. In Firefox, go to Tools -> Rank Checker -> Options, and from there you’ll see that you can select different search engines. google.com.au is one of the options.

    Thank you for your comment!

  3. i cant seam to figure out how to set a schedualed task can someone please help thankyou

  4. Joyce says:

    Greg, go to your FireFox tools menu. You should see Rankchecker listed there. Scheduling a task should be one of the options in the Rankchecker sub menu. Thank you for your comment!

Leave a Reply