|
|
Username character limit and restrictions
|
|
Date: 2008/02/06 19:12
|
By: mediaguru
|
Status:
|
|
|
Karma: 59  
|
|
Platinum Joomlapolitan  | Posts: 792 |   | |
|
I created a little javascript which only allows numbers and letters in the username field. If they type in something else, or even a space, a popup comes up and tells them they need to redo it and it wipes out the text they put in the field.
I'm no pro. I did an "onkeyup" to trigger the javascript so I had to disable username checking which also works on key up.
I also put maxlength="16" in there to restrict the username to 16 characters.
Attached is a .zip file of my cb.core.php file which has everything working. (components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php)
You can see it in action on the registration page of http://www.thegolfspace.com or http://www.themacspace.com
This is a hack for cb 1.1 and NOT any earlier version. When a new version comes out, this would be wiped out by the upgrade so you'd have to put the code in again...
I make no guarantees but it works on my sites. CB WISHLIST
1. Contextual (member type) registration fields (business, personal, artist etc). 2. Photo gallery style search results (like myspace) 3. Comments on profile gallery photos. 4. Auto resize profile images in backend. 5. Customizable user web pages (see tagworld) 6. Images in CB fields/tabs.
My main CB site: http://www.thegolfspace.com Check out my newest CB site: http://www.themacspace.com My Karma (user rating) suite now in the CB Directory!
|
|
The administrator has disabled public write access. |
|
|
|
Re:Username character limit and restrictions
|
|
Date: 2008/02/09 15:32
|
By: montana
|
Status:
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 74 |   | |
|
nice! This is one of the important function that i need!
I replaced the file a my livesite, i have now (16 characters max)
but the javascript do denie empty space does not work
when i go to your sites and test,it works. how can i solve this??
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:Username character limit and restrictions
|
|
Date: 2008/02/16 22:39
|
By: ferrit
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 2 |   | |
|
superb! attached hack disable spaces and non-english character only in firefox. On http://www.thegolfspace.com limitation enable in all brousers - it is cool to see this modification.
|
|
The administrator has disabled public write access. |
|
|
|
Re:Username character limit and restrictions
|
|
Date: 2008/02/17 19:05
|
By: mediaguru
|
Status:
|
|
|
Karma: 59  
|
|
Platinum Joomlapolitan  | Posts: 792 |   | |
|
Are you guys saying that it doesn't work in IE, yet on my site it does work on FF and IE? CB WISHLIST
1. Contextual (member type) registration fields (business, personal, artist etc). 2. Photo gallery style search results (like myspace) 3. Comments on profile gallery photos. 4. Auto resize profile images in backend. 5. Customizable user web pages (see tagworld) 6. Images in CB fields/tabs.
My main CB site: http://www.thegolfspace.com Check out my newest CB site: http://www.themacspace.com My Karma (user rating) suite now in the CB Directory!
|
|
The administrator has disabled public write access. |
|
|
|
Re:Username character limit and restrictions
|
|
Date: 2008/02/19 12:59
|
By: montana
|
Status:
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 74 |   | |
|
Yes, it doesn't work in IE by my site,but it works on FF
On your site it does work on FF and IE! how comes?
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:Username character limit and restrictions
|
|
Date: 2008/02/19 19:05
|
By: ferrit
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 2 |   | |
|
mediaguru wrote: Are you guys saying that it doesn't work in IE, yet on my site it does work on FF and IE?
Yes, in other sites work only in FF.
|
|
The administrator has disabled public write access. |
|
|