Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
custom:text.dat [2016/10/26 00:57] – More like actual documentation, but could still use some improvement digital mancustom:text.dat [2021/05/15 17:55] – [Using Defaults] digital man
Line 44: Line 44:
 See Also: [[wp>Escape_sequences_in_C]] See Also: [[wp>Escape_sequences_in_C]]
  
-To continue a text string onto the next line of the ''text.dat'' file (e.g. to creating long text strings without using long lines)place a backslash ('\') character immediately after the terminating double-quote character of each line, except for the last.+To continue a text string onto the next line of the ''text.dat'' file (e.g. to create long text strings, up to 2000 characters, from multiple shorter lines)place a backslash ('\') character immediately after the terminating double-quote character of each line, except for the last.
  
 The order of the % specifiers (if they exist) in a ''text.dat'' line cannot be The order of the % specifiers (if they exist) in a ''text.dat'' line cannot be
Line 69: Line 69:
  
  
-===== Customization =====+===== Customize =====
  
 Knowledge of the C programming language may be very helpful in producing the desired results. If all you want to Knowledge of the C programming language may be very helpful in producing the desired results. If all you want to
Line 83: Line 83:
   - Use the [[util:Baja]] ''REPLACE_TEXT'' or [[custom:JavaScript]] ''bbs.replace_text'' function to replace a single line, programmatically (e.g. in a login/logon script or command-shell)   - Use the [[util:Baja]] ''REPLACE_TEXT'' or [[custom:JavaScript]] ''bbs.replace_text'' function to replace a single line, programmatically (e.g. in a login/logon script or command-shell)
   - Use the [[util:Baja]] ''LOAD_TEXT'' or [[custom:JavaScript]] ''bbs.load_text'' function to load an alternative ''text.dat'' file (e.g. in a login/logon script or command-shell)   - Use the [[util:Baja]] ''LOAD_TEXT'' or [[custom:JavaScript]] ''bbs.load_text'' function to load an alternative ''text.dat'' file (e.g. in a login/logon script or command-shell)
 +  - The [[util:Baja]] ''REVERT_TEXT'' or [[custom:JavaScript]] ''bbs.revert_text'' function may be used to revert to the original set of text strings loaded from the ''text.dat'' file upon initialization
 +
 +The current ''text.dat'' strings may be obtained (e.g. for display purposes) using the [[custom:JavaScript]] ''bbs.text'' function. The caller must pass the number of the text string they wish to obtain.
 +
 +All of the ''text.dat'' names and numbers can be found in:
 +  - The [[custom:JavaScript]] load file: ''[[dir:exec]]/load/[[https://gitlab.synchro.net/sbbs/sbbs/-/blob/master/exec/load/text.js|text.js]]''
 +  - The C header file: ''[[https://gitlab.synchro.net/sbbs/sbbs/-/blob/master/src/sbbs3/text.h]]''
  
 **Note**: The default (US-English) values of all ''text.dat'' strings are hard-coded into Synchronet (e.g. ''sbbs.dll'' or ''libsbbs.so'') so if any lines are missing from your ''text.dat'' file or the file itself is missing, the default values will be automatically used. **Note**: The default (US-English) values of all ''text.dat'' strings are hard-coded into Synchronet (e.g. ''sbbs.dll'' or ''libsbbs.so'') so if any lines are missing from your ''text.dat'' file or the file itself is missing, the default values will be automatically used.
Line 93: Line 100:
 ==== Suppressing Questions ==== ==== Suppressing Questions ====
  
-Most yes/no type prompts in the ''text.dat'' have names/descriptions that end in a 'Q' (for "Question"). Examples:+The Yes/No prompts in the ''text.dat'' file may by identified by their names (in the comments) which end in a capital ''Q'' (for "Question"). Examples:
   * AnonymousQ   * AnonymousQ
   * DeleteMailQ   * DeleteMailQ
Line 100: Line 107:
   * LogOffQ   * LogOffQ
  
-These questions may be suppressed (never asked of the user) by changing the corresponding text value to a blank string (i.e. ''""''). When suppressed, the default answer to the question will be assumed. The default answer may be "Yes" or "No", depending on the context of the question being asked of the user.+These questions may be suppressed (never asked of the user) by changing the corresponding text value to a blank string (i.e. ''""''). When suppressed, the default answer to the question will be assumed by the BBS (script or program) and user will never be prompted for an answer to that particular question. The default answer may be "Yes" or "No", depending on the context of the question
 + 
 +In many cases, ''Q'' or Ctrl-C (abort) may also be an acceptable answer to the question, but this will never be the default answer. 
 + 
 +===== Use Defaults ===== 
 + 
 +The default values of all the ''text.dat'' strings are stored in the Synchronet Terminal Server library (''sbbs.dll'', ''libsbbs.so''). 
 + 
 +To use all default text strings you can either: 
 + 
 +1. Download the ''[[https://gitlab.synchro.net/sbbs/sbbs/-/commits/master/ctrl/text.dat|text.dat]]'' revision from the Source Repository which correlates with the executables you're using and overwrite your local file, or
  
 +2. Replace (overwrite) your ''text.dat'' file with a 0-length file (each 'missing' string is replaced with the default string), e.g. (on *nix):
  
 +  cp /dev/null /sbbs/ctrl/text.dat
 ===== See Also ===== ===== See Also =====
   * [[:dir:CTRL]] Directory   * [[:dir:CTRL]] Directory
-  * [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/ctrl/text.dat?view=markup|Current text.dat file in CVS]]+  * [[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/text.dat|Current text.dat file in Git]]
   * [[:config:|Customization]]   * [[:config:|Customization]]
  
-{{tag>}}+{{tag>text.dat customization ansi}}
  
custom/text.dat.txt · Last modified: 2023/10/27 19:10 by digital man
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0