Onelinerz standardization work and docs
This commit is contained in:
parent
5859ba0b68
commit
a14c0f42af
|
@ -153,10 +153,14 @@ exports.getModule = class OnelinerzModule extends MenuModule {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
function populateEntries(entriesView, entries, callback) {
|
function populateEntries(entriesView, entries, callback) {
|
||||||
const tsFormat = self.menuConfig.config.timestampFormat || self.client.currentTheme.helpers.getDateFormat('short');
|
const tsFormat =
|
||||||
|
self.menuConfig.config.dateTimeFormat ||
|
||||||
|
self.menuConfig.config.timestampFormat || // deprecated
|
||||||
|
self.client.currentTheme.helpers.getDateFormat('short');
|
||||||
|
|
||||||
entriesView.setItems(entries.map( e => {
|
entriesView.setItems(entries.map( e => {
|
||||||
return {
|
return {
|
||||||
|
text : e.oneliner, // standard
|
||||||
userId : e.user_id,
|
userId : e.user_id,
|
||||||
userName : e.user_name,
|
userName : e.user_name,
|
||||||
oneliner : e.oneliner,
|
oneliner : e.oneliner,
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
- [BBS List]({{ site.baseurl }}{% link modding/bbs-list.md %})
|
- [BBS List]({{ site.baseurl }}{% link modding/bbs-list.md %})
|
||||||
- [Rumorz]({{ site.baseurl }}{% link modding/rumorz.md %})
|
- [Rumorz]({{ site.baseurl }}{% link modding/rumorz.md %})
|
||||||
- [File Transfer Protocol Select]({{ site.baseurl }}{% link modding/file-transfer-protocol-select.md %})
|
- [File Transfer Protocol Select]({{ site.baseurl }}{% link modding/file-transfer-protocol-select.md %})
|
||||||
|
- [Onelinerz]({{ site.baseurl }}{% link modding/onelinerz.md %})
|
||||||
|
|
||||||
- Administration
|
- Administration
|
||||||
- [oputil]({{ site.baseurl }}{% link admin/oputil.md %})
|
- [oputil]({{ site.baseurl }}{% link admin/oputil.md %})
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Onelinerz
|
||||||
|
---
|
||||||
|
## The Onelinerz Module
|
||||||
|
The built in `onelinerz` module provides a retro onelinerz system.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
### Config Block
|
||||||
|
Available `config` block entries:
|
||||||
|
* `dateTimeFormat`: [moment.js](https://momentjs.com) style format. Defaults to current theme → system `short` date format.
|
||||||
|
|
||||||
|
### Theming
|
||||||
|
The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`):
|
||||||
|
* `userId`: User ID of the onliner entry.
|
||||||
|
* `userName`: Login username of the onliner entry.
|
||||||
|
* `oneliner`: The oneliner text. Note that the standard `{text}` field also contains this value.
|
||||||
|
* `ts`: Timestamp of the entry formatted with `dateTimeFormat` format described above.
|
|
@ -19,6 +19,3 @@ The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`):
|
||||||
* `lastLoginTs`: Last login timestamp formatted with `dateTimeFormat` style.
|
* `lastLoginTs`: Last login timestamp formatted with `dateTimeFormat` style.
|
||||||
* `location`: User's location.
|
* `location`: User's location.
|
||||||
* `affiliation` or `affils`: Users affiliations.
|
* `affiliation` or `affils`: Users affiliations.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue