• 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

Login with nickname using the Get command

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

Post a reply
9 posts • Page 1 of 1

Postby wattaman » Thu Mar 03, 2011 6:06 pm

Hi!
I'm not such a good coder so I'll skip to the example without writing too much. I have this in my index.php file:
<?php
// $user = $_GET['nick'];
$params["nick"] = $_GET['nick']; // setup the intitial nickname
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["shownotice"] = 3; // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
$params["max_nick_len"] = 20; // nickname length could not be longer than 10 caracteres
$params["max_text_len"] = 200; // a message cannot be longer than 50 caracteres
$params["max_channels"] = 3; // limit the number of joined channels tab to 3
$params["max_privmsg"] = 1; // limit the number of private message tab to 1
$params["refresh_delay"] = 5000; // chat refresh speed is 10 secondes (10000ms)
$params["max_msg"] = 15; // max message in the history is 15 (message seen when reloading the chat)
$params["height"] = "230px"; // height of chat area is 230px
$params["debug"] = false; // activate debug console
$params["connect_at_startup"] = true;
$params["start_minimized"] = false;
$params["nickmarker"] = true;
$params["clock"] = false;

... and I'm trying to login automatically using links like this: chat/index.php?nick=my-chosen-nickname
Well, it doesn't works, the first nickname remains and it doesn't matter what I replace my-chosen-nickname, it will log me with the same my-chosen-nickname nickname. I've also tried to set the frozen_nick to false but doesn't do what I want.
So, how can I do this?
Thanks!
wattaman
New member
 
Posts: 5
Joined: Thu Mar 03, 2011 5:53 pm
  • Website
Top

Postby re*s.t.a.r.s.*2 » Fri Mar 04, 2011 3:29 am

Hi there,

Supper global array GET doesn't work well with this chat script, you need to set what ever GET string o a page before put it on a session then redirect it to the index.php..

regards..
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby wattaman » Sun Mar 13, 2011 4:26 am

so, what exactly needs to contain the file with the GET command?
Thanks!
wattaman
New member
 
Posts: 5
Joined: Thu Mar 03, 2011 5:53 pm
  • Website
Top

Postby OldWolf » Sun Mar 13, 2011 7:43 pm

Basically the file will look at what's in the GET, "scrub" it (that is, get rid of bad characters and the like), and set it into a session variable. Then it will forward to the actual chat, which will require that session variable, and use it.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby wattaman » Tue Mar 29, 2011 4:02 pm

Can somebody please make these two files? I have no idea how to.
Thank you!
wattaman
New member
 
Posts: 5
Joined: Thu Mar 03, 2011 5:53 pm
  • Website
Top

Postby OldWolf » Tue Mar 29, 2011 10:43 pm

I'm afraid I can't. Maybe someone else will.

Also, the report feature of this forum is not for personal requests... it's to report violations to the forum rules.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby wattaman » Wed Mar 30, 2011 12:49 pm

Well, thanks for the suggestions, anyway.
I don't know what you mean with the report feature, I didn't report anyone, as far as I know... maybe I clicked something by mistake !?! Sorry.
wattaman
New member
 
Posts: 5
Joined: Thu Mar 03, 2011 5:53 pm
  • Website
Top

Postby OldWolf » Thu Mar 31, 2011 6:59 am

You clicked report below a post and asked me to write the pages for you.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby wattaman » Thu Mar 31, 2011 5:20 pm

OldWolf wrote:You clicked report below a post and asked me to write the pages for you.

Sorry, it was a mistake; haven't even noticed. Probably I wanted to quote.
wattaman
New member
 
Posts: 5
Joined: Thu Mar 03, 2011 5:53 pm
  • Website
Top


Post a reply
9 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 14 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