vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Forbid the use of some symbols in USERNAME (https://vborg.vbsupport.ru/showthread.php?t=96922)

ghroob 09-25-2005 10:00 PM

Forbid the use of some symbols in USERNAME
 
Hi all...
It came to my mind to put a code to forbid the use of some characters & symbols in members' usernames when they first register at my forums..

Sometimes usage of these characters & symbols leads to usernames like: .:*#juggler#*:. and so..

this code simply allow users to just register with Letters, Numbers and Space..

share your opinion :)

Salam..

Boofo 09-26-2005 08:00 AM

You can just add whatever characters you don't want them to use in the vBulletin options. ;)

ghroob 09-26-2005 08:04 AM

Quote:

Originally Posted by Boofo
You can just add whatever characters you don't want them to use in the vBulletin options. ;)

Ok.. u r right..

but my solution is the alternate if u just dont want to type all these symbols in your vbulletin options :)

kall 09-26-2005 08:25 AM

What would be nice is the ability to deny spaces in usernames at reg.

(Boofo: where can we specify characters? Is it the place we specify names?)

ghroob 09-26-2005 08:30 AM

[QUOTE=kall]What would be nice is the ability to deny spaces in usernames at reg.
QUOTE]

you can remove whatever characters u want..
to deny the usage of SPACE do the following:
open the plugin PHP Code,
then search for this piece of code
Code:

        if(!in_array(ord($chars[$i]),Array(32,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,216,217,218,219,220,221,222,223,225,227,228,229,230,237)))
then remove the number "32" and the comma following it from the array ;)

Regards,

Boofo 09-26-2005 08:34 AM

Quote:

Originally Posted by kall
What would be nice is the ability to deny spaces in usernames at reg.

(Boofo: where can we specify characters? Is it the place we specify names?)

That where I have it and you should be able to use the space code in there to not allow spaces too, I would think.

kall 09-26-2005 08:41 AM

[QUOTE=ghroob]
Quote:

Originally Posted by kall
What would be nice is the ability to deny spaces in usernames at reg.
QUOTE]

you can remove whatever characters u want..
to deny the usage of SPACE do the following:
open the plugin PHP Code,
then search for this piece of code
Code:

        if(!in_array(ord($chars[$i]),Array(32,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,216,217,218,219,220,221,222,223,225,227,228,229,230,237)))
then remove the number "32" and the comma following it from the array ;)

Regards,

ghroob, if you weren't just pixels representing text on my screen, I might just kiss you.

@Boofo: You too...if you mean   or can tell me. :)

Daniel 09-26-2005 10:18 PM

Where can we edit the symbols in vbulletin options?

ged 09-27-2005 03:57 PM

This is a wonderful hack, thank you very much! :)

Xplorer4x4 09-28-2005 05:07 AM

Quote:

Originally Posted by Danieldude
Where can we edit the symbols in vbulletin options?

Find the settings group(in vb otions) for: User Registration Options
Then find the setting for: Illegal User Names

Then just enter _ or * or any other charechter in there.

ghroob 09-29-2005 08:16 AM

thanx all for ur comments,,
and for any suggestions or updates im here :)

-=Sniper=- 10-11-2005 12:38 PM

excellent, thanks

cpzhao 11-02-2005 07:32 PM

Thank you! this is exactly what I need. I would remove the space by default if I were you, though

gldtn 11-18-2005 08:05 AM

Quote:

Originally Posted by cpzhao
Thank you! this is exactly what I need. I would remove the space by default if I were you, though

does this work with vb3.5.1? I cannot find Phrase type Error Messages

Thanks in advance

Acido 11-22-2005 04:44 AM

Quote:

Originally Posted by gldtn
does this work with vb3.5.1? I cannot find Phrase type Error Messages

Thanks in advance

Search Front-End Errors Messages ;)

------------------------------

I'm using this hack. But it show a error message for each character wrong in the nickname. If user enter 3 symbols, then he will see this:

Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space

Is it a bug?
Ideas to solve it?

Marco van Herwaarden 11-22-2005 09:44 AM

Quote:

Originally Posted by Acido
Search Front-End Errors Messages ;)

------------------------------

I'm using this hack. But it show a error message for each character wrong in the nickname. If user enter 3 symbols, then he will see this:

Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space

Is it a bug?
Ideas to solve it?

In the plugin, find:
PHP Code:

  $userdata->error('forbiddenusername'); 

Add under:
PHP Code:

break; 

(Not tested)

-=Sniper=- 11-22-2005 10:39 AM

that fixed it! thanks

Ghanem 12-11-2005 12:00 AM

thank you for the hack..
how can I implement on Arabic charcters and space only..

icemann 12-11-2005 03:33 AM

This is great for the lazy people like me, thanks & worked perfect. :)

*clicks install*

quanvo81 01-04-2006 09:44 PM

This is a cool hack, not install it rite now , but I will look forward to it.

calvin.krause 04-12-2007 08:55 PM

Does this work in version 3.6? Because I can't seem to get it to...


All times are GMT. The time now is 04:47 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.01151 seconds
  • Memory Usage 1,758KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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