Lesson #20 - File Structure for BBS Config Files

Every BBS in your script .FON directory will require a config file.
All config files must be arranged in exactly the same order. Since
some data will not apply to every BBS (e.g., supplemental menus, or
"read bulletins now?" prompts/responses), it's likely that there are
going to be some null lines in most of your BBS config files.

The config file structure will be dependent upon the order in which
you have your READ statements in the main script routine.  The READ
order is not important.  All that's important is the line being read
really does correspond to the variable it's being assigned against.

The easiest way to approach the BBS config file is to first write the
main script READ routine, then assign each line in the config file
according to how you've written the READs.  Using the following
example from previous lessons:

     {READ esc_p}{READ esc_r}
     {READ bulet_p}{READ bulet_r}
     {READ persmail_p}{READ persmail_r}
     {READ main_p}{READ main_r}
     {READ supmen1_p}{READ supmen1_r}
     {READ supmen2_p}{READ supmen2_r}
     {READ mail_p}
     {READ quit_r}
     {READ suffix}
     {READ success_p}
     {READ anykey_p}
     {READ nomail_p}

..each BBS config file would be a regular ASCII text file with each
line corresponding to:

Line 1 -- text for the "press esc" prompt (front-end mailer)
Line 2 -- the response to the "press esc" (either of two values ^[ or ^[~^[)
Line 3 -- text for "Read new bulletins?" prompt
Line 4 -- response to read bulletins prompt
Line 5 -- text for "read personal mail now?" prompt
Line 6 -- the response to the "read personal" prompt
Line 7 -- text for the Main Menu prompt
Line 8 -- response to the Main Menu prompt (to get to Mail Door)
Line 9 -- text for the first Supplemental Menu
Line 10 - response to the first Supplemental Menu
Line 11 - text for second Supplemental Menu
Line 12 - response to the second Supplemental Menu
Line 13 - text for the Mail Door prompt
Line 14 - letter to be sent specifying "quit" to Mail Door prompt
Line 15 - "suffix" (either "|" or "null"..for no hot keys or hot keys)
Line 16 - text for the "press any key to continue" prompt
Line 17 - text sent by mail door to report "no new mail"

Once you've designed your BBS config file structure, print it out so
you'll have it handy for future reference for things like script
redesign, config file creation, script debugging, etc.

Later on we'll investigate another script which we'll use whenever we
add a BBS to our script .FON.  This script will prompt us for the
data that needs to be in the BBS config file.  Once all data is
entered, the script will write the config file for us, automatically
formatting the file correctly.  In lieu of such a script, all BBS
config files must be created manually with a text editor (the printed
copy of your config file design will be a great assist if doing
things manually).

If, after making the initial cut on the main script, we determine we
need to add more data items, then it's a simple matter to just append
the corresponding READs to the end of the existing READ statements in
the main script (remember, order in which data is read is not
important..only that the data being read matches the variable it's
being assigned to).  However, if we later determine that a data item
isn't really required and we decide to delete that item, then special
care must be taken to delete the corresponding data line in every BBS
config file, even if that line is "null".  Otherwise, data will be
assigned to the wrong variable beginning at the point where a READ
has been deleted.

BTW:  the example main routine I've been discussing opens the BBS
config file in the {COMMO} home directory.  You can keep these config
files anywhere you want, e.g., a CONFIG subdirectory off your {COMMO}
home directory.  Just be sure to include the correct path in the ROPE
statement, e.g., {ROPE %_hom%config\%bbsid.cfg}.  Personally, I'd
keep all the config files in their own subdirectory, just as a
housekeeping/file management measure.

End of Lesson #20 -- Next Lesson..Automating Config File Creation

Jim
