Nickname multiple words with spaces

First I would like to explain that on my site the nickname it going to be a business name, not a real name. My users will be logging in via their email address. Because of this I would like to use more than two names for the nickname.

 

I know that this is what you do for two names:

 


 

goto admin panel, fields builder, join form, click nickname, advanced tab - find:

preg_match( '/^[a-zA-Z0-9_-]+$/', $arg0 )

-

Replace with:

preg_match('/^[a-zA-Z0-9_-]{3,15}(| [a-zA-Z0-9_-]{3,15})$/i', $arg0)

-

Be sure everything else including the ( before the preg_match stays the same.   This will allow one or two word nicknames, with 0-9 and - _ also.

-

Change minimum value to 3 and maximum value to 31.

-

 

Next, open .htaccess in dolphin root - find:

RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?ID=$1 [QSA,L]

-

Add this line directly AFTER the above line:

RewriteRule ^([A-Za-z0-9_-]+)\ ([A-Za-z0-9_-]+)$ profile.php?ID=$1\ $2 [QSA,L]
-

That will send the double worded nicks to the profile.php for friendlyurl support (mod_rewrite).


 

However what do I need to do to change it to unlimited spaces (or at least 4)? I dont use friendly urls so the second part I am not that worried about. I think the following would work for 4 spaces, but is their a cleaner way to do it?

 

goto admin panel, fields builder, join form, click nickname, advanced tab - find:

preg_match( '/^[a-zA-Z0-9_-]+$/', $arg0 )

-

Replace with:

preg_match('/^[a-zA-Z0-9_-]{3,15}(| [a-zA-Z0-9_-]{3,15})(| [a-zA-Z0-9_-]{3,15})(| [a-zA-Z0-9_-]{3,15})/i', $arg0)

-

 

 

 

Thanks in advance,

Travis

Quote · 20 Nov 2009

Does  this  work  in  7.0.9??

Quote · 7 May 2012

I was looking for ways to let my members use two words .

This works perfectly on my site.

It was a very easy fix.

Quote · 11 Jun 2015

 

I was looking for ways to let my members use two words .

This works perfectly on my site.

It was a very easy fix.

Boonex did make changes to allow the display to show the name, including First Name and Last Name (Surname).  However, nickname remained without spaces.  I did a test on 7.1.4 and found problems using nickname with spaces in some areas of Dolphin; I remember Photos and Videos had issues.  I would do an exhaustive test on your site/test site with using nickname with spaces to make sure no issues appear.

Geeks, making the world a better place
Quote · 11 Jun 2015

I am using version 7.1.4 .

Changed the code for the nickname on the join page and added the code on .htaccess

Now my members can use up to 4 words usernames . I don't think more than 4 words

ever going to be needed and more than that it will make a mess on the look of the site.

Quote · 14 Jun 2015

Now check all areas of your site, can they upload files, photos, videos, comments etc.  Check every thing thing about your site before you pat yourself on the back with this change.  Unless Dolphin has changed since I tested this, there may be issues.

Geeks, making the world a better place
Quote · 15 Jun 2015

 

Now check all areas of your site, can they upload files, photos, videos, comments etc.  Check every thing thing about your site before you pat yourself on the back with this change.  Unless Dolphin has changed since I tested this, there may be issues.

Adding to this, try changing the upload method (e.g., from Flash to Embed). Last time I messed with this, it broke some of the JavaScript.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 15 Jun 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.