Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

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
module:xtrn_sec [2019/07/17 00:44] – Document options and fonts and stuff digital manmodule:xtrn_sec [2020/04/22 21:03] – Added all the new modopts, describe the optional custom files, new install/usage digital man
Line 3: Line 3:
  
 ===== Install ===== ===== Install =====
-This module is normally installed in stock command shells by default, but to install into a command shell, replace the line(s) in  ''[[dir:exec]]/*.src'':+This module (''xtrn_sec'') should be the default value of SCFG->System->Loadable Modules->Xtrn Section.
  
-  xtrn_section +===== Invoke  ===== 
-with: + 
-  exec_bin xtrn_sec +The normally expected usage is just to invoke ''xtrn_sec.js'' with no arguments. If, however, you wish to have the module skip the menu of external program sections and go directly to the menu of available programs within one specific section, pass the internal-code of the desired program section section as and argument to ''xtrn_sec.js''
-   + 
-and then recompile with [[util:Baja]] or just run the [[module:update]] module.+ 
 +==== Baja ==== 
 +<code Baja> 
 +exec_bin xtrn_sec games 
 +</code> 
 + 
 +However, when installed correctly, this module should run whenever the Baja ''XTRN_SECTION'' function is invoked. 
 + 
 + 
 +==== JavaScript ==== 
 +<code JavaScript> 
 +load('xtrn_sec.js', 'games'); 
 +</code> 
 + 
 +However, when installed correctly, this module should run whenever the JS ''bbs.xtrn_sec()'' method is invoked.
  
 ===== Configure =====  ===== Configure ===== 
Line 15: Line 29:
 The ''xtrn_sec'' module supports the following configuration options in the ''[xtrn_sec]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file: The ''xtrn_sec'' module supports the following configuration options in the ''[xtrn_sec]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file:
  
-^ Option               ^ Default ^ Description ^ +^ Option                 ^ Default ^ Description ^ 
-| multicolumn          | true  | Use a multiple-column program list when there are more than 10 items | +| multicolumn             true   | Use a multiple-column program list when there are more than ''singlecolumn_height'' items | 
-sort                 | false | Re-sort (alphabetically) the list of programs and program sections before displaying to the user | +multicolumn_separator  |  " "    | Separator displayed between columns of program names | 
-| autoexec             | false | Automatically execute a section's program when there is only one program available within that section | +| multicolumn_fmt        |  text[XtrnProgLstFmt]  | Display format used for multiple columns | 
-| clear_screen_on_exec | false | Clear the screen before executing any/all programs | +| singlecolumn_fmt        (see source)          | Display format used for single column | 
-| eval_before_exec     |       | Evaluate the specified JavaScript expression //before// executing any/all programs | +| singlecolumn_margin    |  7      | Desired button margin (below program list), in rows | 
-| eval_after_exec            | Evaluate the specified JavaScript expression //after// executing any/all programs |+| singlecolumn_height    |  screen_rows - singlecolumn_margin  | The maximum length of a single column list | 
 +| header_fmt              text[XtrnProgLstHdr]  | Program list header format | 
 +| titles                 |  text[XtrnProgLstTitles]  | Program list titles | 
 +| underline              |  text[XtrnProgLstUnderline]  | Underline string | 
 +| which                  |  text[WhichXtrnProg]  | Which prompt | 
 +| sort                   |  false  | Re-sort (alphabetically) the list of programs and program sections before displaying to the user | 
 +| autoexec                false  | Automatically execute a section's program when there is only one program available within that section 
 +| clear_screen            true   | Clear the screen before each program list 
 +| clear_screen_on_exec    false  | Clear the screen before executing any/all programs | 
 +| eval_before_exec       |         | Evaluate the specified JavaScript expression //before// executing any/all programs | 
 +| eval_after_exec                | Evaluate the specified JavaScript expression //after// executing any/all programs | 
 +| restricted_user_msg    |  text[R_ExternalPrograms]  | Message displayed users with X-[[access:restrictions]] | 
 +| no_programs_msg        |  text[NoXtrnPrograms]      | Message displayed when there are no external programs available | 
 + 
 +===== Customize ===== 
 + 
 +==== Display Files ==== 
 + 
 +  * The auto-generated external program section list can be replaced by creating the optional file ''[[dir:text]]/[[custom:menu_files|menu]]/xtrn_sec.*''
 +  * Each program list can have an optional header displayed by creating the file ''[[dir:text]]/[[custom:menu_files|menu]]/xtrn<sec_num>_head.*''
 +  * Each auto-generated program list can be replaced by creating the optional file ''[[dir:text]]/[[custom:menu_files|menu]]/xtrn<sec_num>.*''
 +  * Each external program can have an optional file displayed before execution by creating the file ''[[dir:text]]/[[custom:menu_files|menu]]/xtrn/<code>.*'' 
 + 
 +==== Fonts ==== 
 + 
 +This module uses the ''[[custom:javascript:lib:fonts.js]] library'' and ''[[dir:ctrl]]/[[config:fonts.ini]]'' file to optionally load door-specific fonts before executing an external program and restore the default font upon returning from the external program. 
 + 
 +<code ini> 
 +; Door Sections 
 +; ------------- 
 +; Each BBS external online program (e.g. door game) may have its own desired 
 +; fonts and some programs may even have customized fonts made just for that 
 +; game (e.g. LORE). 
 +;  
 +; These sections are named with the form: '[xtrn:<code>:<char>
 +; where <code> is the external program's Internal Code (as configured in SCFG) 
 +; and <char> is the relevant character height. 
 +
 +; Note: you must utilize xtrn_sec.js rev 1.18 or later for this feature: 
 + 
 +[xtrn:lore:16] 
 +normal=lore 
 +high=lore 
 +blink=lore 
 +highblink=lore
  
-===== Fonts ===== +[xtrn:lord32:16] 
 +normal=lore
  
-This module uses the ''[[custom:javascript:lib:fonts.js]] library'' and [[config:fonts.ini]file to optionally load door-specific fonts before executing an external program and restore the default font upon returning from the external program.+[xtrn:lord32:14] 
 +normal=oldenglish 
 +</code>
  
 ===== See Also ===== ===== See Also =====