![]() |
Hi all.
I have a client that runs a board that has about 100 members that are his personal friends, and the other 3400 members are just regular users. Lately poeple have been registering with usernames very similar to those of his friends, and his friends are complaining. He asked me for a way to display a list of usernames that "sound like" or "are similar to" existing users, so that when he moderates user registrations it's easy to make a decision as to allow the new user or not. Anyway, this VERY simple hack searches the database for existing usernames, and checks to see if they are similar to the username that is being registered. If it finds any, it simply lists them. The system uses my own combination of metaphone and levenshtein to try to find similar matches. There are options in the code to limit the number of returned matches, and to set the "tolerance level" of the search. A higher tolerance allows more matches. Did I mention this was an EXCEEDINGLY simple hack? The only modifications are to admin/user.php. You need to add two bits of code. The first is around line 1182, when you see the following code: PHP Code:
PHP Code:
PHP Code:
PHP Code:
I'd very much like to get as much feedback as possible for this, so don't hold back! If you have any suggestions, or ways to optimize the code further, also let me know. -DLST |
Nice hack. I probably won't use it, but it's good nonetheless. :up:
|
Quote:
Is there any way to extend the searchin' for dupes also to email and IPs, giving out the same list of dupe usernames (for instance, specifying which would the matching field...) ? (as we discussed in Beta releases) Thanks again. Bye |
Would this hack work if moderating new users isn't in effect? (affect?) I don't moderate my new members, but it would be good to display similar usernames for them to see before they decide on a name. Also, will this work in conjuction with PPN's "Name Checker" hack?
|
Quote:
I have not tested this in conjunction with PPN's "Name Checker" hack, in fact I've never heard of that one. Sorry. |
No probs. :D Thanks, though, I'll look into modifying it if I get time. :D
|
Quote:
Well, as you know, I would need an enhancement of the hack like we talked a lot about. So, I'm trying to realize it myself learning something about php seek... :) This way, hope it shouldn't a problem to you ? Even not too much requested, at the end I would publish here my hack based on yours (actually it's based only upon the junction between metaphone() and levenstein()), even I made a lot of variants to manage short words which should become false alarms. Also the interface is much different as I'll list in a new page and more... What do you think about ? Thnx |
Sounds great!
|
very handy hack to have :) thnx much.
|
All times are GMT. The time now is 12:35 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|