• Web Interface

    From DesotoFireflite@VERT/VALHALLA to All on Saturday, March 21, 2015 04:14:50
    I just discovered someting interesting when I was checking out my externals on my web page. I don't know when, but it seems to be broken, and I don't know where to look to fix it. When you select an external program, and it goes to snd you to the telnet window, it reads your password instead of your name, and tries to start the new user process. Is there a way to fix this, where it will read the name and transfer you correctly to the external program. I'm sure I'm the one that broke it, but I don't know where to look to fix it. Thanks in advance for your help.

    - SENILE.COM found...Out of Memory...

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Digital Man@VERT to DesotoFireflite on Sunday, March 22, 2015 20:30:43
    Re: Web Interface
    By: DesotoFireflite to All on Sat Mar 21 2015 04:14 am

    I just discovered someting interesting when I was checking out my externals on my web page. I don't know when, but it seems to be broken, and I don't know where to look to fix it. When you select an external program, and it goes to snd you to the telnet window, it reads your password instead of your name, and tries to start the new user process. Is there a way to fix this, where it will read the name and transfer you correctly to the external program. I'm sure I'm the one that broke it, but I don't know where to look to fix it. Thanks in advance for your help.

    What version of Synchronet are you running?

    If you're running v3.15 (or earlier) and you have USE_2ND_RLOGIN set in the [BBS] Options value in your ctrl/sbbs.ini file, try removing that.

    digital man

    Synchronet "Real Fact" #0:
    Development began in 1990 of the (unnamed at the time) Synchronet BBS software. Norco, CA WX: 59.1øF, 79.0% humidity, 9 mph SSE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Monday, March 23, 2015 05:05:03
    Re: Web Interface
    By: Digital Man to DesotoFireflite on Sun Mar 22 2015 08:30 pm

    What version of Synchronet are you running?

    If you're running v3.15 (or earlier) and you have USE_2ND_RLOGIN set in the [BBS] Options value in your ctrl/sbbs.ini file, try removing that.

    I'm running 3.16 Rob. I honestly don't know when it broke, as I don't use the web version myself that much. I'll check out your suggestion. Thanks


    - SENILE.COM found...Out of Memory...

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Monday, March 23, 2015 17:14:43
    Re: Web Interface
    By: Digital Man to DesotoFireflite on Sun Mar 22 2015 08:30 pm

    What version of Synchronet are you running?

    If you're running v3.15 (or earlier) and you have USE_2ND_RLOGIN set in the [BBS] Options value in your ctrl/sbbs.ini file, try removing that.


    These are the options I have enabled in SBBS.INI v3.16a

    Options=XTRN_MINIMIZED | SYSOP_AVAILABLE | ALLOW_RLOGIN | GET_IDENT ExternalTermANSI=pc3
    DOSemuPath=/usr/bin/dosemu.bin
    SSHPort=22



    - Don't eat the yellow snow!

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Digital Man@VERT to DesotoFireflite on Monday, March 23, 2015 18:32:04
    Re: Web Interface
    By: DesotoFireflite to Digital Man on Mon Mar 23 2015 05:14 pm

    Re: Web Interface
    By: Digital Man to DesotoFireflite on Sun Mar 22 2015 08:30 pm

    What version of Synchronet are you running?

    If you're running v3.15 (or earlier) and you have USE_2ND_RLOGIN set in the [BBS] Options value in your ctrl/sbbs.ini file, try removing that.


    These are the options I have enabled in SBBS.INI v3.16a

    Options=XTRN_MINIMIZED | SYSOP_AVAILABLE | ALLOW_RLOGIN | GET_IDENT ExternalTermANSI=pc3 DOSemuPath=/usr/bin/dosemu.bin SSHPort=22

    The "USE_2ND_RLOGIN" option was removed in Synchronet v3.16 about a year ago (May 2, 2014), so if you're running a relatively recent build of v3.16, then it's not really relevant anyway.

    It sounds like the web interface has the username and password fields reversed for the purpose of RLogin and that was potentially valid for some configurations at one time, but now the username and password fields are fixed (cannot be reversed) for RLogin connections to Synchronet.

    digital man

    Synchronet "Real Fact" #5:
    Synchronet version 3 for Linux and FreeBSD development began in 2001.
    Norco, CA WX: 65.5øF, 60.0% humidity, 6 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Tuesday, March 24, 2015 07:58:48
    Re: Web Interface
    By: Digital Man to DesotoFireflite on Mon Mar 23 2015 06:32 pm

    It sounds like the web interface has the username and password fields reversed for the purpose of RLogin and that was potentially valid for
    some configurations at one time, but now the username and password
    fields are fixed (cannot be reversed) for RLogin connections to Synchronet.

    Sounds like I remember that at one time. Is there a particular file/s I should focus on in the web interface. I have done some modifications there, and I don't want to blanket update the web directory. For future use, does the mods directory protect me at all for the web section. I'm thinking no, but I figure I'd ask anyway. Thanks Rob for your help.


    - Fartvergnugen: The pleasure of breaking wind.

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Digital Man@VERT to DesotoFireflite on Tuesday, March 24, 2015 16:30:07
    Re: Web Interface
    By: DesotoFireflite to Digital Man on Tue Mar 24 2015 07:58 am

    Re: Web Interface
    By: Digital Man to DesotoFireflite on Mon Mar 23 2015 06:32 pm

    It sounds like the web interface has the username and password fields reversed for the purpose of RLogin and that was potentially valid for some configurations at one time, but now the username and password fields are fixed (cannot be reversed) for RLogin connections to Synchronet.

    Sounds like I remember that at one time. Is there a particular file/s I should focus on in the web interface. I have done some modifications there, and I don't want to blanket update the web directory. For future use, does the mods directory protect me at all for the web section. I'm thinking no, but I figure I'd ask anyway. Thanks Rob for your help.

    For any files that are load()ed by web server (e.g. .ssjs files), those may be overridden with sysop-modified files stored in your mods (or mods/load) directory. Otherwise, no, the mods directory is not used by the webserver.

    You may need to just update the members/externals.ssjs file due to the change made on March 14 of 2014: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/web/root/members/externals.ssjs

    digital man

    Synchronet "Real Fact" #69:
    Rob Swindell was interviewed for Jason Scott's BBS Documentary in July of 2002. Norco, CA WX: 72.2øF, 54.0% humidity, 10 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Wednesday, March 25, 2015 14:43:45
    Re: Web Interface
    By: DesotoFireflite to Digital Man on Tue Mar 24 2015 07:58 am

    For any files that are load()ed by web server (e.g. .ssjs files), those may be overridden with sysop-modified files stored in your mods (or mods/load) directory. Otherwise, no, the mods directory is not used by the webserver.

    You may need to just update the members/externals.ssjs file due to the change made on March 14 of 2014: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/web/root/members/externals.ssjs


    Works like a charm, Thanks Rob

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Digital Man@VERT to DesotoFireflite on Wednesday, March 25, 2015 17:08:10
    Re: Re: Web Interface
    By: DesotoFireflite to Digital Man on Wed Mar 25 2015 02:43 pm

    Re: Web Interface
    By: DesotoFireflite to Digital Man on Tue Mar 24 2015 07:58 am

    For any files that are load()ed by web server (e.g. .ssjs files), those may be overridden with sysop-modified files stored in your mods (or mods/load) directory. Otherwise, no, the mods directory is not used by the webserver.

    You may need to just update the members/externals.ssjs file due to the change made on March 14 of 2014:


    http://cvs.synchro.net/cgi-bin/viewcvs.cgi/web/root/members/externals.ssj


    Works like a charm, Thanks Rob

    Okay, good to know!

    digital man

    Synchronet "Real Fact" #64:
    Synchronet can dynamically compress and uncompress message bases (using LZH). Norco, CA WX: 84.1øF, 30.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mortifis@VERT/ALLEYCAT to All on Friday, October 12, 2018 17:20:38
    I mostly run the Nightshade Web Interface, which I to read/reply/post to Dove-Net .. I am sure the answer to this question would apply to any theme ... I'd like to execute a system command and display the output ... I know how to do this in PHP but not JS ... more specific, running RPI Raspbian I can, from a terminal, run uptime and get the uptime of the OS since last reboot ... been racking my brain over it and my walnut is rattled ... any ideas?

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Nelgin@VERT/EOTLBBS to Mortifis on Friday, October 12, 2018 18:06:57
    Mortifis wrote:
    I mostly run the Nightshade Web Interface, which I to read/reply/post to Dove-Net .. I am sure the answer to this question would apply to any theme ...
    I'd like to execute a system command and display the output ... I know how to
    do this in PHP but not JS ... more specific, running RPI Raspbian I can, from a
    terminal, run uptime and get the uptime of the OS since last reboot ... been racking my brain over it and my walnut is rattled ... any ideas?

    Javascript is client side so you'd have to find some way to get the server
    to give you the uptime. Take a look at this thread for ideas.

    https://forums.digitalpoint.com/threads/javascript-server-uptime.947331/

    If I wanted to get the sever uptime, I'd either use an include to run
    uptime, write a cgi script or create my own AJAX type back end so I can
    connect and get certain data from the system.

    I have no idea what "Nightshade Web Interface" is, however, so all this may
    be totally wrong :)

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From echicken@VERT/ECBBS to Nelgin on Friday, October 12, 2018 20:37:01
    Re: Re: Web Interface
    By: Nelgin to Mortifis on Fri Oct 12 2018 18:06:57

    Javascript is client side so you'd have to find some way to get the server

    The Synchronet web server can run server-side javascript.

    I have no idea what "Nightshade Web Interface" is, however, so all this may be totally wrong :)

    It's sort of a 'theme' around the old/stock/runemaster web interface for Synchronet. Many components of that web interface are server-side javascript.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 13, 2018 10:28:20

    Javascript is client side so you'd have to find some way to get the server

    The Synchronet web server can run server-side javascript.

    ---
    echicken

    :) I totally suck at JS ... I know how to accomplish this easily in php ie: <?php
    $up = system("uptime", $retval); // $up = $retval and is stored for later use while the output of system is immediately printed to console (or webpage if called from that)


    is there a JS equivalent to PHP's system() that I can store as @MYUPTIME@ type var for use in the web interface theme?

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From echicken@VERT/ECBBS to Mortifis on Saturday, October 13, 2018 11:35:27
    Re: Re: Web Interface
    By: Mortifis to echicken on Sat Oct 13 2018 10:28:20

    :) I totally suck at JS ... I know how to accomplish this easily in php ie: <?php
    $up = system("uptime", $retval); // $up = $retval and is stored for later use while the output of system is immediately printed to console (or webpage if called from that)

    You can run PHP on your Synchronet webserver if you really want to. There's some info about that on the wiki.

    is there a JS equivalent to PHP's system() that I can store as @MYUPTIME@ type var for use in the web interface theme?

    In Synchronet JS we have the 'system' object, which has an 'uptime' property. In an SSJS file you could do this to write your BBS uptime to the client:

    write(system.uptime);

    Or:

    write('My uptime: ' + system.uptime);

    This is Synchronet's uptime and not the OS', if that matters to you.


    The system object also has a 'popen' method that could be useful. If you're on Linux you could probably do:

    var up = system.popen('uptime');
    writeln('My uptime: ' + up[0]);

    Or:

    var up = system.popen('uptime')[0];
    writeln('My uptime: ' + up);

    Or:

    writeln('My uptime: ' + system.popen('uptime')[0]);

    The system.popen(cmd) apparently does not work on Windows, and returns an array of lines output by the command.

    As far as @MYUPTIME@ goes, I don't know my way around the old web templating system enough to comment on how you would integrate any of this with it.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 13, 2018 13:23:59
    Re: Re: Web Interface
    By: Mortifis to echicken on Sat Oct 13 2018 10:28:20

    :) I totally suck at JS ... I know how to accomplish this easily in php ie: <?php
    $up = system("uptime", $retval); // $up = $retval and is stored for later use while the output of system is immediately printed to console (or webpage if called from that)

    You can run PHP on your Synchronet webserver if you really want to. There's some info about that on the wiki.

    Thank you, I have done that in the past, my main webserver is a LAMP running on another system, just trying to do a little customization of the web interface for SBBS

    is there a JS equivalent to PHP's system() that I can store as @MYUPTIME@ type var for use in the web interface theme?

    In Synchronet JS we have the 'system' object, which has an 'uptime' property. In an SSJS file you could do this to write your BBS uptime to the client:

    write(system.uptime);

    Or:

    write('My uptime: ' + system.uptime);

    This is Synchronet's uptime and not the OS', if that matters to you.


    Thank you, already using sbbs system.uptime but I want to get the OS uptime

    The system object also has a 'popen' method that could be useful. If you're on Linux you could probably do:

    var up = system.popen('uptime');
    writeln('My uptime: ' + up[0]);

    Or:

    var up = system.popen('uptime')[0];
    writeln('My uptime: ' + up);

    Thank you very very much this is very helpful!

    As far as @MYUPTIME@ goes, I don't know my way around the old web templating
    system enough to comment on how you would integrate any of this with it.

    ok, I am narrowing things down a bit, I have spent so much time looking at the *.js files LOL so in /sbbs/text/sbbs.msg where are things like @TUSER-L@ and @STATS.NUSERS@ and the like getting set at? in /sbbs/web/root/members/sysinfo.ssjs under template.sysinfo = ""; ... switch(code.toUpperCase())) case blah blah blah which I have included my (renamed) OSUPTIME ...I looked at /sbbs/exec/load/sbbsdefs.js but did not locate NUSERS :/ ... wish I had vacation time coming up to use reading all files for STATS.NUSERS then at least somewhere I could drop in a var OSUPTIME = system.popen('uptime')[0]; :)

    No, I don't want anyone to code it for me, just help point to where I plop those values in at without nuking the whole board LOL



    ---
    echicken

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 13, 2018 13:34:57
    Re: Re: Web Interface
    By: Mortifis to echicken on Sat Oct 13 2018 10:28:20

    Opened a beer then remembered, hey, we have grep so I ran grep -rnw '/sbbs/exec/load/' -e "NUSERS"
    and found /sbbs/exec/load/msgutils.js:301: case 'STATS.NUSERS':

    thanks for your help, eChicken, I'll post back if I accompish my sbbs task of the day LOL

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Saturday, October 13, 2018 19:57:02
    Re: Web Interface
    By: Mortifis to All on Fri Oct 12 2018 05:20 pm

    I mostly run the Nightshade Web Interface, which I to read/reply/post to Dove-Net .. I am sure the answer to this question would apply to any theme ... I'd like to execute a system command and display the output ... I know how to do this in PHP but not JS ... more specific, running RPI Raspbian I can, from a terminal, run uptime and get the uptime of the OS since last reboot ... been racking my brain over it and my walnut is rattled ... any ideas?

    There's the Synchronet system.popen() method (only works on *nix). Or you could just "uptime > uptime.txt" and then read/parse uptime.txt in your script.

    digital man

    Synchronet/BBS Terminology Definition #60:
    XSDK = Synchronet External Program Software Development Kit for C/C++
    Norco, CA WX: 59.7øF, 91.0% humidity, 1 mph ESE wind, 0.52 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Sunday, October 14, 2018 11:20:04
    Re: Web Interface
    By: Mortifis to All on Fri Oct 12 2018
    05:20 pm

    I mostly run the Nightshade Web
    Interface, which I to read/reply/post to
    Dove-Net .. I am sure the answer to
    this question would apply to any
    theme ... I'd like to execute a system
    command and display the output ...
    I know how to do this in PHP but not JS
    ... more specific, running RPI
    Raspbian I can, from a terminal, run
    uptime and get the uptime of the OS
    since last reboot ... been racking my
    brain over it and my walnut is
    rattled ... any ideas?

    There's the Synchronet system.popen()
    method (only works on *nix). Or you
    could just "uptime > uptime.txt" and then
    read/parse uptime.txt in your
    script.


    digital man

    I've been playing with system.open in various
    locations ... trying to create a @MYUPTIME@
    that can be read from the sbbs.msg so I guess
    the right question yo ask is, are custom @-
    codes possible and if yes where would one
    define them?

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Sunday, October 14, 2018 20:13:08
    Re: Re: Web Interface
    By: Mortifis to Digital Man on Sun Oct 14 2018 11:20 am

    I've been playing with system.open in various
    locations ... trying to create a @MYUPTIME@
    that can be read from the sbbs.msg so I guess
    the right question yo ask is, are custom @-
    codes possible and if yes where would one
    define them?

    No, not really. sbbs.msg is displayed during new-user signup, so I'd just make a script that displayed whatever it was you want displayed and configure that as a new-user event in SCFG.

    digital man

    This Is Spinal Tap quote #24:
    David St. Hubbins: You're a haughty one, saucy Jack.
    Norco, CA WX: 64.5øF, 80.0% humidity, 3 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From mark lewis@VERT to echicken on Thursday, October 18, 2018 14:10:06
    On 2018 Oct 12 20:37:00, you wrote to Nelgin:

    Javascript is client side so you'd have to find some way to get the
    server

    The Synchronet web server can run server-side javascript.

    thus the /web files with the extension .ssjs ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Northerners call binoculars opera glasses.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to mark lewis on Thursday, October 18, 2018 15:24:43
    Re: Web Interface
    By: mark lewis to echicken on Thu Oct 18 2018 14:10:06

    thus the /web files with the extension .ssjs ;)

    Important so that the server knows to execute the script locally rather than just serve it directly to the client (as it might with a .js or .html or whatever other extension file).

    And .xjs should not be forgotten, as it lets you add inline SSJS to a file that will be served to a client:

    This is sent to the client. Hello
    <?xjs
    // This is executed on the server
    var a = ' client.';
    write(a); // This is added to the body sent to the client
    ?>

    As a rule it's better to use XJS rather than just straight SSJS, but there are times one is preferable to the other.

    Also fun things can be done to expose server-side data to JS on the client side:

    <script type="text/javascript">
    var bbs_name = '<?xjs write(system.name); ?>';
    alert('Here's an ugly alert box from ' + bbs_name);
    </script>

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Nightfox@VERT/DIGDIST to Nelgin on Thursday, October 18, 2018 12:42:28
    Re: Re: Web Interface
    By: Nelgin to Mortifis on Fri Oct 12 2018 06:06 pm

    Javascript is client side so you'd have to find some way to get the server to give you the uptime. Take a look at this thread for ideas.

    As others have said, Synchronet can run JavaScript on the server side. Synchronet has JavaScript support built-in, and many mods for Synchronet for the web or telnet interface can be written in JavaScript. JavaScript can in fact be easily embedded in any program to provide scripting support. It's not just a web browser client-side language.

    I have no idea what "Nightshade Web Interface" is, however, so all this may be totally wrong :)

    The Nightshade web interface is the web interface that's included with Synchronet.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From mark lewis@VERT to echicken on Thursday, October 18, 2018 16:54:00
    On 2018 Oct 18 15:24:42, you wrote to me:

    thus the /web files with the extension .ssjs ;)

    Important so that the server knows to execute the script locally
    rather than just serve it directly to the client (as it might with a
    .js or .html or whatever other extension file).

    yup... i was mainly looking that the "ss" in "ssjs" means "server side" in the same was that "js" means "javascript" ;)

    And .xjs should not be forgotten, as it lets you add inline SSJS to a
    file that will be served to a client:

    i hadn't found out about that one, yet... i was going to ask if that might be done... i had a ""fortunes"" script thing that i included in my main index page... i used it for quotes, though... i'm not interested in getting php working with sbbs, either, do i'll come up with another way to handle choosing a file of quotes to select a quote from to be included on my index page... each
    quote is separated from the next by a lone "%" character on an otherwise empty line... the php thing generated a binary index file for each file of quotes and
    then chose a random number between zero and the highest index number available for that file... i'll have to see if i can find the code... hopefully it wasn't
    lost when the other server went walkabout the day after the old BBS server left...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... I cry after sex; Mace will do that to you.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to mark lewis on Thursday, October 18, 2018 14:26:25
    Re: Web Interface
    By: mark lewis to echicken on Thu Oct 18 2018 04:54 pm


    On 2018 Oct 18 15:24:42, you wrote to me:

    thus the /web files with the extension .ssjs ;)

    Important so that the server knows to execute the script locally
    rather than just serve it directly to the client (as it might with a .js or .html or whatever other extension file).

    yup... i was mainly looking that the "ss" in "ssjs" means "server side" in the same was that "js" means "javascript" ;)

    Right, that distinction is really only for the web server though (sbbs/web/*). Most of the .js files you'll find in the sbbs tree are actually server-side and used by the terminal server. I actually don't know of any client-side .js files in the sbbs tree.

    digital man

    Synchronet "Real Fact" #72:
    Synchronet CIOXTRN (created by Deuce) is a 32-bit replacement for DOORWAY. Norco, CA WX: 85.0øF, 18.0% humidity, 8 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to mark lewis on Thursday, October 18, 2018 17:45:17
    Re: Web Interface
    By: mark lewis to echicken on Thu Oct 18 2018 16:54:00

    getting php working with sbbs, either, do i'll come up with another way to handle choosing a file of quotes to select a quote from to be included on my index page... each quote is separated from the next by a lone "%" character on an otherwise empty line... the php thing generated a binary index file for each file of quotes and then chose a random number between zero and the highest index number available for that file... i'll have to see if i can find the code... hopefully it wasn't lost when the other server went walkabout the day after the old BBS server left...

    The whole thing could be replicated in JS, but there are a few ways you could go about doing it. One nice thing is that it could be made usable on the console as well as the web side of things.

    Are the quote files very large or do they grow over time?

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From mark lewis@VERT to echicken on Friday, October 19, 2018 09:54:34
    On 2018 Oct 18 17:45:16, you wrote to me:

    getting php working with sbbs, either, do i'll come up with another
    way to handle choosing a file of quotes to select a quote from to be
    included on my index page... each quote is separated from the next by
    a lone "%" character on an otherwise empty line... the php thing
    generated a binary index file for each file of quotes and then chose
    a random number between zero and the highest index number available
    for that file... i'll have to see if i can find the code... hopefully
    it wasn't lost when the other server went walkabout the day after the
    old BBS server left...

    The whole thing could be replicated in JS,

    yup...

    but there are a few ways you could go about doing it.

    that's almost always the case ;)

    One nice thing is that it could be made usable on the console as well
    as the web side of things.

    true and that could be used to display a random quote to users when they log in...

    Are the quote files very large or do they grow over time?

    ummm... they do grow if/when i add more quotes to them... they are, however, static for the most part... adding a new entry means adding something like the following to the end of the file... then the indexes need to be regenerated...

    BEFORE:
    ----->8 snip 8<-----
    one, possibly multi-line, quote in file.
    [eof]
    ----->8 snip 8<-----

    AFTER:
    ----->8 snip 8<-----
    one, possibly multi-line, quote in file.
    %
    one new multi-line<br>
    quote added here<br>
    with any html entities as<br>
    needed. even nbsp if desired...
    [eof]
    ----->8 snip 8<-----


    let's see what i have... these are in DOS format so have CRLF line endings... i
    don't have a problem converting them to nix endings, though...

    calvin Aug 3 2004 15223
    chalkboard Aug 3 2004 34581
    chapterhouse-dune Aug 3 2004 11228
    children-of-dune Oct 2 2012 32493
    cleankernelcookies Aug 3 2004 15008
    comicbookguy Feb 28 2010 18983
    dangerfield Jun 8 2006 2734
    discworld Jun 2 2013 198405
    dogs Jun 8 2006 3535
    dune Oct 2 2012 21088
    dune-messiah Aug 3 2004 9587
    forestgump Jun 2 2013 2800
    futurama Aug 3 2004 41843
    god-emperor-dune Aug 4 2004 30358
    heretics-of-dune Feb 28 2014 16837
    hhgttg Aug 3 2004 23951
    homer Apr 7 2010 53956
    house-atreides Aug 3 2004 20782
    house-harkonnen Aug 3 2004 20764
    humor4lexophiles Dec 6 2008 4962
    kernelcookies Jun 20 2004 16424
    married-with-children Jun 2 2013 34544
    oneliners Aug 3 2004 25647
    osho Aug 3 2004 42265
    pinkyandthebrain Dec 6 2008 12747
    programingstyle Aug 3 2004 8434
    quotes Nov 24 2015 39252
    ralph Jun 8 2006 10354
    starwars Aug 3 2004 10314
    xfiles Aug 3 2004 32978
    zippy Jun 9 2010 49790

    quotes is mainly the one that i add stuff to... you can see it has been a while
    since i last edited them...

    the dat files with the binary indexes are a lot smaller... for example, calvin.dat is only 528 bytes... there's 125 "%" lines in the calvin file so that's 127 quotes available...

    [time passes]

    i have now also finally found the original php "uses" file that contains the class and the functions to generate the index files as well as picking a specific or random quote from a specific or random file... i don't have a clue how easy it would be to convert it from php to js... it has been years since i last did much of anything with php...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Grandma got run over by a reindeer, going home from our house Xmas eve.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to mark lewis on Friday, October 19, 2018 11:21:01
    Re: Web Interface
    By: mark lewis to echicken on Fri Oct 19 2018 09:54:34

    a specific or random quote from a specific or random file... i don't have a clue how easy it would be to convert it from php to js... it has been years since i last did much of anything with php...

    If you want to zip this up and post it somewhere, I can have a go at it. (PHP stuff isn't strictly needed, but I used to do PHP and might be able to take some hints from the original code).

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From mark lewis@VERT to echicken on Friday, October 19, 2018 12:45:40
    On 2018 Oct 19 11:21:00, you wrote to me:

    a specific or random quote from a specific or random file... i don't
    have a clue how easy it would be to convert it from php to js... it
    has been years since i last did much of anything with php...

    If you want to zip this up and post it somewhere, I can have a go at
    it. (PHP stuff isn't strictly needed, but I used to do PHP and might
    be able to take some hints from the original code).

    i can do that... gimme some time... i'll probably let you know where to find it
    via IRC...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Should'a never had those little Vietnamese peppers...
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net