Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
ada4cbdb
Commit
ada4cbdb
authored
4 years ago
by
Michael Long
Browse files
Options
Downloads
Patches
Plain Diff
coding improvements, head/tail support
parent
b8473194
No related branches found
No related tags found
2 merge requests
!50
Mlong/ddmsgcolor
,
!41
Custom external program menus mod. Allows making custom external menus that...
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/load/xtrnmenulib.js
+2
-2
2 additions, 2 deletions
exec/load/xtrnmenulib.js
exec/xtrnmenu.js
+11
-26
11 additions, 26 deletions
exec/xtrnmenu.js
with
13 additions
and
28 deletions
exec/load/xtrnmenulib.js
+
2
−
2
View file @
ada4cbdb
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
"
use strict
"
;
"
use strict
"
;
load
(
"
sbbsdefs.js
"
);
load
(
"
sbbsdefs.js
"
,
"
K_NONE
"
);
/* text.dat entries */
/* text.dat entries */
load
(
"
text.js
"
);
require
(
"
text.js
"
,
"
XtrnProgLstFmt
"
);
function
ExternalMenus
()
{
function
ExternalMenus
()
{
this
.
options
=
{};
this
.
options
=
{};
...
...
This diff is collapsed.
Click to expand it.
exec/xtrnmenu.js
+
11
−
26
View file @
ada4cbdb
...
@@ -15,10 +15,7 @@
...
@@ -15,10 +15,7 @@
"
use strict
"
;
"
use strict
"
;
load
(
"
sbbsdefs.js
"
);
require
(
"
sbbsdefs.js
"
,
"
K_NONE
"
);
/* text.dat entries */
load
(
"
text.js
"
);
load
(
"
xtrnmenulib.js
"
);
load
(
"
xtrnmenulib.js
"
);
...
@@ -97,18 +94,14 @@ function external_section_menu_custom(menuid)
...
@@ -97,18 +94,14 @@ function external_section_menu_custom(menuid)
menuitemsfiltered
=
ExternalMenus
.
getSortedItems
(
menuobj
);
menuitemsfiltered
=
ExternalMenus
.
getSortedItems
(
menuobj
);
if
(
bbs
.
menu_exists
(
"
xtrnmenu_head_
"
+
menuid
))
{
if
(
!
bbs
.
menu
(
"
xtrnmenu_head_
"
+
menuid
,
P_NOERROR
)
&&
!
bbs
.
menu
(
"
xtrnmenu_head
"
,
P_NOERROR
))
{
bbs
.
menu
(
"
xtrnmenu_head_
"
+
menuid
);
bbs
.
menu
(
"
xtrn_head
"
,
P_NOERROR
);
}
else
if
(
bbs
.
menu_exists
(
"
xtrn_head
"
))
{
bbs
.
menu
(
"
xtrn_head
"
);
}
else
if
(
!
bbs
.
menu_exists
(
"
xtrnmenu_head_
"
+
menuid
))
{
console
.
crlf
();
}
}
if
(
bbs
.
menu_exists
(
"
xtrnmenu_
"
+
menuid
)
)
{
// if file exists text/menu/
xtrnmenu_
(
menuid)
.[rip|ans|mon|msg|asc],
//
if file exists text/menu/xtrnmenu_(menuid).[rip|ans|mon|msg|asc], then display that instead
//
then display that, otherwise dynamiic
bbs
.
menu
(
"
xtrnmenu_
"
+
menuid
);
if
(
!
bbs
.
menu
(
"
xtrnmenu_
"
+
menuid
,
P_NOERROR
))
{
}
else
{
// if no custom menu file in text/menu, create a dynamic one
// if no custom menu file in text/menu, create a dynamic one
multicolumn
=
options
.
multicolumn
&&
menuitemsfiltered
.
length
>
options
.
singlecolumn_height
;
multicolumn
=
options
.
multicolumn
&&
menuitemsfiltered
.
length
>
options
.
singlecolumn_height
;
...
@@ -212,19 +205,11 @@ function external_section_menu_custom(menuid)
...
@@ -212,19 +205,11 @@ function external_section_menu_custom(menuid)
console
.
crlf
();
console
.
crlf
();
}
}
if
(
bbs
.
menu_exists
(
"
xtrnmenu_tail_
"
+
menuid
))
{
if
(
!
bbs
.
menu
(
"
xtrnmenu_tail_
"
+
menuid
,
P_NOERROR
)
&&
!
bbs
.
menu
(
"
xtrnmenu_tail
"
,
P_NOERROR
))
{
bbs
.
menu
(
"
xtrnmenu_tail_
"
+
menuid
);
bbs
.
menu
(
"
xtrn_tail
"
,
P_NOERROR
);
}
else
if
(
bbs
.
menu_exists
(
"
xtrn_tail
"
))
{
bbs
.
menu
(
"
xtrn_tail
"
);
}
}
// synchronize with node database, checks for messages,
// interruption, etc. (AKA node_sync), clears the current console
// line if there's a message to print when clearline is true.
bbs
.
node_sync
();
bbs
.
node_sync
();
// print a mnemonics string, command keys highlighted with
// tilde (~) characters; prints "Which or Quit"
console
.
mnemonics
(
options
.
which
);
console
.
mnemonics
(
options
.
which
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment