• a small javascript...

    From Internetking@VERT/TIME/THRWHITE to All on Sat Apr 9 11:43:00 2011
    Hello all...

    I would like to know how to put in newuser.js a small part where it display a text file for user to read and agree like for example it display bbsrules.txt in c:/slbbs/text then it will ask you if you agree to it .. if yes then go next step if no then disconnect


    thanks for your help in this....


    Nathan

    ---
    þ Synchronet þ The Whitehouse of Sex - whitehouse.hulds.com - the kinky bbs!!!
  • From Nightfox@VERT/DIGDIST to Internetking on Sat Apr 9 18:59:56 2011
    Re: a small javascript...
    By: Internetking to All on Sat Apr 09 2011 11:43:00

    I would like to know how to put in newuser.js a small part where it display text file for user to read and agree like for example it display bbsrules.tx in c:/slbbs/text then it will ask you if you agree to it .. if yes then go n step if no then disconnect

    As always, when doing any programming or software development, the first resource I use is the programming documentation.. The documentation for Synchronet's JavaScript object model is located here: http://www.synchro.net/docs/jsobjs.html

    If you are not familiar with JavaScript, I would suggest first reading through a JavaScript tutorial and trying to write some of your own little scripts to work with it a little so you can get more familiar with it.

    For the first part of what you want to do, to display a text file, you might be able to use console.printfile(), or maybe bbs.menu(). For the second part, to ask the user a yes/no question, you could use console.yeseno() (if the default answer is to be "yes") or console.noyes() (if the default answer is to be "no").

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com
  • From Internetking@VERT/THRWHITE to Nightfox on Sun Apr 10 02:35:00 2011
    Re: a small javascript...
    By: Nightfox to Internetking on Sat Apr 09 2011 06:59 pm

    I would like to know how to put in newuser.js a small part where it disp text file for user to read and agree like for example it display bbsrules in c:/slbbs/text then it will ask you if you agree to it .. if yes then g step if no then disconnect

    As always, when doing any programming or software development, the first resource I use is the programming documentation.. The documentation for Synchronet's JavaScript object model is located here: http://www.synchro.net/docs/jsobjs.html

    okay i read it that leads another question about that link...


    If you are not familiar with JavaScript, I would suggest first reading throu a JavaScript tutorial and trying to write some of your own little scripts to work with it a little so you can get more familiar with it.

    which is the best books, and/or website to read about it?

    For the first part of what you want to do, to display a text file, you might able to use console.printfile(), or maybe bbs.menu(). For the second part, ask the user a yes/no question, you could use console.yeseno() (if the defau answer is to be "yes") or console.noyes() (if the default answer is to be "no").

    ok another question about this....


    i found something on that website link you gave above....


    hangupvoidbbs.hangup() 3.10 hangup (disconnect) immediately

    so...

    how will that work...

    if person choose no then it will run above and if person say yes then it will go next steps in the newuser.js file....


    thanks again....



    ---
    þ Synchronet þ The Whitehouse of Sex - whitehouse.hulds.com - the kinky bbs!!!
  • From Nightfox@VERT/DIGDIST to Internetking on Sun Apr 10 09:30:10 2011
    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 02:35:00

    If you are not familiar with JavaScript, I would suggest first reading th a JavaScript tutorial and trying to write some of your own little scripts work with it a little so you can get more familiar with it.

    which is the best books, and/or website to read about it?

    I've just tended to search for JavaScript online and read the web sites & tutorials I've come across online.. I don't have any specific best books/websites I feel like I can recommend - just that Google is your friend. :)

    i found something on that website link you gave above.... hangupvoidbbs.hangup() 3.10 hangup (disconnect) immediately
    so...

    if person choose no then it will run above and if person say yes then it wi go next steps in the newuser.js file....

    Not sure what you're asking.. Are you asking me to write your script for you?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com
  • From Internetking@VERT/THRWHITE to Nightfox on Sun Apr 10 13:28:00 2011
    Re: a small javascript...
    By: Nightfox to Internetking on Sun Apr 10 2011 09:30 am

    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 02:35:00

    If you are not familiar with JavaScript, I would suggest first reading a JavaScript tutorial and trying to write some of your own little scri work with it a little so you can get more familiar with it.

    which is the best books, and/or website to read about it?

    I've just tended to search for JavaScript online and read the web sites & tutorials I've come across online.. I don't have any specific best books/websites I feel like I can recommend - just that Google is your friend :)

    i found something on that website link you gave above.... hangupvoidbbs.hangup() 3.10 hangup (disconnect) immediately
    so...

    if person choose no then it will run above and if person say yes then it go next steps in the newuser.js file....

    Not sure what you're asking.. Are you asking me to write your script for yo

    well i am trying to get to know how to do the small snippet to put in my newuser.js on this concept and i am trying to make something work what you have suhhested here... but i will do research on it but any help is always apprecated i am still learning this part lol

    ---
    þ Synchronet þ The Whitehouse of Sex - whitehouse.hulds.com - the kinky bbs!!!
  • From Corey@VERT/TSGC to Internetking on Sun Apr 10 21:25:23 2011
    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 01:28 pm

    Re: a small javascript...
    By: Nightfox to Internetking on Sun Apr 10 2011 09:30 am

    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 02:35:00

    If you are not familiar with JavaScript, I would suggest first read a JavaScript tutorial and trying to write some of your own little s work with it a little so you can get more familiar with it.

    which is the best books, and/or website to read about it?

    I've just tended to search for JavaScript online and read the web sites & tutorials I've come across online.. I don't have any specific best books/websites I feel like I can recommend - just that Google is your fri :)

    i found something on that website link you gave above.... hangupvoidbbs.hangup() 3.10 hangup (disconnect) immediately
    so...

    if person choose no then it will run above and if person say yes then go next steps in the newuser.js file....

    Not sure what you're asking.. Are you asking me to write your script for

    well i am trying to get to know how to do the small snippet to put in my newuser.js on this concept and i am trying to make something work what you have suhhested here... but i will do research on it but any help is always apprecated i am still learning this part lol


    small java? demitasse?

    "Practise safe Lunch, Use a Condiment"


    ---
    þ Synchronet þ Three Stooges Gentlemens Club - Las Vegas, Nv
  • From Internetking@VERT/THRWHITE to Corey on Mon Apr 11 03:48:00 2011
    On Sun, 10 Apr 2011, Corey wrote:

    Date: Sun, 10 Apr 2011 21:25:00 -0700
    From: Corey <corey@VERT/TSGC>
    To: Internetking
    Newsgroups: DOVE-Net.Synchronet_JavaScript
    Subject: a small javascript...


    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 01:28 pm

    Re: a small javascript...
    By: Nightfox to Internetking on Sun Apr 10 2011 09:30 am

    Re: a small javascript...
    By: Internetking to Nightfox on Sun Apr 10 2011 02:35:00

    If you are not familiar with JavaScript, I would suggest first read
    a JavaScript tutorial and trying to write some of your own little s
    work with it a little so you can get more familiar with it.

    which is the best books, and/or website to read about it?

    I've just tended to search for JavaScript online and read the web sites &
    tutorials I've come across online.. I don't have any specific best books/websites I feel like I can recommend - just that Google is your fri
    :)

    i found something on that website link you gave above.... hangupvoidbbs.hangup() 3.10 hangup (disconnect) immediately
    so...

    if person choose no then it will run above and if person say yes then
    go next steps in the newuser.js file....

    Not sure what you're asking.. Are you asking me to write your script for

    well i am trying to get to know how to do the small snippet to put in my newuser.js on this concept and i am trying to make something work what you
    have suhhested here... but i will do research on it but any help is always apprecated i am still learning this part lol


    small java? demitasse?



    just a small snippet to stick in newusers.js file forcing new users to
    read documents with asking yes or no ....


    yes = goes on next step
    no = hangup

    ---
    þ Synchronet þ The Whitehouse of Sex - whitehouse.hulds.com - the kinky bbs!!!
  • From Digital Man@VERT to Internetking on Mon Apr 11 16:22:41 2011
    Re: a small javascript...
    By: Internetking to All on Sat Apr 09 2011 11:43 am


    Hello all...

    I would like to know how to put in newuser.js a small part where it
    display a text file for user to read and agree like for example it display bbsrules.txt in c:/slbbs/text then it will ask you if you agree to it .. if yes then go next step if no then disconnect

    Here's an example (untested):

    console.printfile("c:/slbbs/text/bbsrules.txt");
    if(console.noyes("Do you agree to the BBS rules"))
    bbs.hangup();

    digital man

    Snapple "Real Fact" #74:
    You share your birthday with 9 million others in the world.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Internetking@VERT/THRWHITE to Digital Man on Tue Apr 12 06:20:00 2011
    On Mon, 11 Apr 2011, Digital Man wrote:

    Date: Mon, 11 Apr 2011 16:22:00 -0700
    From: Digital Man <digital.man@TIME/VERT>
    To: Internetking
    Newsgroups: DOVE-Net.Synchronet_JavaScript
    Subject: a small javascript...


    Re: a small javascript...
    By: Internetking to All on Sat Apr 09 2011 11:43 am


    Hello all...

    I would like to know how to put in newuser.js a small part where it display a text file for user to read and agree like for example it display bbsrules.txt in c:/slbbs/text then it will ask you if you agree to it .. if yes then go next step if no then disconnect

    Here's an example (untested):

    console.printfile("c:/slbbs/text/bbsrules.txt");
    if(console.noyes("Do you agree to the BBS rules"))
    bbs.hangup();

    Okay it seems newuser.js is not the file i want... i want it to be read
    before the regstration is actually saved to the BBS database... how can
    this be done before that so will not be a waste of time deleting people
    who did not agree to it....

    ---
    þ Synchronet þ The Whitehouse of Sex - whitehouse.hulds.com - the kinky bbs!!!
  • From Digital Man@VERT to Internetking on Tue Apr 12 15:19:11 2011
    Re: Re: a small javascript...
    By: Internetking to Digital Man on Tue Apr 12 2011 06:20 am

    On Mon, 11 Apr 2011, Digital Man wrote:

    Date: Mon, 11 Apr 2011 16:22:00 -0700
    From: Digital Man <digital.man@TIME/VERT>
    To: Internetking
    Newsgroups: DOVE-Net.Synchronet_JavaScript
    Subject: a small javascript...


    Re: a small javascript...
    By: Internetking to All on Sat Apr 09 2011 11:43 am


    Hello all...

    I would like to know how to put in newuser.js a small part where it display a text file for user to read and agree like for example it display bbsrules.txt in c:/slbbs/text then it will ask you if you agree to it .. if yes then go next step if no then disconnect

    Here's an example (untested):

    console.printfile("c:/slbbs/text/bbsrules.txt");
    if(console.noyes("Do you agree to the BBS rules"))
    bbs.hangup();

    Okay it seems newuser.js is not the file i want... i want it to be read before the regstration is actually saved to the BBS database... how can
    this be done before that so will not be a waste of time deleting people
    who did not agree to it....

    Use the built-in "magic word" feature:
    1. Set SCFG->System->Advanced Options->New User Magic Word to "agree".
    2. Put your agreement text in the 'MagicWordPrompt' line of your ctrl/text.dat file (using the @TYPE or @INCLUDE codes to print an external text/ANSI file if that is your preference) and ask the user to type "AGREE". If they do not, they will be disconnected and the account will not be created.
    3. You can change the 'FailedMagicWord' line in your ctrl/text.dat to explain that agreement of terms is required for membership to the BBS (or something like that).

    digital man

    Synchronet "Real Fact" #23:
    The Digital Dynamics company ceased day-to-day opperations in late 1995.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Access Denied@VERT/PHARCYDE to Digital Man on Tue Apr 12 20:58:34 2011
    Re: a small javascript...
    By: Digital Man to Internetking on Mon Apr 11 2011 04:22 pm

    Here's an example (untested):

    console.printfile("c:/slbbs/text/bbsrules.txt");
    if(console.noyes("Do you agree to the BBS rules"))
    bbs.hangup();

    Just chiming in on this one trying to understand some simple javascript. So if you use console.noyes and have bbs.hangup(); right after it, the no is highlighted (as it being noyes rather than yesno) so that only happens if no is used? And it would work vice versa? Now if yes is selected, it automatically bypasses the bbs.hangup(); ? I'm just asking because I have very little coding intelligence, and whatever I did have back in the 90s had a lot to do with if/then or else statements in order to do what seems so easy in two lines with javascript. :)

    axisd

    ---
    þ Synchronet þ thePharcyde_ >> telnet://bbs.pharcyde.org (Wisconsin)
  • From Digital Man@VERT to Access Denied on Wed Apr 13 08:55:39 2011
    Re: a small javascript...
    By: Access Denied to Digital Man on Tue Apr 12 2011 08:58 pm

    Re: a small javascript...
    By: Digital Man to Internetking on Mon Apr 11 2011 04:22 pm

    Here's an example (untested):

    console.printfile("c:/slbbs/text/bbsrules.txt");
    if(console.noyes("Do you agree to the BBS rules"))
    bbs.hangup();

    Just chiming in on this one trying to understand some simple javascript. So if you use console.noyes and have bbs.hangup(); right after it, the no is highlighted (as it being noyes rather than yesno) so that only happens if
    no is used? And it would work vice versa? Now if yes is selected, it automatically bypasses the bbs.hangup(); ? I'm just asking because I have very little coding intelligence, and whatever I did have back in the 90s
    had a lot to do with if/then or else statements in order to do what seems
    so easy in two lines with javascript. :)

    Yes, the if() is checking if the code inside the () evaluates to true or not. In the case of console.noyes(), it returns true when the user selects "no". The nested expression(s), in this case, bbs.hangup() is only executed if the if() test evaluates to true.

    digital man

    Synchronet "Real Fact" #19:
    Michael Swindell was directly responsible for Synchronet's commercial success.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Access Denied@VERT/PHARCYDE to Digital Man on Wed Apr 13 18:22:31 2011
    Re: a small javascript...
    By: Digital Man to Access Denied on Wed Apr 13 2011 08:55 am

    Yes, the if() is checking if the code inside the () evaluates to true or not In the case of console.noyes(), it returns true when the user selects "no". nested expression(s), in this case, bbs.hangup() is only executed if the if( test evaluates to true.

    Understood. And thank you for clarifying.

    axisd

    ---
    þ Synchronet þ thePharcyde_ >> telnet://bbs.pharcyde.org (Wisconsin)
  • From Tracker1@VERT/TRN to Internetking on Tue Apr 19 06:56:44 2011
    On 4/11/2011 7:06 PM, Internetking wrote:
    Okay it seems newuser.js is not the file i want... i want it to be read before the regstration is actually saved to the BBS database... how can
    this be done before that so will not be a waste of time deleting people
    who did not agree to it....

    run it from inside your login.js as part of the newuser action... right before it does the createuser.

    --
    Michael J. Ryan - http://tracker1.info/

    ---
    þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com
  • From guardian@VERT/TRN to Tracker1 on Sun Apr 24 13:18:09 2011
    Re: Re: a small javascript...
    By: Tracker1 to Internetking on Tue Apr 19 2011 06:56:44

    On 4/11/2011 7:06 PM, Internetking wrote:
    Okay it seems newuser.js is not the file i want... i want it to be read before the regstration is actually saved to the BBS database... how can this be done before that so will not be a waste of time deleting people who did not agree to it....

    run it from inside your login.js as part of the newuser action... right befo it does the createuser.

    well i cant find it.... you mean here?


    // New user application?
    if(str.toUpperCase()=="NEW") {
    if(bbs.newuser()) {
    bbs.logon();
    exit();
    }


    ---
    þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com