This is an old revision of the document!
Table of Contents
Text Variables
MBBSEmu / MajorBBS have several text variables that you can embed into menus or text blocks. A text variable is a field that your systems fills automatically every time it is output to a user – for example, if you use the text variable DATE
to stand for today's date, users always will see the current date in that field. This sections tells you how to use a text variable and what text variables are available with the basic platform for MBBSEmu.
(Note: Text Variables in menus currently supported, text blocks in .msg file blocks support coming soon)
Using BBSDRAW.EXE
To embed a text variable using BBSDRAW, move to where you want the left end of the item to be and hit <Alt-V>
. Then enter the name of the text variable and choose justification – <Spacebar>
toggles these options:
None
= value is displayed with no truncation or blank paddingLeft
= value is displayed on the left with extra blanks on the right if it is shorter then the format length; value is chopped off on the right if it is too longRight
= value is displayed on the right with blank padding on the leftCenter
= value is displayed in the center for the field with spaces around it
Then you choose format length, which is applicable only if Justification
is Left
, Right
, or Center
. Text variables are visible on the BBSDRAW screen. They show up with the name of the text variable in them and asterisks (*) surrounding the name. To edit a text variable, point to it and hit <Alt-V>
again. To delete a text variable, point to it and hit <Alt-Z>
.
Using Notepad++
Notepad++ can be used to embed Text Variables into your existing ANSI menus.
First let's break down the basic format of a Text Variable in MBBSEmu / MajorBBS:
<SOH><JUSTIFICATION><PADDING><TEXT_VARIABLE_NAME><SOH>
- (1 Byte)
SOH
= ASCII Byte 0x1 or “Start of Header” - (1 Byte)
JUSTIFICATION
- N = None, and will ignore padding value
- C = Center
- L = Left
- R = Right
- (1 Byte)
PADDING
= ASCII value that represents the # of characters to pad- # of spaces to pad is ASCII value of character minus 32
- Example 1:
*
ASCII value is 42, subtract 32 = 10 character padding - Example 2:
4
ASCII value is 52, subtract 32 = 20 character padding - Example 3:
9
ASCII value is 57, subtract 32 = 25 character padding - If the padding # is greater then the length of the replaced text variable it will be ignored
- (X Bytes)
NAME_OF_TEXT_VARIABLE
- (1 Byte)
SOH
= ASCII Byte 0x1 or “Start of Header”
Example in Notepad++:
To add a Text Variable you will need
Text Variable List
Text Variable | Description |
---|---|
DATE | Current Date |
TIME | Current Time |
CHANNEL | Channel Number |
SYSTEM_NAME | appsettings.json config option BBSTitle |
SYSTEM_COMPANY | Internal Value “MBBSEmu” |
SYSTEM_ADDRESS1 | Internal Value “4101 SW 47th Ave., Suite 101” |
SYSTEM_ADDRESS2 | Internal Value “Fort Lauderdale, FL 33314” |
SYSTEM_PHONE | Internal Value “(305) 583-7808” |
REG_NUMBER | *COMING SOON* appsettings.json config option GSBL.BTURNO |
NUMBER_OF_LINES | appsettings.json config option BBS.Channels |
OTHERS_ONLINE | Number of Other Users Online |
TOTAL_CALLS | *COMING SOON* Total Number of Sessions Ever |
TOTAL_ACCOUNTS | Total Number of Accounts |
BAUD | *COMING SOON* Current Users Baud Rate, always 38400 |
PAGE | *COMING SOON* Current Module/Menu |
USERID | Current Users User-Id |
CREATION_DATE | *COMING SOON* Date User Signed Up |
LAST_ON | *COMING SOON* Date User Last Logged In |
CLASS | *COMING SOON* Current Users Class |
TIME_ONLINE | *COMING SOON* Number of minutes user has been online |