home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / XBBS_118.ZIP / DOCS.ZIP / MENU_118.DOC < prev    next >
Encoding:
Text File  |  1992-03-28  |  7.8 KB  |  182 lines

  1.                 Menufile (.MNU) definition documentation:
  2.  
  3. XBBS contains a seldom used, little tested menu definition language that
  4. allows programming XBBS in somewhat the same manner as a QuickBBS or
  5. clone.  This document attempts to briefly describe the interface.
  6.  
  7. A menu can be invoked one of two ways:  by an .XBS program (see @n in
  8. COMMANDS.DOC), or by including a "MAIN.MNU" in the menu directory, in
  9. which case that menu will be read at startup.
  10.  
  11.  
  12.  Menu format (flat ASCII file, lines terminated with CR/LF):
  13.  
  14.       First line:    Menu ID (not used by XBBS)
  15.       Second line:   Prompt for this menu
  16.       Third line:    Help prompt # in XBBS.TXT (or 0) for this menu
  17.       Fourth line:   Color for prompt this menu
  18.       Fifth line:    Prompt for this entry
  19.       Sixth line:    Key for this entry
  20.       Seventh line:  Action for this entry
  21.       Eighth line:   Security masks for this entry
  22.       Ninth line:    Bitmask for this entry
  23.       Tenth line:    Age mask for this entry
  24.       Eleventh line: Misc data for this entry
  25.       Twelvth line:  Color for this entry
  26.       Thirteenth line...nth line: Repeat from fifth
  27.  
  28.  There can be a maximum of 50 entries per menu
  29.  
  30.  If a line is blank, it must still be included
  31.  
  32.  This sorta-ASCII format should make it easy for anyone to write a menu
  33.  editor or generator even in QuickBASIC or XBASIC.  See XMENU.C and
  34.  XMENU2.C for the real techie info.
  35.  
  36.  
  37.  The first line of a menu file is unused by XBBS:
  38.  
  39. The first line, Menu ID, is not used by XBBS at all.  It might be of
  40. potential interest to anyone writing a menu editor.
  41.  
  42.  The next three lines define data that is "global" for this menu:
  43.  
  44. The second line is the prompt for the menu.  It's displayed after all
  45. the option text is displayed, as you might expect.
  46.  
  47. The third line is the number of a prompt in XBBS.TXT to display when
  48. help is requested.  Make it 0 if you have no help available.
  49.  
  50. The fourth line is the color for the prompt in the second line.  Color
  51. numbers are the same as described in COMMANDS.DOC under @G.
  52.  
  53.  From line five through line twelve we begin a loop that describes each
  54.  individual menu item:
  55.  
  56. The fifth line is the prompt for the first menu item.  If it's blank,
  57. the item will have no associated text.  End it with a semi-colon to get
  58. rid of the trailing CR/LF.
  59.  
  60. The sixth line is the key that invokes the first menu item.  If it's
  61. blank the item will be unselectable.
  62.  
  63. The seventh line is the action number for the first menu item.  If it's
  64. blank, the item is a comment; that is, it causes no action to be taken.
  65.  
  66. The eighth line a series of numbers that indicate the minimum security
  67. levels for the first menu item.  There can be from zero to ten numbers,
  68. separated by spaces, corresponding to the ten security level fields XBBS
  69. maintains for users.  You cannot skip levels (i.e. from security level
  70. field 0 to 8), but you may omit all or some entirely.  The test is
  71. simple; if the user has a security equal or greater to the number given
  72. in the level field, the user has access to the menu item (as long as the
  73. tests in the ninth and tenth lines are passed).
  74.  
  75. The ninth line is a number representing a two-byte bitmask.  For those
  76. of you who don't know what a bitmask is, here's a map (remember a byte
  77. has eight bits):
  78. 0  1  2  3  4   5   6   7    8    9    A     B     C     D     E     F
  79. 1  2  4  8  16  32  64  128  256  512  1024  2048  4096  8192  16384 32768
  80. You can add numbers to get a complete mask.  For instance, if you want
  81. bits 0, 1 and 2, use 7 (1 + 2 + 4).  The bitmask is tested against the
  82. user's flags field.  Again, the test is simple; the user must have any
  83. bits set in his/her flags field that are set in the bitmask in order to
  84. access the menu item.
  85.  
  86. The tenth line is an age test.  If the number here is positive, the user
  87. must be that age or older to get access to the item.  If the number is
  88. negative, the user must be that age or younger to get access.
  89.  
  90. The eleventh line is the "miscellaneous data" field for the first menu
  91. item.  This miscellaneous field is used in different ways be different
  92. actions, and will be described under each action below.
  93.  
  94. The twelvth line is the color for the first menu item, in the same
  95. format as the fourth line above.
  96.  
  97.  Subsequent lines repeat the functionality of lines five through twelve
  98.  above for different menu items.
  99.  
  100.  
  101. Actions:
  102.  
  103. #       Action performed                Miscellaneous data
  104. -       ----------------                ------------------
  105.  
  106. 0       No action performed
  107. 1       Goto another menu               Name of menu file
  108. 2       Gosub another menu              Name of menu file
  109. 3       Read an .XBS program            Name of .XBS file
  110. 4       Read a text file                Name of text file
  111. 5       Change password
  112. 6       Change handle
  113. 7       Change city
  114. 8       Change state
  115. 9       Change phone #1
  116. 10      Change phone #2
  117. 11      Change zipcode
  118. 12      Change screen length
  119. 13      Change screen width
  120. 14      Change computer type
  121. 15      Logoff
  122. 16      Raw directory                   Path<space>type
  123. 17      Invoke Bulls-mode               MSGAREAS.XBS-file<space>type
  124. 18      Invoke Files-mode               FLSEARCH.CTL-file<space>secnum
  125. 19      Invoke Doors-mode               DOORLIST.XBS-file<space>secnum
  126. 20      Named help                      Filename<space>topic
  127. 21      Restart XBBS                    Name of .XBS file
  128. 22      Read any files                  Directory<space>extension<space>type
  129. 23      Read new files                  Directory<space>type
  130. 24      Read messages                   type
  131. 25      Write message                   type
  132. 26      List files.bbs                  FILES.BBS-file<space>type<space>
  133.                                         searchdate<space>searchstring
  134. 27      Upload file                     Name of file
  135. 28      Download file                   Filename<space>type<space>
  136.                                         FLSEARCH.CTL-file<space>proto key
  137. 29      Export FTN packet               Area no.<space>Msg no.<space>type
  138. 30      Read all areas                  MSGAREAS.XBS-file<space>type<space>
  139.                                         new only<space>abort ok<space>
  140.                                         start-at
  141. 31      Hypertext                       filename<space>topic<space>secnum
  142. 32      Toggle graphics mode
  143. 33      Toggle hibit
  144. 34      Toggle screen clearing
  145. 35      Toggle pausing
  146. 36      Toggle special bit
  147. 37      Toggle full screen editor
  148. 38      Change message area             Same as for @M
  149. 39      Change file area                Same as for @F
  150. 40      List msg areas                  MSGAREAS.XBS-file
  151. 41      List file areas                 secnum
  152. 42      Select msg area                 MSGAREAS.XBS-file
  153. 43      Select file area                secnum
  154. 44      Chat request
  155. 45      Toggle twit bit
  156. 46      Toggle expert bit
  157. 47      Save lastread
  158. 48      Load lastread
  159. 49      User list by handle
  160. 50      User list by real name
  161. 51      Restart XBBS                    Menu filename
  162. 52      Spit a quote                    odds<space>filename
  163. 53      Invoke Ijit-mode
  164. 54      Invoke macro-mode
  165. 55      Invoke configure-mode
  166. 56      Invoke Ijit-mode 2
  167. 57      Invoke news-mode                Directory
  168. 58      Invoke library-mode             Directory
  169.  
  170.  These actions invoke external commands; see @E for more info.
  171.  
  172. 201     Spawn program                   Spawnstring
  173. 202     Spawn, always swap              Spawnstring
  174. 203     Spawn, FOSSIL hot               Spawnstring
  175. 204     Spawn, reverse swapping         Spawnstring
  176. 205     Spawn through COMMAND.COM       Spawnstring
  177. 206     Spawn through COMMAND.COM, rev  Spawnstring
  178. 207     Execute program                 Execstring
  179. 208     Errorlevel exit                 Errorlevel
  180.  
  181. 255     Return from a gosub/quit menu
  182.