User Tools

Site Tools


displaycodes

This is an old revision of the document!


How to use Display Codes

Mystic Display Codes are found throughout the BBS in various prompts and display files. The purpose of these codes is to replace the code with a corresponding value for that code. For example, if you wanted to display the user's name, there is a code which when parsed in a prompt or file would be replaced with the current logged in user name.

The format for all codes consists of a starting pipe character (|) followed by two characters which are used to represent what data Mystic will replace the code with. These codes are CASE SENSITIVE although currently almost all codes use upper-cased letters.

An example of an MCI code and how it would be processed by Mystic would be:

   Welcome the BBS, |UH.

In the above example, |UH is the MCI code for the user's handle. If the current user online had a account handle of “Joe User”, then the result of the above example after being processed by Mystic would be:

   Welcome to the BBS, Joe User.

NOTE: Certain display codes require additional data to be provided after the code. These types of codes are used to do many advanced things such as text formatting, changing the way input fields look and work, saving/restoring the remote user's screen, terminal cursor manipulation, all the way through to popping up confirmation windows and performing various other BBS functions.

The additional data required for these types of codes will vary and will be documented specifically within the sections that follow.

Display Code Formatting

Text formatting codes are most often used within the prompts file to create aligned lists of data, for things such as the user list or who's online, etc. These codes, like many other display codes, set up the circumstances in which the display code after it are displayed.

Note: ## should be replaced by the number noted in the description, and must always be two characters.

   $C##  - Centers the value of the next display code with a width of ##
   $D##C - Duplicates character C ## times
   $L##  - Left pad the next display code with spaces to ## characters
   $R##  - Right pad the next display code with spaces to ## characters
   $X##C - Duplicate character C until column ##

   $c##C - Centers the value of the next display with a width of ## using
           character C
           
   $l##C - Left pad the next display code with character <C> to ## characters
   $r##C - Right pad the next display code with character <C> to ## chars

Examples:

      |UN translates to........: "User Name"

      |$R30|UN translates to...: "User Name                     "
      |$C30|UN translates to...: "          User Name           "
      |$L30|UN translates to...: "                     User Name"

      |$D30- translates to.....: "------------------------------"
      |$X30- translates to.....: "------------------------------"

      |UN|$X30. translates to..: "User Name....................."

      |$c30.|UN translates to...: ".........User Name..........."
      |$r30.|UN translates to..: "User Name....................."
      |$l30.|UN translates to..: ".....................User Name"

The difference between $D and $X is that D duplicates a set number of characters, while $X duplicates that character until a certain column is reached. If you use $X30- on column 10, it will create 20 characters so it is dependent on the current location of the cursor.

BBS and User Information Codes

 AG - User's age in years
 AS - User's auto signature (On or Off)
 AV - User's chat availability for user to user chat (Yes or No)
 BD - User's baud rate (returns TELNET or LOCAL) (may be removed)
 BI - User's birthdate in their selected date format
 BN - BBS name from System configuration
 CM - User's full screen node chat setting (On or Off)
 CS - User's total number of calls to the BBS
 CT - User's total number of calls to the BBS today
 DA - Current date in the user's selected date format
 DK - User's total downloads in kilobytes
 DL - User's total number of downloaded files
 DT - User's total number of downloads today
 FB - User's current file base name
 FG - User's current file group name
 FK - User's total uploads in kilobytes 
 FO - User's first call date in their selected date format
 FT - Total number of files in current file base (dynamic)
 FU - User's total number of files uploaded
 HK - User's hotkey setting (On or Off)
 IL - User's node status invisibility (On or Off)
 KT - User's downloads in kilobytes today
 LO - User's last call date in their selected date format
 MB - User's current message base name
 MD - Menu description of the current menu (from menu flags)
 ME - User's total number of e-mails sent
 MG - User's current message group name
 ML - User's lightbar message index setting (On or Off)
 MN - Network address of current message base
 MP - User's total number of message posts
 MT - Total number of messages in current message base (dynamic)
 ND - Current node number
 NE - Minutes until next BBS-type event
 OS - Operating system (Windows, Linux, Raspberry Pi, etc)
 PC - User's current post to calls ratio
 PW - Configured number of days before required password change
 QA - User's selected archive format (QWK, etc)
 QE - User's Generate QWKE setting (Yes or No)
 QL - User's Include QWK file listing setting (Yes or No)
 RD - User's download ratio for their current security level (files)
 RK - User's download ratio for their current security level (kilobytes)
 SB - User's max allowed minutes in time bank for current security level
 SC - User's max calls per day allowed for current security level
 SD - User's current security level description
 SK - User's max allowed download kilobytes per day for current sec level
 SL - User's current security level number
 SN - Configured Sysop name
 SP - Configured post call ratio for the current security level
 ST - Configured allowed minutes per day for current security level
 SX - User's max allowed downloaded files per day for current security level
 TB - User's timebank minutes
 TC - Total number of calls to the BBS system
 TE - User's terminal emulation (Ansi or Ascii)
 TI - Current time of day in 12 hour format
 TL - User's time left in minutes
 TO - User's time spent online this session (in minutes)
 U# - User's number (aka permanent user index)
 U1 - User's optional data answer for question #1
 U2 - User's optional data answer for question #1
 U3 - User's optional data answer for question #1
 UA - User's address
 UB - User's file listing type (Normal or Lightbar)
 UC - User's city, state
 UD - User's data phone number
 UE - User's message editor type (Line, Full, or Ask)
 UF - User's Date input format (MM/DD/YY, DD/MM/YY, YY/DD/MM)
 UG - User's gender (Male or Female)
 UH - User's handle (alias)
 UI - User's User information field
 UJ - User's message reader type (Normal or Lightbar)
 UK - User's email address
 UL - User's selected theme description
 UM - User's lightbar message index setting (On of Off)
 UN - User's real name
 UP - User's Home phone number
 UQ - User's full screen editor quote mode (Standard or Lightbar)
 US - User's screen size lines (ie 25)
 UX - User's computer/router/internet host name
 UY - User's IP address
 UZ - User's zip (postal) code  
 VR - Mystic BBS version number
 XD - Days left before the user's account expires (or 0 if none)
 XS - Security level in which the user's account will expire to
 

Color Codes (Pipe Colors)

The typical pipe format of <pipe>## where ## is one of the following:

Setting Foreground color:

 00 : Sets the current foreground to Black
 01 : Sets the current foreground to Dark Blue
 02 : Sets the current foreground to Dark Green
 03 : Sets the current foreground to Dark Cyan
 04 : Sets the current foreground to Dark Red
 05 : Sets the current foreground to Dark Magenta
 06 : Sets the current foreground to Brown
 07 : Sets the current foreground to Grey
 08 : Sets the current foreground to Dark Grey
 09 : Sets the current foreground to Light Blue
 10 : Sets the current foreground to Light Green
 11 : Sets the current foreground to Light Cyan
 12 : Sets the current foreground to Light Red
 13 : Sets the current foreground to Light Magenta
 14 : Sets the current foreground to Yellow
 15 : Sets the current foreground to White

Setting Background color:

 16 : Sets the current background to Black
 17 : Sets the current background to Blue
 18 : Sets the current background to Green
 19 : Sets the current background to Cyan
 20 : Sets the current background to Red
 21 : Sets the current background to Magenta
 22 : Sets the current background to Brown
 23 : Sets the current background to Grey

Depending on the terminal the 24-31 codes can have different results. Some terminals will use what is often referred to as “ICE colors” which are the non-blinking brighter backgrounds. Others may use blinking foreground text instead.

TERMINALS THAT USE BRIGHT BACKGROUNDS (ICE COLORS):

 24 : Sets the current background to Dark Grey
 25 : Sets the current background to Light Blue
 26 : Sets the current background to Light Green
 27 : Sets the current background to Light Cyan
 28 : Sets the current background to Light Red
 29 : Sets the current background to Light Magenta
 30 : Sets the current background to light Yellow
 31 : Sets the current background to light White

TERMINALS THAT USE BLINKING:

 24 : Sets the current background to black with blinking foreground
 25 : Sets the current background to blue with blinking foreground
 26 : Sets the current background to green with blinking foreground
 27 : Sets the current background to cyan with blinking foreground
 28 : Sets the current background to red with blinking foreground
 29 : Sets the current background to magenta with blinking foreground
 30 : Sets the current background to brown with blinking foreground
 31 : Sets the current background to grey with blinking foreground

Each Theme in Mystic BBS can also have a set of custom colors configured specifically for that theme. These can be accessed by using the following codes:

 T1 : Sets current color to theme's color #1
 T2 : Sets current color to theme's color #2
 T3 : Sets current color to theme's color #3
 T4 : Sets current color to theme's color #4
 T5 : Sets current color to theme's color #5
 T6 : Sets current color to theme's color #6
 T7 : Sets current color to theme's color #7
 T8 : Sets current color to theme's color #8
 T9 : Sets current color to theme's color #9
 T0 : Sets current color to theme's color #0

Screen/Cursor Related Codes

The following codes found in this section are used to manipulate the cursor location and/or various other terminal specific codes. The majority of these codes will require that the user has an ANSI-BBS capable terminal or better. Mystic will simply filter out codes that require ANSI and do nothing when they are encountered if the user does not have a capable terminal.

Note: ## should be replaced by the number noted in the description, and must always be two characters. For example, to move to column 1 on the current line you would use “|[X01” (without the quotation marks, of course).

 [A## - Move the cursor up ## lines
 [B## - Move the cursor down ## lines
 [C## - Move the cursor forward (to the right) ## columns
 [D## - Move the cursor backwards (to the left) ## columns
 [K   - Clear from the current cursor position to the end of the line
 [L   - Move cursor and erase data backwards from current column to column ##
 [X## - Move cursor to X coordinate ##
 [Y## - Move cursor to Y coordinate ##
 BS   - Sends 1 destructive backspace sequence (ASCII 8-32-8)
 CL   - Clears the screen (ANSI 1,1 locate and [2J or ASCII 12)
 CR   - Send a carrage return and line feed (move to next line)
 RA   - Restore the saved text attribute color
 RS   - Restore the saved user's terminal screen
 SA   - Save the current text attribute color
 SS   - Save the entire user's terminal screen
 

Input Field Manipulation Codes

Input field codes affect the next input field of its type, and are generally used in prompts that are displayed to the user prior to asking the user for input.

   -N   - Forces the next Yes/No prompt to default to a No answer
   -Y   - Forces the next Yes/No prompt to default to a Yes answer
   IF   - Turns off the input field background color for the next input
          prompt.
   IN## - Sets the scrolling input field size for the next input prompt to
          ## characters.  If the maximum size of the input field is larger
          than this, Mystic will scroll the text inside so that it can
          accept more characters without taking up more than ## columns on
          the screen.
   IS## - Limits the actual maximum number of characters allow for an
          input prompt to ## characters.

Text Box Codes

Text Box codes are used to pop up a quick notification box, using the configured ANSI box style which is configured in each theme.

In addition to just displaying a box, Mystic is able to use its remote screen imaging to save what the user's screen looks like before displaying the box, and then restore the user's screen after the box is closed. This screen restoration prevents the user's screen from being “corrupted” regardless of what they are doing when the box is displayed.

User and BBS data MCI codes, along with pipe color codes can be used within these boxes!

#B<header>#<notification>#

       The #B code opens a notification box with a <header> and <notification>
       string, following by an "OK" prompt for the user to press a key.  After
       the user pressed a key, Mystic will automatically restore the user's
       original screen content that was overwritten by the box.

       Example:

         |#BThis is a header#This is a test notification box!#

#I<header>#<notification>#

       This box is similar to the #B notification, except that it does not
       restore the user's screen content after displaying, and it does not
       wait for the user to press a key.  One use for this might be during
       a new message scan "Scanning" prompt, for example.
       
       Example:
       
         |#INew Message Scan#Scanning: |&1...#

Miscellaneous Codes

This section contains codes that are the special snowflakes of Mystic BBS! They do not fit well into any of the other categories of codes, so they find a home here. While they may be different, it does not mean that they're any less capable!

 AO   - Used in display files to disable aborting of the display file
 BE   - Sends a ^G character (causes some but not all terminals to beep)
 DE   - Delay for half a second
 PA   - Send the pause prompt and wait for a key to be pressed
 PB   - Purge the current input buffer
 PI   - Display a pipe symbol (|)
 PN   - Wait for a key to be pressed without prompting
 PO   - Used in display files to disable pausing for that display file
 QO   - Replaced with a randomly generated Quote of the Day
 RP## - Sets the internal screen pause line counter to ##
 XX   - Returns no value.  Seriously.  None.
 DF<file>| - Send display file <file>.  Note the trailing pipe code which must be
             used if there is any text to be parsed after the DF code is encountered.
             Example: |DFmyansi|
 DI## - Sets the baud rate emulation of the current display file, using the
        following scale:

          00      = No baud emulation (full speed)
          01 - 09 = 300 baud
          10 - 19 = 1200 baud
          20 - 29 = 2400 baud
          30 - 39 = 4800 baud
          40 - 49 = 9600 baud
          50 - 59 = 19200 baud
          60 - 69 = 28800 baud
          70 - 79 = 38460 baud
          80 - 89 = 57600 baud
          90 - 99 = 115200 baud

Prompt Information Codes

Prompt Information codes are used within the prompts found in a theme's prompt file. The value of each Prompt Information Code is dynamic, meaning it's value changes depending on each specific prompt.

The prompt editor and the prompt file itself will have comments that show what each code translates to for that particular prompt. For an example, lets look at prompt #334:

   ; &1 = Current message number  &2 = Total messages
   334 Jump to which message? (1-|&2):

In this prompt, |&1 is replaced by the current message number, and |&2 is replaced by the total number of messages in the message base. These values are noted in the comments for that particular prompt in both the prompt editor and the text-based prompt file itself.

Prompt Information codes can range from |&0-|&9, and from |&A-|&Z

Screen Info Codes (Depreciated)

Screen Info codes follow the format of |!# where # is a number between 0 and 9. These codes are found in the old style of ANSI templates used within various “full screen ANSI” functions of Mystic BBS, and they are used to define screen location and attributes used within that specific function.

These codes are not going to be documented here, as they have been depreciated. Each template that uses these types of codes is slowly being removed in favor of the “newer” style of template, which uses an .INI file to define screen locations, attributes, prompts, and other options specific to that BBS function.

displaycodes.1458720630.txt.gz · Last modified: 2016/03/23 03:10 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki