• 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

Please help changing the nickname

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

Post a reply
3 posts • Page 1 of 1

Postby achmad » Wed Jan 19, 2011 1:55 am

I just wanted the nickname as same as logged username, name of my file is chat.php & my code is:
Code: Select all
<?php
session_start();
define ('IN_SITE', 1);
include_once ('includes/global.php');
include_once ('includes/class_formchecker.php');
include_once ('includes/class_custom_field.php');
include_once ('includes/class_item.php');
include_once ('includes/class_shop.php');
include_once ('global_header.php');

(array) $user_details = null;
if ($session->value('user_id'))
{
   $user_details = $db->get_sql_row("SELECT * FROM
      " . DB_PREFIX . "users WHERE user_id=" . $session->value('user_id'));
}


if ($session->value('membersarea')!='Active')
{
   if ($session->value('user_id')) /* user inactive - redirect to account management page */
   {
      header_redirect('members_area.php?page=account§ion_management');
   }
   else
   {
      header_redirect('login.php?redirect=chat.php');

   }

}
require_once dirname(__FILE__)."/chat/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = $session->value('user_id');// setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = false; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );

   $chat->printChat();
include_once ('global_footer.php');
echo $template_output;
?>

please help, the nickname doesn;t change, it only shown
Code: Select all
""
achmad
New member
 
Posts: 2
Joined: Tue Jan 18, 2011 10:26 pm
Top

Postby achmad » Wed Jan 19, 2011 7:13 am

oh please.
achmad
New member
 
Posts: 2
Joined: Tue Jan 18, 2011 10:26 pm
Top

Postby OldWolf » Wed Jan 19, 2011 10:31 pm

You have the nick set up correctly, I can't tell you how to make your methods work though, especially since I have no idea what's going on with them. Try doing an echo on the nick method and check and see if it's correctly outputting?
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


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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