home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
comm
/
bbs
/
4d-bbsdemo
/
docs
/
text
/
08.menus
< prev
next >
Wrap
Text File
|
1993-12-28
|
29KB
|
854 lines
Chapter 8:
Menus and Menu Commands
8.1.1 Overview
The menus are the heart of the BBS. They direct the user around the BBS,
and act as a guide. Whether the menus are simple and plain, or complicated
and fancy, the SsyOp has complete control over every aspect of the menus.
This is a powerful feature enabling the SsyOp to personalize and create a
BBS which is very unique.
8.2.1 Menu Formats
All menu files are plain ascii files located in the MENU: directory.
Editing and creating menus should be done with a text editor like MEMACS,
or QED.
The first line of the menu file should be the help file for the menu. This
filename is appended either a .ASCII or .ANSI automatically by the BBS,
depending on the on-line user's mode.
The second line is the prompt for the menu. This can include EIC codes and
color codes. If color codes are encountered and the user is in ASCII mode,
they will simply be ingnored. Max of 80 characters.
The third line is the type of entry for the menu, and they are listed
below.
Type Description
0 Hotkey-User Enters one character without enerting return.
#>0 User can enter UP TO # characters, and must hit return at end.
IE: 10 means the user can enter up to 10 characters.
# The number sign means that a user can enter one character without/
having to hit return, but can enter up to a 3 digit number and must
hit return. This is must often used in a menu to allow the user to
enter hot keys, and full numbers (ie: in a message bases menu to
change sections.
-1 No user entry for this menu, and the first command will be executed
automatically, irrelevant of the keypress code. If the second, third
and so on commands also have the same keypress, they will be executed
also. This mode is designed for Command Menus. (see 8.4.2)
From the fourth line on, each line represents one function. Everything on
the line before the : represents the keypress for that function, the : is
the seperator, everything on the right side of the colon is assumed to be
the command. The command can be split up into one to four parts seperated
by spaces.
If a keystroke has more characters than alotted in line three, the function
WILL NOT be accessible by the user. Multiple lines CAN HAVE the same
keystroke, and all lines will be executed BUT they must ALL be consecutive
lines in the menu file.
An example line would be:
p:p p 0
This means the keystroke is a single p, and the command is :p with
parameters of p 0. An example of multiple lines would be:
o:2 TEXT:LOGOFF.TXT
o:0 q
This would display the file "TEXT:LOGOFF.TXT" to the user, then do a quick
logoff. The following would NOT execute the third line:
o:2 TEXT:LOGOFF.TXT
o:2 TEXT:LEAVE.TXT
p:p p 0
o:0 q
In this example, the BBS would execute the first two commands, but upon
seeing that p (line 4) is different from the o (line 2) the BBS would
return to the prompt, and NOT execute the fourth line.
8.2.2 Layouts
4D-BBS uses menu locks to control user access to menus. These menu locks
can be unique to each user, and are system specific. When designing your
menus, it is best to first list all menus which you will be using, and give
a unique lock to each menu. If some menus are similar in function, you can
give the same lock to them, to cut down on the number of menu locks used.
See Section 8.5.1 for more information.
There are two types of menu layouts which can be used. The first is a
hirechy method which means a menu is called, and when finished, the calling
menu regains control. You can stack menus in this method up to 16 times,
so keep this in mind when designing your menus.
The second method is a basic goto or jump. In this method, the calling
menu is NOT remembered. This is ideal if you wish to setup a maze or
setting type BBS since menus do not have to be remembered.
Below is two examples of menus:
Main Menu
________________|___________________
| | |
Message Bases File Transfers Game Room
|
Electronic Mail
In the above setting, a user starts out at the main menu, an can go to one
of the three menus. If they choose the message bases, they can not go into
the game room unless they exit the message bases and go back to the main
menu. If they are in the file transfers, and want to go to electronic
mail, they must go to the main menu, then the message bases, then finally
to electronic mail.
+- Main Menu -+
/ | \
Message Bases +---------+------------+- Game Room
| \ | /
E-Mail +- File Transfers -+
In the above example, A user can jump from any section they wish to, to
another section EXCEPT for the E-Mail section. To go to or from the E-Mail
section, they must go through the Message Bases.
Remember the two above examples are ONLY examples, and the SYSOP can setup
the BBS using one of them, a combination, or design their own layout.
8.2.3 Menu Move Commands
The 0 and 1 menu command cover most basic menu move operations. They are:
Command Description
0 e Exits the current menu, and returs to the calling menu. Can
Only be used if the calling menu used the 1 command.
0 M Returns to the main menu and clears all hierachy stacks.
0 * NAME Enters a new menu WITHOUT saving the previous menu. The * is
the lock for the new menu. The new menu does NOT know who the
calling menu was.
1 * Name Enter a name menu saving the previous menu. The * is the lock
for the new menu. The new menu DOES know who the calling menu
is and can use the 0 e command to return to the calling menu.
The two basic commands for moving between menus can be mixed (as in the
second example of section 8.2.2, but caution should be exercised when doing
so. A loop like this can cause stack limit problems:
Menu --+
| |
Sub-Menu |
| |
Sub-Menu2 -+
If a jump was used to go from sub-menu 2 back to menu, the stack would not
be cleared. Doing this two many times would bring upon a maximum sub-menus
encountered error to the user.
8.3.1 Menu Commands
When a user hits a key in a menu, the BBS will scan the menu file, to see
if any matching keypresses are found. If none are found, and the menu is
in kotkey mode, nothing will happen, and the BBS will get another
character. If the menu is multi-character input and the BBS does not find
a match, it will display "Unknown menu function" and redisplay the prompt.
If the BBS does find a match, it will execute the command after the : in
the line, and then check to see if the next line is the same. If it is,
then that line will also be executed, and this cycle is continued until
either a match is not found, or the last command is executed.
Once a command is finished the BBS displays the prompt again, and starts
this process all over again. If the command which was executed goes to
another menu, this process is continued on THAT menu. If the command logs
the user off, the process of course, stops.
8.4.1 Types of Menu
Currently there are four types of menus which you can setup. These four
types of menus are command menus, personal menus, access menus, and
default menus.
8.4.2 Command Menus
A command menu is a menu that directly executes the first command without
displaying the logon/stats screen, or bulletins. An example of using
this type of menu would be if you wanted to spawn a serial based program
when a certain account logged on. UUCP's UUCICO could be used this way.
The format for this type of menu is the "Cmd." plus the account name
plus ".menu". So, if you were running UUCP, and your feeds logon account
was called UUCP, you would make a menu called Cmd.UUCP.Menu, which is a
normal menu, with the first command as "a:4 UUCICO" and the second command
as "a:q". Although the keypress for the commands are irelavant, they MUST
be the same.
8.4.3 Personal Menus
A personal menu is the same as a