• HTML

    From DesotoFireflite@VERT/VALHALLA to All on Wednesday, May 06, 2015 15:31:39
    Is their a secret to show an actual ansi file from the bbs on my website in HTML Page. Let's say I want to show the actual grafiti wall ansi, but it's not in html, how do I go about this, or is there a program that will help me. I know it can be done, as I have seen it, but I don't know where to find the code. I' using a text editor to do all my web pages, so basicly it's trial and error for me as I don't know html... I borrow code and make it work. Thanks for the help in advance if you can figure out what I'm trying to do... LOL

    - "All men are ignorant, just in different fields." -- Einstein

    - 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, May 06, 2015 16:06:38
    Re: HTML
    By: DesotoFireflite to All on Wed May 06 2015 03:31 pm

    Is their a secret to show an actual ansi file from the bbs on my website in HTML Page. Let's say I want to show the actual grafiti wall ansi, but it's not in html, how do I go about this, or is there a program that will help me. I know it can be done, as I have seen it, but I don't know where to find the code. I' using a text editor to do all my web pages, so basicly it's trial and error for me as I don't know html... I borrow code and make it work. Thanks for the help in advance if you can figure out what I'm trying to do... LOL

    Are you using the Synchronet web server? If so, double-check that your ctrl/web_handler.ini file has the following in the [JavaScript] section:
    asc = asc_handler.js

    What this does is execute asc_handler.js whenever a *.asc file is served up by your Synchronet web server. asc_handler.js converts Ctrl-A encoded files (which
    can be easily converted from raw ANSI using the ans2asc utility) into HTML. You
    can *also* use this handler to convert raw ANSI (*.ans) files by adding the following the [JavaScript] section of your ctrl/web_handler.ini file:
    ans = asc_handler.js

    Let me know how that works for ya.

    digital man

    Synchronet "Real Fact" #54:
    Synchronet Terminal Server introduced RLogin support w/v3.00c (2000).
    Norco, CA WX: 65.8øF, 55.0% humidity, 10 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to DesotoFireflite on Wednesday, May 06, 2015 22:29:08
    Re: HTML
    By: DesotoFireflite to All on Wed May 06 2015 03:31 pm

    Is their a secret to show an actual ansi file from the bbs on my website in HTML Page. Let's say I want to show the actual grafiti wall ansi, but it's not in html, how do I go about this, or is there a program that will help me. I know it can be done, as I have seen it, but I don't know where to
    find the code. I' using a text editor to do all my web pages, so basicly it's trial and error for me as I don't know html... I borrow code and make it work. Thanks for the help in advance if you can figure out what I'm


    you can use synchronet's content handler for ansi, or you can use ansilove. ansilove does a great job of outputting png from ansi on the fly
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Thursday, May 07, 2015 03:43:33
    Re: HTML
    By: Digital Man to DesotoFireflite on Wed May 06 2015 04:06 pm

    Are you using the Synchronet web server? If so, double-check that your ctrl/web_handler.ini file has the following in the [JavaScript] section: asc = asc_handler.js
    utility) into HTML. You can *also* use this handler to convert raw ANSI (*.ans) files by adding the following the [JavaScript] section of your ctrl/web_handler.ini file: ans = asc_handler.js

    Ok, awesome, Thank You. I'll let you know.

    - 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 Mro on Thursday, May 07, 2015 03:47:13
    Re: HTML
    By: Mro to DesotoFireflite on Wed May 06 2015 10:29 pm

    you can use synchronet's content handler for ansi, or you can use ansilove. ansilove does a great job of outputting png from ansi on the fly

    Thanks, I'll check that out. I'll let you know how it goes.

    - Sticks and stones may break my bones but whips and chains excite me.

    - 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 Mro@VERT/BBSESINF to DesotoFireflite on Thursday, May 07, 2015 15:56:34
    Re: HTML
    By: DesotoFireflite to Digital Man on Thu May 07 2015 03:43 am

    ctrl/web_handler.ini file has the following in the [JavaScript] section: asc = asc_handler.js
    utility) into HTML. You can *also* use this handler to convert raw
    ANSI (*.ans) files by adding the following the [JavaScript] section of your ctrl/web_handler.ini file: ans = asc_handler.js

    Ok, awesome, Thank You. I'll let you know.


    it's good in a pinch but it has issues at times.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From KenDB3@VERT/KD3NET to Digital Man on Friday, May 08, 2015 16:31:23
    What this does is execute asc_handler.js whenever a *.asc file is served up by your Synchronet web server. asc_handler.js converts Ctrl-A encoded files (which can be easily converted from raw ANSI using the ans2asc utility) into HTML. You can *also* use this handler to convert raw ANSI (*.ans) files by adding the following the [JavaScript] section of your ctrl/web_handler.ini file:
    ans = asc_handler.js

    Digital Man,

    I'm actually trying to work with asc_handler.js and I'm not really sure what I am doing. I tried looking at a page that uses it (like members/sysinfo.ssjs) but I'm pretty hopeless when I don't really understand the code I am trying to mess around with.

    Is there any type of help doc or something in the way of syntax and options? I'm just trying to get it to display some ASC game score files.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Mro@VERT/BBSESINF to KenDB3 on Friday, May 08, 2015 17:19:40
    Re: Re: HTML
    By: KenDB3 to Digital Man on Fri May 08 2015 04:31 pm

    Is there any type of help doc or something in the way of syntax and
    options? I'm just trying to get it to display some ASC game score files.


    you just link to the .ans or .asc file on your web. then it works.


    PSSST use ansilove instead
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From KenDB3@VERT/KD3NET to Mro on Friday, May 08, 2015 21:12:00
    you just link to the .ans or .asc file on your web. then it works.

    I honestly tried. But I'm not getting something basic about this. Though I did notice if I went to the ASC file directly it worked... but not inside of another SSJS/INC page. I don't want to link to them, I want a fluid page that shows all the different scores.

    PSSST use ansilove instead

    LOL. I may try it out if I fail with the built-in handler. I'd like to see if I can wrap my brain around the Synch one. But I appreciate the tip. :-)

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Mro@VERT/BBSESINF to KenDB3 on Friday, May 08, 2015 23:43:32
    Re: Re: HTML
    By: KenDB3 to Mro on Fri May 08 2015 09:12 pm


    LOL. I may try it out if I fail with the built-in handler. I'd like to see if I can wrap my brain around the Synch one. But I appreciate the tip. :-)


    http://eob-bbs.com:8080/test/index.html

    looks like a job for good ole iframe!
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From echicken@VERT/ECBBS to KenDB3 on Saturday, May 09, 2015 00:36:13
    Re: Re: HTML
    By: KenDB3 to Mro on Fri May 08 2015 21:12:00

    you just link to the .ans or .asc file on your web. then it works.

    I honestly tried. But I'm not getting something basic about this. Though I did notice if I went to the ASC file directly it worked... but not inside

    That's how it's meant to work. When a document is requested from the webserver, and the webserver sees that the document's extension is mapped to a handler script in 'ctrl/web_handler.ini', then it passes the document through the handler before sending it to the client.

    However that magic won't happen with most other methods of 'including' the .ans/.asc file inside of an HTML, SSJS, INC, XJS, etc. file, because the server will just read the file and dump its unmodified contents into what you send to the client.

    of another SSJS/INC page. I don't want to link to them, I want a fluid page that shows all the different scores.

    Something like this would work for inline display:

    <iframe src="/path/to/my.ans"></iframe>

    Because it will cause the client's browser to request that document on its own from the server, then load it into the iframe. You'll need to mess with the width and height properties of the iframe, and probably hide borders, etc. to get a nice display.

    Someone will say "iframes are bad because people say iframes are bad" at this point. Sometimes they're what works. In this case they're a good way to go since asc_handler.js barfs out a complete HTML document, which belongs in its own context.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to KenDB3 on Friday, May 08, 2015 22:44:58
    Re: Re: HTML
    By: KenDB3 to Digital Man on Fri May 08 2015 04:31 pm

    What this does is execute asc_handler.js whenever a *.asc file is served up by your Synchronet web server. asc_handler.js converts Ctrl-A encoded files (which can be easily converted from raw ANSI using the ans2asc utility) into HTML. You can *also* use this handler to convert raw ANSI (*.ans) files by adding the following the [JavaScript] section of your ctrl/web_handler.ini file:
    ans = asc_handler.js

    Digital Man,

    I'm actually trying to work with asc_handler.js and I'm not really sure what I am doing. I tried looking at a page that uses it (like members/sysinfo.ssjs) but I'm pretty hopeless when I don't really understand the code I am trying to mess around with.

    Is there any type of help doc or something in the way of syntax and options? I'm just trying to get it to display some ASC game score files.

    If you have it installed in your web_handler.ini, then anytime the web server sends a .asc file to the client (browser/user) it will convert it to HTML on the fly.

    So if you copied a file, say sync.asc, to your sbbs/web/root directory, then a request for that file should look like this:
    http://vert.synchro.net/sync.asc

    digital man

    Synchronet "Real Fact" #36:
    Synchronet's Windows Control Panel is built with Borland C++ Builder.
    Norco, CA WX: 52.9øF, 87.0% humidity, 3 mph S wind, 0.13 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Mro on Saturday, May 09, 2015 06:45:49
    Re: Re: HTML
    By: KenDB3 to Mro on Fri May 08 2015 09:12 pm


    LOL. I may try it out if I fail with the built-in handler. I'd like to see if I can wrap my brain around the Synch one. But I appreciate the tip. :-)


    http://eob-bbs.com:8080/test/index.html

    looks like a job for good ole iframe!

    I owe this next statement to you and echicken:
    Aha! Much easier than I was making it out to be. Told you I was missing something basic. (And I will defintely check out ansilove too, I had heard of it once before in my web travels).

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From KenDB3@VERT/KD3NET to echicken on Saturday, May 09, 2015 06:49:25
    you just link to the .ans or .asc file on your web. then it works.

    I honestly tried. But I'm not getting something basic about this. Though I did notice if I went to the ASC file directly it worked... but not inside

    That's how it's meant to work. When a document is requested from the webserver, and the webserver sees that the document's extension is mapped to a handler script in 'ctrl/web_handler.ini', then it passes the document through the handler before sending it to the client.

    However that magic won't happen with most other methods of 'including' the .ans/.asc file inside of an HTML, SSJS, INC, XJS, etc. file, because the server will just read the file and dump its unmodified contents into what you send to the client.

    of another SSJS/INC page. I don't want to link to them, I want a fluid page that shows all the different scores.

    Something like this would work for inline display:

    <iframe src="/path/to/my.ans"></iframe>

    Because it will cause the client's browser to request that document on its own from the server, then load it into the iframe. You'll need to mess with the width and height properties of the iframe, and probably hide borders, etc. to get a nice display.

    Someone will say "iframes are bad because people say iframes are bad" at this point. Sometimes they're what works. In this case they're a good way to go since asc_handler.js barfs out a complete HTML document, which belongs in its own context.

    Thanks ec! You and Mro has the same thought, and I appreciate the explanation as I am usually trying to figure out why things are doing what they are doing. I have made good use of iframes before, and I can definitely see why it's a solution that works as well as it does in this scenario.

    Sooo much easier than I was making this problem.... lol

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From KenDB3@VERT/KD3NET to Digital Man on Saturday, May 09, 2015 06:52:50
    If you have it installed in your web_handler.ini, then anytime the web server sends a .asc file to the client (browser/user) it will convert it to HTML on the fly.

    So if you copied a file, say sync.asc, to your sbbs/web/root directory, then a request for that file should look like this: http://vert.synchro.net/sync.asc

    Thanks DM, I was going about it in probably the most complicated manner I could. ec and Mro pointed me in the right direction. I was trying to get the ASC/ANS files to display in-line within another html/ssjs file and didn't realize how the handler was meant to work on an individual file.

    I think I'm in a good spot now. Much appreciated!

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Digital Man@VERT to KenDB3 on Sunday, May 10, 2015 18:36:20
    Re: Re: HTML
    By: KenDB3 to Digital Man on Sat May 09 2015 06:52 am

    If you have it installed in your web_handler.ini, then anytime the web server sends a .asc file to the client (browser/user) it will convert it to HTML on the fly.

    So if you copied a file, say sync.asc, to your sbbs/web/root directory, then a request for that file should look like this: http://vert.synchro.net/sync.asc

    Thanks DM, I was going about it in probably the most complicated manner I could. ec and Mro pointed me in the right direction. I was trying to get the ASC/ANS files to display in-line within another html/ssjs file and didn't realize how the handler was meant to work on an individual file.

    You actually don't need the asc_handler.js if you're already using SSJS to generate the page. You could use the Synchronet html_encode() function and insert the results inline with the rest of the output of the SSJS file. The asc_handler.js is just a small wrapper for html_encode().

    digital man

    Synchronet "Real Fact" #76:
    Rob Swindell still has dozens of BBS-related magazines in his possession. Norco, CA WX: 74.3øF, 46.0% humidity, 13 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Digital Man on Monday, May 11, 2015 20:24:24
    You actually don't need the asc_handler.js if you're already using SSJS to generate the page. You could use the Synchronet html_encode() function and insert the results inline with the rest of the output of the SSJS file. The asc_handler.js is just a small wrapper for html_encode().

    Thanks DM! I'll have to play with it a bit and see what I can do. I liked the output that I got with iframes, but one could possibly run into an ANS/ASC that gets longer than you originally planned for, so I'd like to see if I can figure it out.

    Much appreciated!

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From KenDB3@VERT/KD3NET to Digital Man on Tuesday, May 12, 2015 01:39:24
    You actually don't need the asc_handler.js if you're already using SSJS to generate the page. You could use the Synchronet html_encode() function and insert the results inline with the rest of the output of the SSJS file. The asc_handler.js is just a small wrapper for html_encode().

    Thanks DM! I'll have to play with it a bit and see what I can do. I liked the output that I got with iframes, but one could possibly run into an ANS/ASC that gets longer than you originally planned for, so I'd like to see if I can figure it out.


    Rob, again, big thanks. I think I got it all sorted out.

    So, I originally solved the problem with iframes: http://bbs.kd3.us/scores/scores.ssjs
    but ran into the problem I was worried about, where, as the score files got longer than I first expected, I got scroll bars where I didn't want them.

    I then tried to implement what you mentioned, using the sysinfo.ssjs page as a model. I'm sucky at code, but good at hacking at stuff that's already been done to fit my needs.

    By tenacity and some luck I got it working: http://bbs.kd3.us/scores/scores_inline3.ssjs
    (that says 3 in there, but it was more like 13 tries... lol)
    I ran into a snag that took me a while to sort out, until I remembered its a damn web server and not Windows, lol.

    I was defining the file path as
    f=new File("c:\sbbs\web\root\scores\LORD.ANS");

    when I should have been using
    f=new File("C:/sbbs/web/root/scores/LORD.ANS");

    Just wanted to say thanks and also share, if anyone wants my code so they can play with it and modify for their own use, feel free to ask. Hit me up at <kendb3 at bbs.kd3.us>. Also, if anyone is using BBSLink.net on a Windows machine and wants a batch file that uses (Win32) wget to grab the ANS score files, I can give you that too, just ask.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Digital Man@VERT to KenDB3 on Tuesday, May 12, 2015 00:15:28
    Re: Re: HTML
    By: KenDB3 to Digital Man on Tue May 12 2015 01:39 am

    By tenacity and some luck I got it working: http://bbs.kd3.us/scores/scores_inline3.ssjs
    (that says 3 in there, but it was more like 13 tries... lol)
    I ran into a snag that took me a while to sort out, until I remembered its a damn web server and not Windows, lol.

    I was defining the file path as
    f=new File("c:\sbbs\web\root\scores\LORD.ANS");

    when I should have been using
    f=new File("C:/sbbs/web/root/scores/LORD.ANS");

    Just wanted to say thanks and also share, if anyone wants my code so they can play with it and modify for their own use, feel free to ask. Hit me up at <kendb3 at bbs.kd3.us>. Also, if anyone is using BBSLink.net on a Windows machine and wants a batch file that uses (Win32) wget to grab the ANS score files, I can give you that too, just ask.

    That issue (with the backslashes) is actually more to due with JavaScript than anything else. In JavaScript, backslashes must be "escaped", like so: "C:\\WINDOWS\\SYSTEM32".

    Forward slashes work too.

    digital man

    Synchronet "Real Fact" #79:
    85 SBBSecho registrations were sold (at $49) between 1994 and 1996.
    Norco, CA WX: 61.1øF, 75.0% humidity, 0 mph SSE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Digital Man on Tuesday, May 12, 2015 06:49:53
    That issue (with the backslashes) is actually more to due with JavaScript than anything else. In JavaScript, backslashes must be "escaped", like so: "C:\\WINDOWS\\SYSTEM32".

    Forward slashes work too.


    Ahhhh! Constantly learning something new. Thank you!

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Mro@VERT/BBSESINF to KenDB3 on Tuesday, May 12, 2015 16:12:34
    Re: Re: HTML
    By: KenDB3 to Digital Man on Tue May 12 2015 01:39 am

    So, I originally solved the problem with iframes: http://bbs.kd3.us/scores/scores.ssjs
    but ran into the problem I was worried about, where, as the score files got longer than I first expected, I got scroll bars where I didn't want them.

    if you notice the example i gave you was a very large ansi file. i chose that one because it was so long. i have the scroll bars turned off and it's displaying the entire height and width.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From KenDB3@VERT/KD3NET to Mro on Tuesday, May 12, 2015 22:16:02
    Re: Re: HTML
    By: KenDB3 to Digital Man on Tue May 12 2015 01:39 am

    So, I originally solved the problem with iframes: http://bbs.kd3.us/scores/scores.ssjs
    but ran into the problem I was worried about, where, as the score files got longer than I first expected, I got scroll bars where I didn't want them.

    if you notice the example i gave you was a very large ansi file. i chose that one because it was so long. i have the scroll bars turned off and it's displaying the entire height and width.

    I was actually pretty happy with the way the iframes turned out, but the problem is I didn't want to link to just one per page, I wanted it to be several on one page (in this case 4 of them, and then hopefully more later). From everything I played with, this meant defining a static size of the iframe. The best I could hope for was to estimate the max size it would be, but that would require me checking fairly often to make sure it still looked good. (Funny enough, due to screen resolution, I see a scroll bar on the scores.ssjs page above at home, but did not see it at work earlier today).

    I couldn't use what you did on the test page you showed me, where you had 100% for the width and height of the iframe, even though it worked really well for single ANSI files. In fact I gave that a try to see what it looked like with multiple files:
    http://bbs.kd3.us/scores/scores2.ssjs
    It doesn't quite work the same way as it does with just one ANSI. Especially within the confines of the SBBS Web template, where it doesn't want to expand past what is the end of the table element where the main content shows up.

    However, Rob gave me the nudge I needed to figure out what I was trying to accomplish when I first started, but was lost as to what function was doing the magic. Now, I've got no iframes to worry about defining, and the size of the ANSIs could vary and the script will be able to handle it without making them look bigger (which adds some blank space at the bottom), or too small (which ends up giving me the scroll bar).

    Though, I still think ansilove would have been my backup if I didn't like the way the html_encode() function was working. Thanks for the suggestions, I certainly appreciate the help.

    Now, I just need to link to the newly made page, and also decide if I want to add more scores and, if so, do I want all of that to be on one page, since it could get a little long.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Mro@VERT/BBSESINF to KenDB3 on Wednesday, May 13, 2015 20:42:55
    Re: Re: HTML
    By: KenDB3 to Mro on Tue May 12 2015 10:16 pm

    if you notice the example i gave you was a very large ansi file. i chose that one because it was so long. i have the scroll bars turned off and it's displaying the entire height and width.

    I couldn't use what you did on the test page you showed me, where you had 100% for the width and height of the iframe, even though it worked really well for single ANSI files. In fact I gave that a try to see what it looked like with multiple files:


    iframe has a lot of features. and you can use multiple iframes on your web pages.

    anyways most of the people i know of who are showing score files on the web are using ansi love and it works great.

    i'm not so much a fan of the synchronet web interface. it cant handle traffic well, not the way apache can.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::