home *** CD-ROM | disk | FTP | other *** search
- Menufile (.MNU) definition documentation:
-
- XBBS contains a seldom used, little tested menu definition language that
- allows programming XBBS in somewhat the same manner as a QuickBBS or
- clone. This document attempts to briefly describe the interface.
-
- A menu can be invoked one of two ways: by an .XBS program (see @n in
- COMMANDS.DOC), or by including a "MAIN.MNU" in the menu directory, in
- which case that menu will be read at startup.
-
-
- Menu format (flat ASCII file, lines terminated with CR/LF):
-
- First line: Menu ID (not used by XBBS)
- Second line: Prompt for this menu
- Third line: Help prompt # in XBBS.TXT (or 0) for this menu
- Fourth line: Color for prompt this menu
- Fifth line: Prompt for this entry
- Sixth line: Key for this entry
- Seventh line: Action for this entry
- Eighth line: Security masks for this entry
- Ninth line: Bitmask for this entry
- Tenth line: Age mask for this entry
- Eleventh line: Misc data for this entry
- Twelvth line: Color for this entry
- Thirteenth line...nth line: Repeat from fifth
-
- There can be a maximum of 50 entries per menu
-
- If a line is blank, it must still be included
-
- This sorta-ASCII format should make it easy for anyone to write a menu
- editor or generator even in QuickBASIC or XBASIC. See XMENU.C and
- XMENU2.C for the real techie info.
-
-
- The first line of a menu file is unused by XBBS:
-
- The first line, Menu ID, is not used by XBBS at all. It might be of
- potential interest to anyone writing a menu editor.
-
- The next three lines define data that is "global" for this menu:
-
- The second line is the prompt for the menu. It's displayed after all
- the option text is displayed, as you might expect.
-
- The third line is the number of a prompt in XBBS.TXT to display when
- help is requested. Make it 0 if you have no help available.
-
- The fourth line is the color for the prompt in the second line. Color
- numbers are the same as described in COMMANDS.DOC under @G.
-
- From line five through line twelve we begin a loop that describes each
- individual menu item:
-
- The fifth line is the prompt for the first menu item. If it's blank,
- the item will have no associated text. End it with a semi-colon to get
- rid of the trailing CR/LF.
-
- The sixth line is the key that invokes the first menu item. If it's
- blank the item will be unselectable.
-
- The seventh line is the action number for the first menu item. If it's
- blank, the item is a comment; that is, it causes no action to be taken.
-
- The eighth line a series of numbers that indicate the minimum security
- levels for the first menu item. There can be from zero to ten numbers,
- separated by spaces, corresponding to the ten security level fields XBBS
- maintains for users. You cannot skip levels (i.e. from security level
- field 0 to 8), but you may omit all or some entirely. The test is
- simple; if the user has a security equal or greater to the number given
- in the level field, the user has access to the menu item (as long as the
- tests in the ninth and tenth lines are passed).
-
- The ninth line is a number representing a two-byte bitmask. For those
- of you who don't know what a bitmask is, here's a map (remember a byte
- has eight bits):
- 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
- You can add numbers to get a complete mask. For instance, if you want
- bits 0, 1 and 2, use 7 (1 + 2 + 4). The bitmask is tested against the
- user's flags field. Again, the test is simple; the user must have any
- bits set in his/her flags field that are set in the bitmask in order to
- access the menu item.
-
- The tenth line is an age test. If the number here is positive, the user
- must be that age or older to get access to the item. If the number is
- negative, the user must be that age or younger to get access.
-
- The eleventh line is the "miscellaneous data" field for the first menu
- item. This miscellaneous field is used in different ways be different
- actions, and will be described under each action below.
-
- The twelvth line is the color for the first menu item, in the same
- format as the fourth line above.
-
- Subsequent lines repeat the functionality of lines five through twelve
- above for different menu items.
-
-
- Actions:
-
- # Action performed Miscellaneous data
- - ---------------- ------------------
-
- 0 No action performed
- 1 Goto another menu Name of menu file
- 2 Gosub another menu Name of menu file
- 3 Read an .XBS program Name of .XBS file
- 4 Read a text file Name of text file
- 5 Change password
- 6 Change handle
- 7 Change city
- 8 Change state
- 9 Change phone #1
- 10 Change phone #2
- 11 Change zipcode
- 12 Change screen length
- 13 Change screen width
- 14 Change computer type
- 15 Logoff
- 16 Raw directory Path<space>type
- 17 Invoke Bulls-mode MSGAREAS.XBS-file<space>type
- 18 Invoke Files-mode FLSEARCH.CTL-file<space>secnum
- 19 Invoke Doors-mode DOORLIST.XBS-file<space>secnum
- 20 Named help Filename<space>topic
- 21 Restart XBBS Name of .XBS file
- 22 Read any files Directory<space>extension<space>type
- 23 Read new files Directory<space>type
- 24 Read messages type
- 25 Write message type
- 26 List files.bbs FILES.BBS-file<space>type<space>
- searchdate<space>searchstring
- 27 Upload file Name of file
- 28 Download file Filename<space>type<space>
- FLSEARCH.CTL-file<space>proto key
- 29 Export FTN packet Area no.<space>Msg no.<space>type
- 30 Read all areas MSGAREAS.XBS-file<space>type<space>
- new only<space>abort ok<space>
- start-at
- 31 Hypertext filename<space>topic<space>secnum
- 32 Toggle graphics mode
- 33 Toggle hibit
- 34 Toggle screen clearing
- 35 Toggle pausing
- 36 Toggle special bit
- 37 Toggle full screen editor
- 38 Change message area Same as for @M
- 39 Change file area Same as for @F
- 40 List msg areas MSGAREAS.XBS-file
- 41 List file areas secnum
- 42 Select msg area MSGAREAS.XBS-file
- 43 Select file area secnum
- 44 Chat request
- 45 Toggle twit bit
- 46 Toggle expert bit
- 47 Save lastread
- 48 Load lastread
- 49 User list by handle
- 50 User list by real name
- 51 Restart XBBS Menu filename
- 52 Spit a quote odds<space>filename
- 53 Invoke Ijit-mode
- 54 Invoke macro-mode
- 55 Invoke configure-mode
- 56 Invoke Ijit-mode 2
- 57 Invoke news-mode Directory
- 58 Invoke library-mode Directory
-
- These actions invoke external commands; see @E for more info.
-
- 201 Spawn program Spawnstring
- 202 Spawn, always swap Spawnstring
- 203 Spawn, FOSSIL hot Spawnstring
- 204 Spawn, reverse swapping Spawnstring
- 205 Spawn through COMMAND.COM Spawnstring
- 206 Spawn through COMMAND.COM, rev Spawnstring
- 207 Execute program Execstring
- 208 Errorlevel exit Errorlevel
-
- 255 Return from a gosub/quit menu
-