Results 1 to 10 of 22

Thread: Adding user-created CHM modules to the Verse Tab

Threaded View

  1. #1
    Join Date
    Mar 2004
    Posts
    206

    Default Adding user-created CHM modules to the Verse Tab

    Hello Friends!

    You can now add your own CHM files to the Verse Tab. Using the current EXE update, follow the steps below to integrate your CHM with the Verse Tab:

    Adding the Module to the Verse Tab

    If your module has verse-based content, you can display your module in the Verse Tab. The Verse Tab takes the current search result or current Browse Window verse and loads the matching module content in the Verse Tab. If you want your module to appear in the Verse Tab, please follow the following steps:

    1. Create the CHD file for your module.

    2. Create a verse mapping file for your module. The verse mapping file is a text file that specifies an HTML file and anchor in the module for every Bible verse reference. You should create this file with a .vrt extension. For example, if your module is mymodule.chm, you would need to create a text file named mymodule.vrt. The format of the file should look like this:



    INDEXVERSION 8.0.0001
    VERSION NAS
    @USER_NUMBER_OF_CHMS 1
    LBRT1 | mymodule.chm | One-line description of my module
    END HEADER
    Gen 1:1-11:26 | LBRT1/file1.htm#anchor-id1
    Gen 12:1 | LBRT1/file1.htm#anchor-id2
    Gen 13:1 | LBRT1/file2.htm
    Gen 13:2 | LBRT1/file3.htm#anchor-id3
    Gen 13:3 | LBRT1/file3.htm#anchor-id4



    In your .vrt file, you should copy the INDEXVERSION line exactly as it appears above.


    The line starting with VERSION designates the Bible version to be used for the verse mapping. If your .vrt file is using verse references based on the ESV versification scheme, you would put VERSION ESV on this line. If your .vrt file is using verse references based on the WTT versification scheme, you would put VERSION WTT on this line.


    In the line starting with LBRT1 , enter the filename of your chm file after the first vertical bar (e.g. "mymodule.chm"). After the second vertical bar, enter a brief (~32 characters max) description of your module.


    After the END HEADER line, the following lines specify the HTML files and anchors to load for each Bible verse reference. The Bible reference and the HTML link are seperated by a vertical bar ( | ). In the above example any verse in the range Genesis 1:1 through 11:26 maps to file1.htm#anchorid-1 in the CHM file (Gen 1:1-11:26 | LBRT1/file1.htm#anchor-id1). Note that you can enter a range of verses or a single verse reference in the .vrt file. For Genesis 13:1 this sample file maps to file2.htm in the CHM file (Gen 13:1 | LBRT1/file2.htm). The LBRT1/ string maps the entry to the CHM file in the header and must be prepended to your HTML link.


    3. Create a .VRG file from your verse mapping file. After creating the .vrt file, you will need to compile it to create the .vrg file. To compile your .vrt file, copy it to the Databases folder. Then, in the main window Command Line, type the following command and press Enter:

    compilechmvrt modulename


    If your .vrt file is named mymodule.vrt, you would enter compilechmvrt mymodule on the Command Line and press Enter. BibleWorks will then compile your .vrt file and create a .vrg file.

    Note: You should include a toc.htm file in your CHM file. This is the file that the Verse Tab will load if there is no mapping entry for a given verse reference.


    Copying Files to the BibleWorks Directory

    Once you have created your files, you need to copy the files to the proper BibleWorks folder. By having the files in the proper folder, BibleWorks will integrate your custom module into the program so that it will display in the Resource Summary Window. The files you need to copy are the CHM, CHD, VRG (if you created one), and SDX files you created earlier. In our examples above, these are mymodule.chm, mymodule.chd, mymodule.vrg, and mymodule.sdx. Use the Windows Explorer to copy these files to the database folder under the main BibleWorks folder. Usually this folder is C:\Program Files\BibleWorks 9\databases.

    Once you have copied these files to the database folder, close BibleWorks if it is open, and restart the program. Your custom module should appear on the designated Resources menu folder, and should appear on the list of files in the proper Resource Summary Window. Your custom module will appear in the Resource Summary Window whenever a verse appears in the Browse Window that also appears in your custom module.

    Mutiple-CHM Modules

    If your module is composed of multiple CHM files (for example, a commentary set with one CHM file for each Biblical book), you only need one .vrt file for all of the CHM files. To make a .vrt file that indexes multiple CHM files, enter the number of CHM files in the @USER_NUMBER_OF_CHMS line (e.g. for a module with 4 CHM files, the line should read @USER_NUMBER_OF_CHMS 4). Then, create a line for each CHM file like this:

    LBRT1 | mymodule.chm | One-line description of my module
    LBRT2 | mymodule02.chm | One-line description of my module
    LBRT3 | mymodule03.chm | One-line description of my module
    LBRT4 | mymodule04.chm | One-line description of my module

    The LBRT1, LBRT2, LBRT3, etc. strings are used to designate the CHM file containing a Bible reference entry. So if in our multi-CHM module Psalm 90:1 was in mymodule02.chm, file79.html and Romans 1:1 was in mymodule04.chm, file143.html, we would have these entries in the mapping section:


    Psa 90:1 | LBRT2/file79.htm
    Rom 1:1 | LBRT4/file143.htm


    The .vrt file for this multi-CHM module might look like this:

    INDEXVERSION 8.0.0001
    VERSION NAS
    @USER_NUMBER_OF_CHMS 4
    LBRT1 | mymodule.chm | One-line description of my module
    LBRT2 | mymodule02.chm | One-line description of my module
    LBRT3 | mymodule03.chm | One-line description of my module
    LBRT4 | mymodule04.chm | One-line description of my module
    END HEADER
    Gen 1:1 | LBRT/file01.htm#gn_1_1
    Gen 1:2 | LBRT/file01.htm#gn_1_2
    Gen 1:3 | LBRT/file01.htm#gn_1_3
    .
    .
    .
    Psa 90:1 | LBRT2/file79.htm
    .
    .
    .
    Rom 1:1 | LBRT4/file143.htm
    .
    .
    Last edited by MTan; 04-16-2012 at 03:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •