QUOTE OF THE DAY v1.0 (DOS)
"If you've got questions, The Magic Oracle's got answers."
Written and (C)2008 by Sean Dennis
Another Cheepware production!
==========================================================

This program is a BBS door.  If you do not know what that is, you really
shouldn't try to use this program.  If you do know what this is, you
really shouldn't try to use this program until you read the
directions. <G>

I. LICENSE AND DISCLAIMER

  This program and its associated files are property of Sean Dennis.  You
  may use this program for free as long as you are NOT running a for-profit
  ("pay") BBS.  Reverse engineering of this program or its associated files
  in any form, analog or electronic, is prohibited.  This program works
  nicely on my system, but I can't guarentee that it will work on your
  system.  If something breaks, I'm not responsible.  There is no promise
  or guarentee of future development or support of this program.

                          -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

II. WHAT IS QUOTE OF THE DAY?

  Quote of the Day (QOTD) is a BBS door that can be run locally or through a
  BBS that is capable of running 16-bit DOS doors.  QOTD is a simple
  "quote of the day" door, which when the door is run, displays a
  quote from a specially formatted text file.  Features of this door:

    - Supports DOOR.SYS and DORINFO1.DEF drop files.

    - DOS, DesqView, Windows, and OS/2 multitasker friendly.

    - ANSI.SYS not needed as the door has its own ANSI driver.

    - Reads all needed basic runtime information from the dropfile.

    - Uses standard "pipe" or Telegard-style color codes for customization.


  Requirements to run QOTD:

    - A BBS that is capable of running 16-bit DOS doors and can produce either
      DOOR.SYS or DORINFO1.DEF dropfiles.

    - A FOSSIL driver.

    - ANSI.SYS is NOT required as the door has its own ANSI driver.

                          -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

III. UPGRADING FROM A PREVIOUS VERSION OF QOTD

  There is a previous version of QOTD called "Thought4U!" that I wrote
  many years ago, but this is not really an "upgrade"-more of a total
  rewrite.  If you're using "Thought4U!", keep your quotes file, but
  you'll need to reformat it.  Unlike "Thought4U!", QOTD can handle
  quotes of multiple line lengths instead of just own line.

                          -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

IV. SETTING UP QOTD

  Thankfully, QOTD is very easy to setup.  Here's the steps to set up a new
  installation:

    - Create a directory for the door and unzip the archive in it.  If
      have a quote file from Thought4U!, you'll need to change it as
      explained in "Customizing QOTD".  If you do not see the following as
      you unarchive the file:

      Archive QOTD10.RAR
      created at 09:27:44  12 Jan 2008
      by Sean Dennis

      (The date and time may be slightly different as I update the program.)

      Please do NOT use the program as the archive integrity has been
      breached (more than likely by some sysop sticking an ad in).  Please
      go to my website or my BBS to get an original copy of the program.

    - Run QOTD /L to create INDEX.DAT (a small file that tells QOTD
      how many quotes are in QUOTES.DAT).

    - Create a batch file to run the door from your BBS (or if you run
      Synchronet, you can run it directly from the door menu).

    - Add QOTD into your BBS's door menu and you're set.

  If your BBS requires a batch file to run a door like mine does, here's
  how to do it.  I run a multinode Ezycom BBS and this is my setup to
  run QOTD.  I created a batch file called RUNQOTD.BAT:

    @echo off
    d:
    cd\doors\qotd
    if %1 == 0 goto local
    qotd d:\ezy\node%1\dorinfo1.def
    goto end
    :local
    qotd /l
    :end
    cd\ezy\node%1

  The above batch file allows me to run the door locally also by
  determining if Ezycom has passed a node number to the batch file.

  If you're going to use DOOR.SYS, you can simply substitute DOOR.SYS
  for DORINFO1.DEF in the above batch file.

  You can pass the node number to the batch file from your BBS (please
  check your BBS documentation on how to do this).  If you're running
  a single-line BBS, just put a 1 instead of the %1 in the batch file.

  If you need an example on how to use the door, just type QOTD at
  the command prompt and a small help screen will appear.

  There is an additional command line switch you can use:

  /LOGOFF - This will disable the "press any key to continue" prompt
  after the quote is displayed.  You could use this for running the
  door as part of a logoff process.

  A quick note about the status bar you see when the door is running on
  your BBS with a remote caller...the status bar looks like this:

    <door name and author information>
    <caller name>     <node #> <OS> <COM port> <emulation> <KP> <TL>

  It's easy to understand, but there's a few things you should know:

    - <OS> will always show as "DOS" under Windows.  If you're running
      the door under OS/2, it will say "OS/2".

    - <KP> is the number of seconds since the last keypress.

    - <TL> is the time left before the door kicks the user off.

  Some miscellaneous notes about the door:

    - Ezycom sysops need to use the *D5 ("extended" DOOR.SYS) option when
      using any of my Cheepware doors.  The other version available for use
      is a non-standard DOOR.SYS.  The standard DOOR.SYS has 52 lines.

    - I have been told that some sysops are having problems using DOOR.SYS.
      I personally haven't had any problems with using DOOR.SYS and recommend
      that you use it with my doors, but they have reported success with using
      DORINFO1.DEF.  DOOR.SYS passes more information to the door which is why
      I recommend its use.

    - It has been reported to me that some doors under Windows XP have a hard
      time figuring out whether they are using ANSI or not; you may need to
      force ANSI manually to the door if you have problems with this.

                         -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

V. CUSTOMIZING QOTD

  There are two files you can customize in TMO:

    - QOTD.ANS/.ASC: This is a standard ANSI file, but I'd recommend
      making it no larger than 10 lines long as to make sure there's
      enough room for the quote and the "identify" line that QOTD
      puts at the bottom of each quote as well as the "Press Any Key
      To Continue" prompt.

    - QUOTES.DAT: This is a standard text file.  You can have up to
      32,767 quotes in it (this is the total amount of quotes, but not
      the number of each lines per quote).  I would not make the
      actual QUOTES.DAT text file larger than 64K in size or it may
      not fit in memory. Each line of each quote must be shorter than 79
      characters or else unpredictable results will occur.  The line length
      does NOT include the length of the pipe or Telegard-style color codes
      as they are stripped out of the string as it's displayed.  After you
      subtract or add to QUOTES.DAT, delete INDEX.DAT and run QOTD locally
      to rebuild the index file (it's just faster for your users).

      IMPORTANT: Each quote must be seperated with a percentage sign
      ("%") on a line BY ITSELF.  The file MUST end with a percentage
      sign on a line by itself also or the door will not work!

  TMO supports pipe or Telegard-style color codes in QUOTES.DAT (but
  not in QOTD.ANS/.ASC!). Here's how to use the color codes:

    - Pipe codes: The pipe codes are your "standard" color codes.  A chart
      to explain what the codes are:

      The color sequence indicator (|), followed by two characters
      (0..9) which form the color code.  This method changes only the
      foreground or the background at any given time.  To change both
      attributes, two color sequences need to be used.  In the "Fore" table,
      the first number is the "normal" color and the second number is the
      "bright" color.

                 Fore               Back              Blink
              +-------+            +----+            +-----+
      Black   | 00 08 |    Black   | 16 |    Black   |  24 |
              +-------+            +----+            +-----+
      Blue    | 01 09 |    Blue    | 17 |    Blue    |  25 |
              +-------+            +----+            +-----+
      Green   | 02 10 |    Green   | 18 |    Green   |  26 |
              +-------+            +----+            +-----+
      Cyan    | 03 11 |    Cyan    | 19 |    Cyan    |  27 |
              +-------+            +----+            +-----+
      Red     | 04 12 |    Red     | 20 |    Red     |  28 |
              +-------+            +----+            +-----+
      Magenta | 05 13 |    Magenta | 21 |    Magenta |  29 |
              +-------+            +----+            +-----+
      Brown   | 06 14 |    Brown   | 22 |    Brown   |  30 |
              +-------+            +----+            +-----+
      White   | 07 15 |    White   | 23 |    White   |  31 |
              +-------+            +----+            +-----+

      Yellow is "bright brown" (14).  Don't ask me why.

      The "|" characters in the boxes to not translate into color codes
      because they are not immediately followed by a number (but rather
      by other characters (i.e. "-" or " ").  This is important to note
      if you need to hse the "|" character anywhere.

      Examples:

      |11Hello!     (turns the foreground color to cyan)
      |17|15Hello!  (turns the background color to blue and the foreground
                     to yellow)


    - Telegard-style codes: Telegard uses its own proprietary (`) color
      codes.  The advantage to these codes is that you can change the
      foreground and background colors at the same time.  Here's how to
      use these codes:

      The color sequence indicator (`), followed by two characters from
      0 to 9, A to F, form the color code.  The color codes are listed
      below (low and high intensity side by side).

  REGULAR COLORS

           Black   Blue    Green   Cyan    Red     Magenta Brown   White
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Black   | 00 08 | 01 09 | 02 0A | 03 0B | 04 0C | 05 0D | 06 0E | 07 0F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Blue    | 10 18 | 11 19 | 12 1A | 13 1B | 14 1C | 15 1D | 16 1E | 17 1F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Green   | 20 28 | 21 29 | 22 2A | 23 2B | 24 2C | 25 2D | 26 2E | 27 2F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Cyan    | 30 38 | 31 39 | 32 3A | 33 3B | 34 3C | 35 3D | 36 3E | 37 3F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Red     | 40 48 | 41 49 | 42 4A | 43 4B | 44 4C | 45 4D | 46 4E | 47 4F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Magenta | 50 58 | 51 59 | 52 5A | 53 5B | 54 5C | 55 5D | 56 5E | 57 5F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Brown   | 60 68 | 61 69 | 62 6A | 63 6B | 64 6C | 65 6D | 66 6E | 67 6F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  White   | 70 78 | 71 79 | 72 7A | 73 7B | 74 7C | 75 7D | 76 7E | 77 7F |
          +-------+-------+-------+-------+-------+-------+-------+-------+

  BLINKING COLORS

           Black   Blue    Green   Cyan    Red     Magenta Brown   White
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Black    80 88 | 81 89 | 82 8A | 83 8B | 84 8C | 85 8D | 86 8E | 87 8F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Blue     90 98 | 91 99 | 92 9A | 93 9B | 94 9C | 95 9D | 96 9E | 97 9F |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Green    A0 A8 | A1 A9 | A2 AA | A3 AB | A4 AC | A5 AD | A6 AE | A7 AF |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Cyan     B0 B8 | B1 B9 | B2 BA | B3 BB | B4 BC | B5 BD | B6 BE | B7 BF |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Red      C0 C8 | C1 C9 | C2 CA | C3 CB | C4 CC | C5 CD | C6 CE | C7 CF |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Magenta  D0 D8 | D1 D9 | D2 DA | D3 DB | D4 DC | D5 DD | D6 DE | D7 DF |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  Brown    E0 E8 | E1 E9 | E2 EA | E3 EB | E4 EC | E5 ED | E6 EE | E7 EF |
          +-------+-------+-------+-------+-------+-------+-------+-------+
  White    F0 F8 | F1 F9 | F2 FA | F3 FB | F4 FC | F5 FD | F6 FE | F7 FF |
          +-------+-------+-------+-------+-------+-------+-------+-------+

      Examples:

      `0CImproper password!  (sets the foreground color to bright red)
      `FDPaging the sysop... (sets the foreground color to blinking magenta
                              and the background color to white)

  You can use these color codes interchangeably in the .DAT files, but for
  readability, I'd recommend to sticking to just one type of color code
  throughout all of the data files.

  Note you cannot use these codes in QOTD.ANS/.ASC; that file must be pure
  ANSI or ASCII code in order to be displayed properly.

                          -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

VI. CREDITS AND THANKS

  Quote of The Day was developed using Turbo Pascal 7 (RTE200 patched) and
  FKFOSSIL v1.02 under OS/2 Warp 4.52.  The main executable was
  packed using UPX (http://upx.sourceforge.net).

  The door's inital testing was performed on my personal BBS running
  Ezycom v2.15g1 under OS/2 Warp 4.52.

  FKFOSSIL v1.02 (C)1993-1994 Tim Strike and Forbidden Knights Systems.

  "Cheepware" is (C) Sean Dennis.  All rights reserved.

  All other copyrighted/trademarked names used in this documentation
  are property of their respective owners and are used for
  identification purposes only.

  The color code documentation was taken from the Telegard BBS
  documentation written by Tim Strike and Kevin Watkins.  It was
  partially edited by me for use with this door.

  I'd like to thank the following people for their help:

    - My wife, Maura, for putting up with me while I hack away at the
      computer for what seems like endless hours.

    - Trav'ler for the Ezycom DOOR.SYS tip.

    - Steve Winn for reporting the WinXP ANSI problem.

    - Shawn Highfield for the "/LOGOFF" switch idea.

    - All the sysops, users and fellow programmers who have helped me
      learn and understand over the years.  Thank you all for the
      invaluble help and experience.

                          -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

VII. CONTACTING THE AUTHOR

  If you have any comments, suggestions or ideas, I'd love to hear from you.
  If you have a bug report, I need to hear from you.  Please make sure you
  have all the needed details handy for me so I can try to reproduce the
  problem (such as what you were doing when the problem occured, et al.).

  You can contact me via the following ways:

    - Netmail: 1:18/200@Fidonet

    - BBS: telnet://nsbbs.darktech.org

    - Email: nsbbs@hotpop.com

    - IM: ICQ (19965647) - AIM (eekahausmaus) - YM (blue_vinny)

    You can find me in CH-WARE (the official Cheepware support echo),
    DOORGAMES and BBS_CARNIVAL in Fidonet.

 If you'd like more information about Cheepware, you can get it via:

    - WWW: http://nsbbs.darktech.org (click on the Cheepware link)

    - Email FREQ: Send an email to nsbbs@bellsouth.net with the subject of
      FREQ and the message body of FREQ CHEEP - you will receive
      a listing of available Cheepware files within an hour normally.

    - BBS: Just telnet to my BBS and look in my Cheepware file area.

                         -=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 Thank you for using Cheepware.  Support your local BBS scene!

 -- Sean Dennis
    Cheepware Author

<EOF>
