• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Guest name changes every 2 seconds

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

Post a reply
2 posts • Page 1 of 1

Guest name changes every 2 seconds

Postby tomtronix » Mon Sep 02, 2013 9:02 am

My integration with phpbb3 works fine so far, registered users are found and taken from the phpbb3 database. I also want guests to use my chat, so I create a guest-nick with 2 digit random numbers.

Both can login into the chat, but the guest-nick changes every 2 seconds randomly.

What do I do wrong?

Here is my index.php:

<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../forum/'; // Path to phpbb
$phpEx = substr(strrchr(__FILE__, '.'), 1); // Set the File extension for page-wide usage.
require($phpbb_root_path . 'common.' . $phpEx); // include the common.php file, this is important, especially for database connects.
$user->session_begin(); // Start session management
$auth->acl($user->data);
$user->setup();
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["debug"] = false;
$params["title"] = "Chat-Raum Allgemein";
$params["serverid"] = md5($params["title"]);
$params["language"] = "de_DE-informal";
$params["channels"] = array("Gemeinsamer Chat");
$params["frozen_channels"] = array("Gemeinsamer Chat");
$params["theme"] = "blune";
$params["timeout"] = 35000; // Default: 35000 = 35 sec
$params["refresh_delay"] = 2000; // Default: 2000 = 2 sec
$params["max_privmsg"] = 5; // Default: 5
$params["max_msg"] = 15; // Default: 20
$params["max_displayed_lines"] = 999; // Default: 150
$params["max_text_len"] = 500; // Default: 400
$params["shownotice"] = 0; // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
$params["clock"] = false; // Default: true
$params["frozen_nick"] = true; // do not allow to change the nickname
if ($user->data['username'] != "Anonymous") // not a guest
{
$params["nick"] = $user->data['username'];
}
else
{
$params["nick"] = "guest".rand(1,100); // setup random nickname
}
if ($user->data['group_id'] == 4 OR $user->data['group_id'] == 5) // Admins and Moderators
{
$params["isadmin"] = true;
}
else
{
$params["isadmin"] = false;
}
$chat = new phpFreeChat($params);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Chat-Raum Allgemein</title>
</head>
<body>
<?php $chat->printChat(); ?>
</body>
</html>
tomtronix
New member
 
Posts: 3
Joined: Fri Aug 30, 2013 1:46 pm
Top

Re: Guest name changes every 2 seconds

Postby Nitschi » Fri Jan 10, 2014 10:00 am

Ich habs gelöst indem ich die Namensänderung aktiviert habe. Ging nicht anders, hab mich damit einige wohen beschäftigt :/
Mit der Namensänderung können zwar phpbb3 user auch ihren namen ändern aber den kann man sich in der info wieder anzeigen lassen sod ass keine verwechslung entsteht.
Nitschi
New member
 
Posts: 7
Joined: Wed Jun 19, 2013 8:52 pm
Top


Post a reply
2 posts • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

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