entries. This file can then be read when require("text.js"... is used and would require the user to do nothing more than add text to text.dat.local.
Tracker1 wrote to Nigel Reed <=-
Re: Allow and use a text.dat.local override file
By: Nigel Reed to GitLab issue in main/sbbs on Sat Sep 23 2023
11:50:35
entries. This file can then be read when require("text.js"... is used and would require the user to do nothing more than add text to text.dat.local.
Or you can simply have a mods/mytext.js that overrides those
fields you want to change... this is what I do on my board. I
load it at the top of login.js, logon.js, etc.
load("mytext.js");
For example...
bbs.replace_text(
SystemPassword,
"\r\1n\033[22;30f\1n\1cSYS_PASS\1h\1w: \1n\1h\1k(hidden)\1n "
);
bbs.replace_text(InvalidLogon, "\1n\033[24;79f");
I am doing the above in my login.js explicitly in order to
position the prompts where I want them in the display ansi. But
you can just as easily have a bunch of bbs.replace_text for those
you want to change in a mytext.js and load that in login and
logon.
to change... this is what I do on my board. I load it at the top of login.js, logon.js, etc. load("mytext.js");
I am doing the above in my login.js explicitly in order to
position the prompts where I want them in the display ansi. But
you can just as easily have a bunch of bbs.replace_text for those
you want to change in a mytext.js and load that in login and
logon.
Or, even easier, you just embed the prompt postioning codes in the ANSI display file. That's what I do, works great and much simpler.
to change... this is what I do on my board. I load it at the top of
login.js, logon.js, etc. load("mytext.js");
Again, if you do this then it requires the sysop to put a copy in /sbbs/mods, which means they will not get any updates for these scripts. I do believe I mentioned that already.
Tracker1 wrote to Gamgee <=-
I am doing the above in my login.js explicitly in order to
position the prompts where I want them in the display ansi. But
you can just as easily have a bunch of bbs.replace_text for those
you want to change in a mytext.js and load that in login and
logon.
Or, even easier, you just embed the prompt postioning codes in the ANSI display file. That's what I do, works great and much simpler.
So you find it easier to have your Username, password, etc
prompts set to display separate ansi files?
If you have a text.local.dat file, or whatever, it's the same thing... you update text.dat and your local will override it anyway. You can update text.dat and if new strings, or ones you aren't overriding change, you get the update.
Re: Allow and use a text.dat.local override filewhy no merge?
By: nelgin to Tracker1 on Mon Oct 02 2023 10:38:26
>> to change... this is what I do on my board. I load it at the top of
>> login.js, logon.js, etc. load("mytext.js");
ne> Again, if you do this then it requires the sysop to put a copy in
ne> /sbbs/mods, which means they will not get any updates for these scripts. I
ne> do believe I mentioned that already.
If you have a text.local.dat file, or whatever, it's the same thing... you update text.dat and your local will override it anyway. You can update text.dat and if new strings, or ones you aren't overriding change, you get the update.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 412 |
Nodes: | 16 (2 / 14) |
Uptime: | 20:09:59 |
Calls: | 8,623 |
Calls today: | 9 |
Files: | 13,238 |
Messages: | 5,936,882 |