TBBS23M32B.exe.x/TBBS23M32B.IMA.x/SAMPLE1/MENU.SDL

11 KB 23d84bec832a925a…
;
; SDL Source Code for Sample TBBS System
;
; To accompany the tutorial found in the Understanding How it Works
; Guide, part of TBBS Version 2.3.
;
; This SDL source code is released for unlimited use by any licensed
; TBBS sysop.
;
;
Include: PATHS.SDL
;
;
; ------------------------------------------------------------------------
; MACRO DEFINITIONS
; ------------------------------------------------------------------------
; The following are definitions of SDL macros which are used to create the
; sample menus that are used in the TBBS Version 2.3 tutorial.  Macros
; are employed to make the creation of menu simpler and easier.  Many word
; processors use macros to make it easier to perform redundant operations.
; Similarly, whenever you have items that you use over and over again in
; your TBBS menus, SDL macros can be used to make it easier for you to
; create those redundant parts of the menus.
;
; Macro definitions begin with a MACRO: directive, and end with an
; ENDMACRO: directive.  Some of these macros are designed to accept
; parameters, which allow you to pass information to the macro for use
; within the macro itself.  This allows macros to have different displays
; or behavior when used in different places.
;
;
;
;
;
; Macro "IDENT" which is used to identify the BBS and menu name.
; The BBS name is hard-coded, while the menu name is passed as a
; parameter.
;
MACRO: IDENT
ENTRY:
^L%X0E%Your Sample BBS
KEY=?
ENTRY:
%X0A%%1

KEY=?
ENDMACRO:
;
;
;
;
;
; Macro "ITEM" which is used to create individual menu entries within
; all menus.  All elements are passed as parameters.  The parameters are:
;       %1  The hot-key assignment for the entry
;       %2  The text of the entry
;       %3  The command type (TBBS menu command)
;       %4  The privilege level required
;       %5  The access flag assignments (if any)
;       %6  The opt data (information passed to the entry)
;
MACRO: ITEM
ENTRY:
%X0E%[%X0A%%1%X0E%] %X0B%%2
KEY=%1
TYPE=%3
PRIV=%4
%5
OPT DATA=%6
ENDMACRO:
;
;
;
;
; Macro "TEXTONLY" is used to insert a space between two menu entries for visual
; appeal.  It can also be used with a parameter to place text in the middle
; of a menu.
;
MACRO: TEXTONLY
ENTRY:
%X0E%%1
KEY=?
ENDMACRO:
;
;
;
;
;
; ------------------------------------------------------------------------
; MENU DEFINITIONS
; ------------------------------------------------------------------------
; The remainder of this SDL source code are the definitions used to make
; the menus used on the sample system.  If you want to add or remove
; menu entries, you can do so easily here.
;
; Entire menus begin with a MENU: directive, and end with an ENDMENU:
; directive.  Everything within those directives is considered part of
; that menu -- the menu entries that make up the menu.
;
; To delete a menu entry, find the menu you want and simply delete the
; macro call to macro "ITEM" for the entry that corresponds to the one
; you want to delete.
;
; To add a menu entry, simply add a new macro call to the macro "ITEM"
; and use the existing menu entries as examples to copy and modify.  Make
; sure you put the new menu entry in the correct menu.
;
; To delete an entire menu, delete the definition for that menu and all the
; menu entries (calls the "ITEM" macro) associated with it.
;
; To add an entire menu, create a new menu definition, using the existing
; ones as examples.  Then add as many "ITEM" macro calls as you wish to
; add entries to the menu.
;
;
;
;
;
; Menu "0000".  This is the TBBS top level menu.  IMPORTANT!!!  THE 0000
; MENU MUST ALWAYS EXIST!!!  You can change this menu, but DO NOT DELETE
; IT!
;
; This menu provides two functions as setup currently:  a new user
; survey, which is shown to callers who have not called your system
; before, and then to pass them (new and existing users alike) to your
; menu named "MAIN".
;
; These functions are provided with "auto-executing" menu entries, entries
; that run automatically without the user having to press a key.  The part
; of the menu entries that says "KEY=^@" makes the entry auto-executing.
; Had a single key, such as a letter or number, been used for the KEY= part,
; the entry would no longer be auto-executing.
;
; REMEMBER!  DO NOT DELETE THIS MENU!
;
MENU: 0000

ENTRY:
A1=.-------  KEY=^@  TYPE=32   OPT DATA=REGISTER

ENTRY:
KEY=^@  TYPE=35   OPT DATA=MAIN

ENDMENU:
;
;
;
;
;
;
;
; Menu "MAIN".  This is the first menu people actually SEE visually on
; your BBS.
;
MENU: MAIN
;
; The following is a call to the "IDENT" macro.  This forms a top
; title for the menu.  You pass a parameter to the "IDENT" macro which
; passes the name of the menu to the macro.
;
@IDENT(Main Menu)
;
; The following are calls to the "ITEM" macro.  These macro calls are
; what places menu entries inside the menu.
;
@ITEM(M, Message Areas, 5, 0, , MSGM)
@ITEM(F, File Areas, 5, 0, , FILE)
@ITEM(N, News and Information, 2, 0, , @TBBSPATH+\TEXT\NEWS)
@ITEM(U, Utilities, 5, 0, , UTIL)
@ITEM(P, Participate in User Poll, 32, 0, A1=-.------ , VOTING)
@ITEM(P, User Poll Results, 33, 0, A1=-X------, VOTING)
@ITEM(C, User-to-User Chat, 52, 0, , "CHITCHAT /A/NI/T/D/C:0E,0B,0A")
@ITEM(I, Information About Our BBS Software - TBBS, 2, 0, , @TBBSPATH+\TEXT\INFO)
@ITEM(!, Sysop Only Menu, 5, 255, , SYS)
@TEXTONLY()
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
; Menu "MSGM".  This menu is the main message area selection menu that
; allows you to select the message areas you want to participate in.
;
MENU: MSGM
@IDENT(Message Areas)
@ITEM(1, Private E-Mail Area, 5, 0, , MSG1)
@ITEM(2, General Messages, 5, 0, , MSG2)
@ITEM(3, Technical Discussion Area, 5, 0, , MSG3)
@ITEM(4, The Lounge for Light Discussion, 5, 0, , MSG4)
@ITEM(5, Want Ads - Buy and Sell, 5, 0, , MSG5)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
; The following menus, MSG1, MSG2, MSG3, MSG4, and MSG5, are individual
; menus for the various message areas -- one each for each message area.
;
MENU: MSG1
@IDENT(Private E-Mail Area)
@ITEM(R, Read Messages, 6, 0, , Private E-Mail)
@ITEM(E, Enter a Message, 7, 0, , Private E-Mail)
@ITEM(D, Delete a Message, 9, 0, , Private E-Mail)
@ITEM(S, Scan Messages, 8, 0, , Private E-Mail)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
MENU: MSG2
@IDENT(General Messages Area)
@ITEM(R, Read Messages, 6, 0, , General Messages)
@ITEM(E, Enter a Message, 7, 0, , General Messages)
@ITEM(D, Delete a Message, 9, 0, , General Messages)
@ITEM(S, Scan Messages, 8, 0, , General Messages)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
MENU: MSG3
@IDENT(Technical Discussion Area)
@ITEM(R, Read Messages, 6, 0, , Technical Area)
@ITEM(E, Enter a Message, 7, 0, , Technical Area)
@ITEM(D, Delete a Message, 9, 0, , Technical Area)
@ITEM(S, Scan Messages, 8, 0, , Technical Area)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
MENU: MSG4
@IDENT(The Lounge Area - For Light Discussion)
@ITEM(R, Read Messages, 6, 0, , The Lounge)
@ITEM(E, Enter a Message, 7, 0, , The Lounge)
@ITEM(D, Delete a Message, 9, 0, , The Lounge)
@ITEM(S, Scan Messages, 8, 0, , The Lounge)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
MENU: MSG5
@IDENT(Want Ads Area - Buy and Sell)
@ITEM(R, Read Messages, 6, 0, , Want Ads)
@ITEM(E, Enter a Message, 7, 0, , Want Ads)
@ITEM(D, Delete a Message, 9, 0, , Want Ads)
@ITEM(S, Scan Messages, 8, 0, , Want Ads)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
;
;
; Menu "FILE".  This menu allows access to a sample files area to provide
; upload and download services.
;
MENU: FILE
@IDENT(File Areas)
@ITEM(A, Access File Download Section, 4, 0, , @TBBSPATH+\FILE\AREAS /TL/D/F/NC/LO/AS)
@ITEM(U, Upload a New File, 47, 0, , @TBBSPATH+\FILE\UPLOADS\LIST /F)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
;
; Menu "BYE".  This menu is where someone is taken when they want to logoff
; the system.  It allows them the opportunity to leave a message for the
; sysop (that's you!) before they logoff.
;
MENU: BYE
@IDENT(Goodbye Menu)
@TEXTONLY(You are about to logoff the BBS entirely!)
@TEXTONLY(Please select from the following choices...)
@TEXTONLY()
@ITEM(G, Say goodbye and logoff immediately, 10, 0, , )
@ITEM(L, Leave the sysop a message, 7, 0, , MSG TO SYSOP)
@ITEM(B, Go back!  I didn't mean to say goodbye!, 12, 0, , 1)
ENDMENU:
;
;
;
;
;
;
; Menu "UTIL".  This is an assortment of functions that make-up a
; miscellaneous menu...things like password changes, etc.
;
MENU: UTIL
@IDENT(Utilities)
@ITEM(T, Change Terminal Configuration and User Settings, 31, 0, ,)
@ITEM(I, Status Info Display, 1, 0, , USERSTAT.TXT)
@ITEM(D, Display Time Parameters, 11, 0, ,)
@ITEM(M, Messages Waiting for You, 15, 0, ,)
@ITEM(R, Reset Last Read Message Pointers, 16, 0, ,)
@ITEM(C, Last 127 Callers to the BBS, 22, 0, ,)
@ITEM(S, Chat With the Sysop, 23, 0, ,)
@ITEM(P, Change Logon Password, 25, 0, ,)
@ITEM(W, Who is Online on the BBS Now, 50, 0, ,)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
; Menu "SYS".  This is a sysop-only menu.  Currently there is only one
; relatively unimportant function provided here to avoid potential security
; problems while you're still learning and developing your TBBS system.
;
MENU: SYS
@IDENT(Sysop Menu)
@ITEM(C, Combined Message Access -- All Message Areas Together, 5, 0, , COMB)
@ITEM(S, Select/Deselect Areas for Combined Access, 24, 0, , )
@ITEM(F, File Area Maintenance, 14, 255, , @TBBSPATH+\FILE\AREAS /TL/D/F/NC/LO/AS)
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU:
;
;
;
;
;
;
; Menu "COMB".  This menu offers "combined" access to message areas.  This
; type of access can certainly be used by regular, non-sysop users, but
; is general of greater interest to sysops.
;
MENU: COMB
@IDENT(Combined Message Access)
@ITEM(R, Read Messages, 6, 0, , )
@ITEM(E, Enter a Message, 7, 0, , )
@ITEM(D, Delete a Message, 9, 0, , )
@ITEM(S, Scan Messages, 8, 0, , )
@TEXTONLY()
@ITEM(0, Return to Main Menu, 12, 0, , 0)
@ITEM(-, Return to Previous Menu, 12, 0, , 1)
@ITEM(G, Goodbye, 5, 0, , BYE)
ENDMENU: