trying to configure usernames(spacers etc..)

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
Luciano
Registered User
Posts: 25
Joined: Wed Oct 17, 2001 6:33 am

trying to configure usernames(spacers etc..)

Post by Luciano »

I ran into a little problem trying to configure usernames...
there is a feature where you can allow spacers _- etc... in the board settings.
there is: Alphanumeric and Spacers

but in that section is also included a real space in the username..

what I want is to allow usernames with spacers but with no space in them. Because my chat-system does not allow spaces and I want users to be able to login only once.

Example:
mr.luc is allowed
luciano_1 is allowed
luc-m is allowed
but:
mr luc is not allowed
luc and sue is not allowed

I tried to add a *{space}* in the "Disallow names" section but this does not seem to work..
so before I start modding :P my question:
is there a feature (future feature) making it possible to disallow a character (space)

or do I have to modify the reg exp in the acp?

Luc
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: trying to configure usernames(spacers etc..)

Post by Roberdin »

Why don't you just edit your chat applet to include a

Code: Select all

$chatname = str_replace('_', ' ', $user->name);
?

Though, I'm not sure of the order of that, look up the function on php.net.
Rob
halfling_hopperston
Registered User
Posts: 1
Joined: Tue May 04, 2004 9:48 am

Re: trying to configure usernames(spacers etc..)

Post by halfling_hopperston »

$chatname = str_replace(' ', '_', $user->name);

would be the correct syntax for that command i beleave
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: trying to configure usernames(spacers etc..)

Post by Roberdin »

Close enough. ;)
Rob
Luciano
Registered User
Posts: 25
Joined: Wed Oct 17, 2001 6:33 am

Re: trying to configure usernames(spacers etc..)

Post by Luciano »

Well its a little more complex than that :mrgreen:

1. it would be an immense problem modifying the chat... (its a chat server written in java that is running on another domain. The output is in html so users without java-support can use it also. The chatserver includes a custom http-server to serve the html pages).

2. the space/underscore replacement would work.. but then when the user logs into the chat directly whithout going through phpbb (the machine the chatserver runs on has no php and no apache), he would have to put in his modified usersname (which he will hardly ever remember).

3. I could of course modify the chat server.. but the username is checked a few hundred times in the code..( i'm exagerating... but its lots of work)
especially as the chat-server can also connect to other servers.. )


so i thought it would be easier to modify it in phpbb.

I will mod the thing as soon as a definitive version comes out (beta)
For the moment I'll include a hard coded javascript (checkform) in the template that will stop users from putting in spaces.

Thanx for your input

Luc
Post Reply