• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

naming policy

 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
how about preventing users to register if their username does not conform the naming policys ?
it is anoying to click on a thread and to find out that the only answer is the "we have a naming pol..."
is this possible ? / stupid ? / good ? /
karl
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not possible with the current software. However, we would like suggestions about other ways to deal with naming policy violators.

Some things that have already been suggested include:
1) email the violator and disable his account (if he registered with a fake name, his email address is probably also fake)
2) delete the thread and disable the account (it might be a good question)
3) close the thread and disable the account(may prevent someone with a good answer from posting to that thread)

Any other thoughts?
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marilyn deQueiroz:
This is not possible with the current software.

I've seen a thread where Paul Wheaton says he is reluctant to hack the perl to enforce the naming policy because it is possible that some other stuff might not work. Wouldn't it be possible to do a minor hack to the code, where it generates the registration page, to add some HTML to import some external JavaScript code in order to perform client-side form validation to enforce the naming policy?
Not a perfect solution, since disabling JavaScript would get around it, but possibly a compromise.
[This message has been edited by Jason Menard (edited July 10, 2001).]
 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
yes, what about checking the name with Javascript. only simple checks like is it 2 parts, separated by a space.
if you submit the form by calling submit() function and not with the submit button, then you can even prevent "javascript-off-switchers" from subscribing with wrong names.

karl
 
paul wheaton
Trailboss
Pie
Posts: 21600
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm open to trying something like that. We would need somebody with a lot of JavaScript experience to work with a sheriff that is willing to donate time to such a project ....
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is some code which demonstrates the concept:

**Note: Couldn't figure out how to turn html off for this one so I replaced the html containers with '|'. Sorry about that, but it gets the idea across.
I would be happy to provide any assistance required.
Jason

[This message has been edited by Jason Menard (edited July 13, 2001).]
[This message has been edited by Jason Menard (edited July 16, 2001).]
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this error when I tried testing your data entry.

Method Not Allowed
The requested method POST is not allowed for the URL /ubb/Forum10/HTML/000645.html.

--------------------------------------------------------------------------------
Apache/1.3.17 Server at www.javaranch.com Port 80
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajith Kallambella:
I got this error when I tried testing your data entry.
[b]
Method Not Allowed
The requested method POST is not allowed for the URL /ubb/Forum10/HTML/000645.html.

Yeah it was interpreting the html and I was just trying to display the code. I did a cheap workaround so you can look at it now.
Jason
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jason Menard:
Here is some code which demonstrates the concept:

Notice "method=POST"

Reread Ajith's comment.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marilyn deQueiroz:
[B]
Originally posted by Jason Menard:
Here is some code which demonstrates the concept:

Notice "method=POST"

Reread Ajith's comment.[/B]

I read the comment. Ajith executed an html form I had inadvertantly embedded in this page. The method was POST, which is what you normally do with a form, and there was no ACTION specified. When there is no ACTION specified it implies the ACTION is the current page. Naturally my example trying to POST to THIS page will cause an error which is what happened. The point of the example was to demonstrate the javascript. If you take the code and put it in its own html file the demo will work..
Or have I totaly missed the point and you mean something else?
Jason
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well,
The html that contains the form where you enter your new user name etc. is dynamically generated by a cgi program so, to add the javascript, we would have to hack the perl script for it.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always put the java script into a .js file then just include it in the html file that is generated. That way all you have to get into the perl is the include line.
Dave
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also have to modify the < form> line to reflect the onSubmit() call. It's really a fairly minor perl hack, especially if as suggested the js file is included from an external source.
Specifically it looks like the javascript could be put into ubb/noncgi/Templates/public_register_page.pl and public_register_page_kid.pl
As a side note, to enforce the naming policy within ubb (non-js), it should be very simple. Just insert an appropriate regex in sub illegal_name_check in the ubb_lib.cgi file.
Jason
[This message has been edited by Jason Menard (edited July 16, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic