• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Nickname trouble

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
6 posts • Page 1 of 1

Postby Mania » Fri Mar 16, 2007 11:27 am

I've read bunch of other posts about nicknames but did not find these mentioned/solved.

1. If I set $params["frozen_nick"] = true; I can't change to admin anymore in order to kick people out. Is it possible to have nicknames frozen yet still change your nick to admin? One thing about changing to admin too: if a visitor changes his/her name to admin (without identifying) can I still change my name to admin or will it say the name is in use?

2. Auto-generating guest names. I could have sworn I had this working at some point. Case: I open the chat in one browser and I get "Guest". I open the chat with another browser and I get "Guest29" or some other random number. However, now I just get the message "nicknames cannot be changed" since the $params["frozen_nick"] = true; and the chat freezes. Any ideas?

3. I'd like to have $params["frozen_nick"] = false; but ran into some trouble. I give logged in users their own nickname to the chat from the database. I would like the visitors to change their name to whatever but give certain rules to it like not having some letters in the beginning etc. So logged in users would have like @-char in the beginning but visitors couldn't have that. How would I implement this?

Thanks for anyone sharing some light into these. I'm getting pretty close to integrating the chat into my site. :)

I'm running the 1.0 beta9.
Mania
Member
 
Posts: 11
Joined: Fri Mar 02, 2007 7:22 am
Top

Postby Mania » Sun Mar 25, 2007 7:52 am

Apparently I'm asking too complicated questions.. :/

Could someone at least point me to a way on how to put a character in front of a nickname? For example a normal visitor sets his nickname intro "Andy" and the system would automatically display it as "_Andy".
Mania
Member
 
Posts: 11
Joined: Fri Mar 02, 2007 7:22 am
Top

Postby pinup57 » Sun Mar 25, 2007 9:22 am

For instance: (example if your site uses Joomla! database)

$user = new mosUser( $database );
$name = $user->get( 'name' );
$params["nick"] = ("*".$name);

This will display an asterisk before the username.

For the second question, are you sure you use 2 different browsers, like 1 instance of Firefox and another of IE? If the browsers are not different, they'll share the same cookie so indeed you cannot change username for the second instance, that's logical behaviour.

And the first question: did you specify admins? You should.

Dirk
Last edited by pinup57 on Sun Mar 25, 2007 9:22 am, edited 1 time in total.
pinup57
Member
 
Posts: 89
Joined: Sat Feb 24, 2007 8:13 am
Top

Postby Mania » Sun Mar 25, 2007 11:07 am

Thanks for the reply. I was however asking about a way to set an asterisk in front of a normal username (not from a database). How would I implement this?
Mania
Member
 
Posts: 11
Joined: Fri Mar 02, 2007 7:22 am
Top

Postby pinup57 » Sun Mar 25, 2007 11:36 am

Ah, sorry... I replied to your original question:
I give logged in users their own nickname to the chat from the database. I would like the visitors to change their name to whatever but give certain rules to it like not having some letters in the beginning etc. So logged in users would have like @-char in the beginning but visitors couldn't have that. How would I implement this?

I guess that putting a special character in front of a user-supplied nickname would need to either hack the source code (nick.class.php) or create a custom command class that overrides or extends nick.class.php. There might be a simpler way of doing so, but I doubt about that.

Dirk
pinup57
Member
 
Posts: 89
Joined: Sat Feb 24, 2007 8:13 am
Top

Postby phpfreechat » Sun Mar 25, 2007 3:49 pm

You can also write a proxy that will prepend the "*" characters to /nick parameter.
Look at the censor proxy for a concrete example.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
6 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 7 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub