mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-05 20:27:10 +02:00
User interrupts & node module ready to rock. ...maybe with bugs?
This commit is contained in:
parent
d9238ee6a5
commit
fe44f2c4d6
9 changed files with 198 additions and 68 deletions
|
@ -79,6 +79,7 @@
|
|||
- [Download Manager]({{ site.baseurl }}{% link modding/file-base-download-manager.md %})
|
||||
- [Web Download Manager]({{ site.baseurl }}{% link modding/file-base-web-download-manager.md %})
|
||||
- [Set Newscan Date]({{ site.baseurl }}{% link modding/set-newscan-date.md %})
|
||||
- [Node to Node Messaging]({{ site.baseurl }}{% link modding/node-msg.md %})
|
||||
|
||||
- Administration
|
||||
- [oputil]({{ site.baseurl }}{% link admin/oputil.md %})
|
||||
|
|
17
docs/misc/user-interrupt.md
Normal file
17
docs/misc/user-interrupt.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
layout: page
|
||||
title: User Interruptions
|
||||
---
|
||||
## User Interruptions
|
||||
ENiGMA½ provides functionality to "interrupt" a user for various purposes such as a [node-to-node message](/docs/modding/node-msg.md). User interruptions can be queued and displayed at the next opportune time such as when switching to a new menu, or realtime if appropriate.
|
||||
|
||||
## Standard Menu Behavior
|
||||
Standard menus control interruption by the `interrupt` config block option, which may be set to one of the following values:
|
||||
* `never`: Never interrupt the user when on this menu.
|
||||
* `queued`: Queue interrupts for the next opportune time. Any queued message(s) will then be shown. This is the default.
|
||||
* `realtime`: If possible, display messages in realtime. That is, show them right away. Standard menus that do not override default behavior will show the message then reload.
|
||||
|
||||
|
||||
## See Also
|
||||
See [user_interrupt_queue.js](/core/user_interrupt_queue.js) as well as usage within [menu_module.js](/core/menu_module.js).
|
||||
|
41
docs/modding/node-msg.md
Normal file
41
docs/modding/node-msg.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
layout: page
|
||||
title: Node to Node Messaging
|
||||
---
|
||||
## The Node to Node Messaging Module
|
||||
The node to node messaging (`node_msg`) module allows users to send messages to one or more users on different nodes. Messages delivered to nodes follow standard [User Interruption](/docs/misc/user-interrupt.md) rules.
|
||||
|
||||
## Configuration
|
||||
### Config Block
|
||||
Available `config` block entries:
|
||||
* `dateTimeFormat`: [moment.js](https://momentjs.com) style format. Defaults to current theme → system `short` format.
|
||||
* `messageFormat`: Format string for sent messages. Defaults to `Message from {fromUserName} on node {fromNodeId}:\r\n{message}`. The following format object members are available:
|
||||
* `fromUserName`: Username who sent the message.
|
||||
* `fromRealName`: Real name of user who sent the message.
|
||||
* `fromNodeId`: Node ID where the message was sent from.
|
||||
* `message`: User entered message. May contain pipe color codes.
|
||||
* `timestamp`: A timestamp formatted using `dateTimeFormat` above.
|
||||
* `art`: Block containing:
|
||||
* `header`: Art spec for header to display with message.
|
||||
* `footer`: Art spec for footer to display with message.
|
||||
|
||||
## Theming
|
||||
### MCI Codes
|
||||
1. Node selection. Must be a View that allows lists such as `SpinnerMenuView` (`%SM1`), `HorizontalMenuView` (`%HM1`), etc.
|
||||
2. Message entry (`%ET2`).
|
||||
3. Message preview (`%TL3`). A rendered (that is, pipe codes resolved) preview of the text in `%ET2`.
|
||||
|
||||
10+: Custom using `itemFormat`. See below.
|
||||
|
||||
### Item Format
|
||||
The following `itemFormat` object is provided for MCI 1 and 10+ for the currently selected item/node:
|
||||
* `text`: Node ID or "-ALL-" (All nodes).
|
||||
* `node`: Node ID or `-1` in the case of all nodes.
|
||||
* `userId`: User ID.
|
||||
* `action`: User's action.
|
||||
* `userName`: Username.
|
||||
* `realName`: Real name.
|
||||
* `location`: User's location.
|
||||
* `affils`: Affiliations.
|
||||
* `timeOn`: How long the user has been online (approx).
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue