vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Only allow letters, numbers, and underscore in usernames (https://vborg.vbsupport.ru/showthread.php?t=96660)

007 09-21-2005 03:53 PM

Only allow letters, numbers, and underscore in usernames
 
I hate it when people sign up with ASCII characters in their usernames. There was a hack for 3.7 that made it so people could only use letters, numbers, and underscores in their usernames.

This would be so convenient to have for 3.5, especially since now that I upgraded, people have started signing up with annoying ASCII names again.

I'm sure everybody could use this as well. I have no clue why it's not a default feature by now.. but either way, there are a lot of vb owners who would love to see this based on how popular the last hack was. :)

Thanks to anybody who wants to take this on. It should just be a line or two of code, most likely possible as a plugin... but I don't understand 3.5 enough to know where to do it, or how exactly.

~007

Andreas 09-21-2005 04:30 PM

1 Attachment(s)
Slightly modified from http://www.vbulletin.com/forum/showthread.php?t=152162

007 09-21-2005 08:33 PM

To also allow hyphens and spaces would I put this? [a-zA-Z0-9_- ]

Thanks.

Just had an idea. Would it be possible to restrict these characters in realtime using AJAX? So if they type in a character that isn't allowed, it won't even show up in the field? If it's possible that would be pretty cool.. Like how in some fields you can only type so many letters and then it autodeletes any extras as you type.

That's how Google Adwords works when you set up your ads..

007 10-01-2005 05:25 AM

delete

007 12-13-2005 01:33 AM

What would I put in order to only allow one space or underscore per username, and not at the beginning or end? A user signed up recently with multiple ___ in it before having any letters. It looks really stupid like that and I want to stop people from doing it. It would also be nice to stop people from SHOUTING in usernames.

Thanks for any ideas.


All times are GMT. The time now is 12:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01091 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete