Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
module:xtrnmenu [2021/01/26 05:17] – [Installation] mlong | module:xtrnmenu [2021/02/13 13:08] (current) – [External Program Menu] Pluralize digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
For any issues, contact mlong on IRC, dove-net at mlong@INREALM or innerrealmbbs.us | For any issues, contact mlong on IRC, dove-net at mlong@INREALM or innerrealmbbs.us | ||
Line 5: | Line 5: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | The Custom External Menu Mod lets you define any number of custom external menus and have those menus link to other custom external menus, external section menus, external programs, or custom commands. You can also choose alpha-numeric inputs for the menu items (except Q), and sort several ways. In addition, you can fully customize the look of each menu and menu item. The mod also supports | + | The XtrnMenu |
+ | * define any number of custom external menus and have those menus link to other custom external menus, external section menus, external programs, or custom commands | ||
+ | * choose alpha-numeric inputs for the menu items (except Q), and sort several ways | ||
+ | * fully customize the look of each menu and menu item | ||
+ | * use keyboard arrow nav, mouse, esc, etc. with lightbar | ||
+ | * track launches and time and use this to power web stats as well as special menus | ||
+ | * search for any for door | ||
+ | * have a favorites menu that the user manages | ||
+ | * provide | ||
+ | * use built in commands for feedback, mail, chat, text files, file area, etc. | ||
===== Installation ===== | ===== Installation ===== | ||
- | - First (while this is in testing), you'll have to grab the files. Do either I **OR** II: | + | 1. Get the latest |
- | - If you are familiar with git, checkout | + | |
- | - Pull down the individual | + | 2. Set the Loadable Module to ' |
- | * [[https:// | + | |
- | * [[https:// | + | |
- | * [[https:// | + | |
- | * [[https:// | + | |
- | - Set the Loadable Module to ' | + | |
-/ | -/ | ||
-Choose System | -Choose System | ||
Line 23: | Line 28: | ||
-Enter " | -Enter " | ||
-NOTE: If you ever want to switch back to stock, switch it to " | -NOTE: If you ever want to switch back to stock, switch it to " | ||
- | - Now you will need to create your menus. | + | 3. Now you will need to create your menus. |
- Run "/ | - Run "/ | ||
- The first time you run it, it will create the main menu (a custom menu with the id of ' | - The first time you run it, it will create the main menu (a custom menu with the id of ' | ||
- | - Click on Edit Items and start adding your items to the main menu. Select the target type first (custom menu, standard built-in section menu, or external program) and then you can choose the actual target (where it points to). You can escape back to the start screen to add more custom menus | + | - Click on Edit Items and start adding your items to the main menu. Select the target type first (custom menu, standard built-in section menu, external program, special menu, or custom command) and then you can choose the actual target (where it points to). You can escape back to the start screen to add more custom menus |
- When you are done, press ESC to exit and save the config. This creates a file called / | - When you are done, press ESC to exit and save the config. This creates a file called / | ||
- | - If you would like to use the web interface, edit /sbbs/ | + | 4. To use game stats, special menus, and favorites, you will need to enable JSON service. Add this to our ctrl/json-service.ini and restart services: |
< | < | ||
- | <!--Games--> | + | [xtrnmenu] |
+ | dir=../ | ||
+ | </code> | ||
+ | Then add this to modopts.ini under [xtrn_sec]: | ||
+ | < | ||
+ | eval_before_exec=js.exec(" | ||
+ | eval_after_exec=js.exec(" | ||
</ | </ | ||
+ | 5. If you would like to use the web interface, copy the files from xtrn/ | ||
You also need to modify the stock 003-games.xjs or you will have two Games menus: | You also need to modify the stock 003-games.xjs or you will have two Games menus: | ||
< | < | ||
Line 41: | Line 53: | ||
This mod will not affect any shells that create their own external menus, most notably lbshell (Deuce' | This mod will not affect any shells that create their own external menus, most notably lbshell (Deuce' | ||
- | ===== Customizing the Look ===== | + | The mod does not handle scrolling. You need to ensure that you do not have more menu items or external programs in a section than can be displayed in one screen (with header/ |
+ | ===== xtrnmenucfg.js ===== | ||
+ | |||
+ | You can configure the external menus by running " | ||
+ | |||
+ | The main menu is a special menu called " | ||
+ | |||
+ | You can create custom menus containing other menus, programs, sections, commands, etc. These can then be linked to other menus or to your main menu. | ||
+ | |||
+ | The types of items are: | ||
+ | |||
+ | * Custom Menu: Another custom menu item | ||
+ | * External Section: Displays the external section menu for the specified section | ||
+ | * External Program: Launches the specified external program | ||
+ | * Special Menu: For most viewed, most recent, longest run (requires json services) | ||
+ | * Favorites: User-maintained menu (requires json services) | ||
+ | * Search: Search menu for games | ||
+ | * Command: Runs any synchronet command line. This is intended mainly for adding menu options for the Game Server. | ||
+ | |||
+ | ===== Customizing the Look and Behavior | ||
By default, this mod will use all of your options as defined in modopts.ini [xtrn_sec], with the exception of multicolumn_fmt and singlecolumn_fmt. This is because those two default to having an unsigned integer in the format, and this mod will require a string. If you don't define them, they will use what is hardcoded in the code. | By default, this mod will use all of your options as defined in modopts.ini [xtrn_sec], with the exception of multicolumn_fmt and singlecolumn_fmt. This is because those two default to having an unsigned integer in the format, and this mod will require a string. If you don't define them, they will use what is hardcoded in the code. | ||
- | === Global | + | However, you will mainly be maintaining the settings under [xtrnmenu] in modopts.d/ |
+ | |||
+ | === Global Options === | ||
- | To setup your global | + | To setup your global |
< | < | ||
[xtrnmenu] | [xtrnmenu] | ||
- | multicolumn | + | |
- | sort = false | + | ; Uncomment if you wish to have the mod hand over section menus to xtrn_sec.js |
- | autoexec | + | ; |
+ | |||
+ | ; Default | ||
+ | sort = false | ||
; Enable multi-column display (when more than 10 external programs in a section) | ; Enable multi-column display (when more than 10 external programs in a section) | ||
- | multicolumn = true | + | multicolumn = true |
- | ; Clear the (remote) terminal screen before displaying the menu | + | |
- | clear_screen = true | + | |
- | ; Auto-execute the only available program when entering a program section | + | |
- | autoexec = false | + | |
+ | ; Clear the (remote) terminal screen before displaying the menu | ||
+ | clear_screen = true | ||
+ | |||
; uncomment and modify any of the below to change the look of the external programs menu | ; uncomment and modify any of the below to change the look of the external programs menu | ||
; to remove titles or underline, set to the text ' ' | ; to remove titles or underline, set to the text ' ' | ||
- | ; | + | ; |
- | ; | + | ; |
- | ; | + | ; |
- | ; | + | ;titles: \1n\1cKey \1h\xb3\1n\1c Name |
- | ; multicolumn_fmt: | + | multicolumn_fmt: |
- | ; singlecolumn_fmt: | + | singlecolumn_fmt: |
- | ; | + | ;which: \r\n\1-\1cWhich or \1h~Q\1n\1cuit: |
- | ; | + | ;underline: \1c\1h\xc4\xc4\xc4\xc4\xc5\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4 |
+ | ; used by the lightbar | ||
+ | multicolumn_fmt_inverse: | ||
+ | singlecolumn_fmt_inverse: | ||
; to enable cost display, use these instead | ; to enable cost display, use these instead | ||
- | ; | + | ; Note: cost not supported in special menus |
- | ; | + | ;titles: \1n\1cInput \1h\xb3\1n\1c Name Cost \1n\1c |
- | ; | + | ; |
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; These are used for the special menus (most launched, etc.) | ||
+ | ; It adds the " | ||
+ | multicolumn_fmt_special: | ||
+ | singlecolumn_fmt_special: | ||
+ | multicolumn_fmt_special: | ||
+ | singlecolumn_fmt_special: | ||
+ | |||
+ | ; Override the message when there are no programs available | ||
+ | ; (defaults to text.dat NoXtrnPrograms) | ||
+ | ; | ||
+ | |||
+ | ; Override the restricted user msg | ||
+ | ; (defaults to text.dat R_ExternalPrograms) | ||
+ | ; | ||
+ | |||
+ | ; JSON service powers special menus (most popular, recent, etc.) | ||
+ | ; Add appropriate entry to json-service.ini and set host/port here | ||
+ | ; | ||
+ | ;json_host = localhost | ||
+ | ;json_port = 10088 | ||
+ | |||
+ | ; Exclude external codes or external sections from being tracked | ||
+ | ; and showing up in special menus (most popular, recent, etc.) | ||
+ | blacklist_tracking_xtrncodes: | ||
+ | blacklist_tracking_xtrnsec: | ||
+ | |||
+ | ; Formatting for the " | ||
+ | return_msg: "\xae Return to Previous Menu" | ||
+ | logoff_msg: " | ||
+ | quit_msg: " | ||
+ | ; Formatting for the " | ||
+ | return_msg: "\xae Return to Previous Menu" | ||
+ | logoff_msg: " | ||
+ | quit_msg: " | ||
+ | return_multicolumn_fmt: | ||
+ | return_singlecolumn_fmt: | ||
+ | return_multicolumn_fmt_inverse: | ||
+ | return_singlecolumn_fmt_inverse: | ||
+ | return_multicolumn_special_fmt: | ||
+ | return_singlecolumn_special_fmt: | ||
+ | return_multicolumn_special_fmt_inverse: | ||
+ | return_singlecolumn_special_fmt_inverse: | ||
+ | |||
+ | ; Change display of filearea command menu | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Change display of search menu | ||
+ | entersearchterm: | ||
+ | searchresultheader: | ||
+ | searchagainmsg: | ||
+ | |||
+ | ; Feedback Module | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Favorites Module | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; autocomplete (search) box on add favorite | ||
+ | ; see cga_defs.js for color codes | ||
+ | ; autocomplete input box | ||
+ | ; | ||
+ | ; | ||
+ | ; autocomplete result box | ||
+ | ; | ||
+ | ; | ||
+ | ; autocomplete highlighted row | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; scrolling menu on add favorite | ||
+ | ; lightbar non-current item | ||
+ | ; | ||
+ | ; | ||
+ | ; lightbar current item | ||
+ | ; | ||
+ | ; | ||
+ | ; tree heading | ||
+ | ; | ||
+ | ; | ||
</ | </ | ||
Line 91: | Line 229: | ||
=== Single Item Appearance Options === | === Single Item Appearance Options === | ||
- | To change the look of a single item inside of a menu, create it within the [xtrnmenu: | + | To change the look of a single item inside of a menu, create it within the [xtrnmenu: |
< | < | ||
- | [xtrnmenu:genre] | + | [xtrnmenu:wordgame] |
- | multicolumn_fmt: | + | boggle-multicolumn_fmt: |
- | singlecolumn_fmt: | + | boggle-singlecolumn_fmt: |
- | lord-multicolumn_fmt: \1n\1g[\1h%2s\1n\1g] \1g%-32.32s \1h | + | boggle-multicolumn_fmt_inverse: \1n\1w[\1r\1h%2s\1n\1w] [test] \x015\1w%-25.25s \1h |
- | lord-singlecolumn_fmt: \1n\1g[\1h%2s\1n\1g] \1g%-32.32s \1h | + | boggle-singlecolumn_fmt_inverse: \1n\1w[\1r\1h%2s\1n\1w] [test] \x015\1w%-25.25s \1h |
</ | </ | ||
Line 114: | Line 251: | ||
The module also supports falling back to the xtrn_sec files of '' | The module also supports falling back to the xtrn_sec files of '' | ||
+ | |||
+ | |||
+ | ===== Game Server ===== | ||
+ | |||
+ | You can use the mod to provide functionality for a game server. You will probably still need to make other changes to your system such as to logon.js, etc. | ||
+ | |||
+ | ==== Shell ==== | ||
+ | |||
+ | You can make a shell which just runs the menumod. Create your shell source such as '' | ||
+ | |||
+ | < | ||
+ | exec "? | ||
+ | </ | ||
+ | |||
+ | Then compile it with baja: '' | ||
+ | |||
+ | ==== Commands ==== | ||
+ | |||
+ | You can add custom commands to your menu by using '' | ||
+ | |||
+ | ^ Command Name ^ Value to Use ^ Note ^ | ||
+ | | Chat Section | ''? | ||
+ | | Check Mail | ''? | ||
+ | | Download Area | ''? | ||
+ | | Last Callers | ''? | ||
+ | | Prefs | ''? | ||
+ | | Send Feedback | ''? | ||
+ | | Text Files | ''? | ||
+ | | Sysop Command | ''? | ||
+ | |||
+ | |||
+ | ===== Display Files ===== | ||
+ | |||
+ | You can create a footer that only shows when the menu is running in game server mode: | ||
+ | |||
+ | '' | ||
+ | |||
===== See Also ===== | ===== See Also ===== | ||
* [[: | * [[: | ||
+ | |||
+ | ===== | ||
{{tag>}} | {{tag>}} | ||