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
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
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.
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").
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 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....
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
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
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?
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
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();
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....
Here's an example (untested):
console.printfile("c:/slbbs/text/bbsrules.txt");
if(console.noyes("Do you agree to the BBS rules"))
bbs.hangup();
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". nested expression(s), in this case, bbs.hangup() is only executed if the if( test evaluates to true.
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....
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.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,041 |
Nodes: | 15 (0 / 15) |
Uptime: | 84:39:08 |
Calls: | 500,913 |
Files: | 109,372 |
D/L today: |
688 files (168M bytes) |
Messages: | 304,825 |
Posted today: | 3 |