Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Advertise on this site

Joomlapolis Forums  


<< Start < Prev 1 2 3 Next > End >>
Username character limit and restrictions
Date: 2008/02/06 19:12 By: mediaguru Status: CB Doc subscriber  
Karma: 57  
Platinum Joomlapolitan

Posts: 719
graphgraph
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.
File Attachment:
File name: cb-7d9ce577111522b3ed578044c73ea6f8.zip
File size:6374 bytes

CB Wishlist:
1. Upload image on CB registration.
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.
7. Contextual (member type) registration fields (business, personal, artist etc).
8. Username restrictions: no spaces, limit name length, text & numbers only. See this thread for my hack:
http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/catid,24/id,56181/ #56181

Mamblog sucks. MyBlog doesn't.

http://www.thegolfspace.com/tony

Check out my latest CB site:

The Mac Space
http://www.themacspace.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Username character limit and restrictions
Date: 2008/02/09 15:32 By: montana Status: CB Doc subscriber  
Karma: 2  
Senior Joomlapolitan

Posts: 72
graphgraph
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??
Click here to see the profile of this user 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
graphgraph
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.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Username character limit and restrictions
Date: 2008/02/17 19:05 By: mediaguru Status: CB Doc subscriber  
Karma: 57  
Platinum Joomlapolitan

Posts: 719
graphgraph
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. Upload image on CB registration.
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.
7. Contextual (member type) registration fields (business, personal, artist etc).
8. Username restrictions: no spaces, limit name length, text & numbers only. See this thread for my hack:
http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/catid,24/id,56181/ #56181

Mamblog sucks. MyBlog doesn't.

http://www.thegolfspace.com/tony

Check out my latest CB site:

The Mac Space
http://www.themacspace.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Username character limit and restrictions
Date: 2008/02/19 12:59 By: montana Status: CB Doc subscriber  
Karma: 2  
Senior Joomlapolitan

Posts: 72
graphgraph
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?
Click here to see the profile of this user 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
graphgraph
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.
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 3 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC2, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login