Drupal Bookcat Module

Welcome to the home page of the Drupal Bookcat module. Bookcat is a read-only port of the Explorer output of FNProgramvare's Bookcat book collector's database Windows product. It must be stressed that my module in no way replaces FNPRG's product of the same name - it merely extends its usefulness by making your Bookcat databases available to a wider user-base on the Drupal platform.

FNProgramvare's Bookcat is a standalone Windows application which uses the MS Access database engine. Whilst the product does provide the functionality to export a database to static html pages, it is doubtful whether this would be an ideal solution for a large collection, and it would not necessarily fit with an end-user's existing website.

This is where my port comes in. By converting the .xsl files in FNProgramvare's Bookcat to PHP and the PHPTemplate theme engine, the system can be incorporated into Drupal - a CMS that is rapidly becoming the de facto for corporate and enthusiast CMS alike.

So how does it work? As I previously mentioned, this is purely read-only. You cannot modify or add to the data in the database, so this module is not a replacement for FNProgramvare's product - it complements it. Drupal does not use MS Access database, so to use my module the data needs to be converted to MySQL (or any other database supported by Drupal). There are numerous ways to achieve this, but the easiest solution which also happens to be free, is using the Bullzip product. Furthermore, this brilliant tool can be automated so the database could easily be exported and imported automatically overnight every night.

Who is this module aimed at? Off the top of my head I can think of a few applications, but there are many reasons why people would want to use FNProgramvare's Bookcat / Drupal Bookcat:

  • Private Individual: A private collection can be accessed from anywhere on the Internet, and furthermore Drupal allows the setting of access rights so an individual can ensure only he/she can see his/her collection.
  • Hobbyist / Homage Website: There are many websites on the Internet dedicated to a particular subject. Using this module would be ideal for a website dedicated to a particular magazine / book / author whatever.
  • Corporate Library: A medium-sized corporation may run a technical library for its workforce, but only need a solitary individual to update / maintain the library.

You will need to satisfy a few prerequisites to use the module:

  • You will need your own copy of FNProgramvare's Bookcat
  • You must have a functioning Drupal website and have the experience level to add new modules. If you need guidance on this, click on one of the Amazon links below and get yourself one of the many Drupal books in the marketplace.
  • The module was developed under Drupal 6.19. I always keep my development site on the latest increments of version 6, so will always be in a position to test against the latest releases. I will not test against anything earlier than 6.19 (and you shouldn't be using any!) and I won't be developing a Drupal 5 version sorry.
  • You will need a mechanism for copying the MS Access database to MySQL
  • I have tested against PHP 5.2. I can't imagine it'll work with any other version - 5.3 for instance is not compatible with Drupal 6.

Ready to go? Good! Instructions:
1. Download the latest version of bookcat from this page and install it using the usual method of adding new modules;
2. Ensure your MS Access database has been copied into MySQL correctly and your web server can access this database.
3. FNProgramvare's Bookcat offers two methods for saving images - either remotely with a filepath to the actual image, or internally in the database (not recommended for anything other than a small database!). Since you will be moving from the Windows world to in most instances Linux, you will need to ensure (1) The machine hosting Drupal has access to any remote images, (2) adequate storage capacity under the server's document root for a copy of each image you have in your database. This is an important point: The module copies all images (both internal and external) into the images directory in the module's path. For more about this, see below.
4. The module creates a new content type called bookcat. So to add a new database, simply click on the Add Content link as you would for adding say a news item. When you create the new content, you will be interrogated for the database name, path, userid and password. It is important to get these right! Smile There is no limit to how many databases you can create.
5. Check the permissions under Admin/User Management are as you want.

You will now be ready to go, and you can create links to the databases as you see fit.

Images

As mentioned above, you will need to tell your webserver where your external image files are held. To achieve this, you must edit config.php i in the module's direcory. This contains an associative array (don't worry, nothing too serious!) which will need to be populated as you need. The file looks like this out of the box:
config.php

class bookcatconfig {


    // holds the array to map Windows directories held in the database with Linux equivalents
    // Add at the bottom of the array to fit your circumstances
    public static function getconfigMapper() {

        $mapper = array("c:\\temp" => "/windows/D/temp",
                        );

        return $mapper;
    }


}

The significant part of the code is the array - I have put in an example which works on my laptop. I am saying here "All my images are held in Windows under c:\temp but in my Linux world, that pathname is actually /windows/D/temp. Note that under PHP you have to double backwhack the backslash in the Windows path. You can add as many paths in this code as you need. So, for an example we'll say that I have stored another set of images in c:\images. Add to the array as follows:
class bookcatconfig {


    // holds the array to map Windows directories held in the database with Linux equivalents
    // Add at the bottom of the array to fit your circumstances
    public static function getconfigMapper() {

        $mapper = array("c:\\temp" => "/windows/D/temp",
                        "c:\\images => "/windows/D/images",
                        );

        return $mapper;
    }


}

You can of course add paths to networked filestores providing the machine hosting the web server also has access to the networked folders.

Ready for the demo?


AttachmentSize
bookcat-6.x-1.0-alpha7.tar.gz82.85 KB
bookcat-6.x-1.0-alpha6.tar.gz82.6 KB
bookcat-6.x-1.0-alpha5.tar.gz81.04 KB