• 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

how do i set up the chat?

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

Post a reply
7 posts • Page 1 of 1

Postby KAYCE » Thu Dec 08, 2011 12:46 am

Hello all, i just installed the chat on my website, but iam getting the chat box with the General tab and google ad, http://www.myafricanclips.com/phpchat/ . Can anyone tell me how to set it up to display a real chat box without what i am getting? thanks in advance
KAYCE
New member
 
Posts: 3
Joined: Thu Dec 08, 2011 12:27 am
Top

Postby KAYCE » Fri Dec 09, 2011 2:42 am

Hi guys, i was able to change some items, but looks like my script didnt come complete, iam missing the basic like admin rights, after reading the full parameters setting, iam still unable to add admin command lines,and other comands such as banning users from changing nick etc, can someone pls read my php and modify,customized and add all the basics for me pls? :( that way i only get to change true or false. Thanks in advance


<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Lobby";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params['firstisadmin'] = false;
//$params["isadmin"] = false; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__Lobby__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MyAfricanclips Community chat Room</title>
<link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />

</head>
<body>
<div class="header">
<img alt="phpFreeChat" src="style/logo.gif" class="logo2" />
</div>

<div class="menu">
<ul>

<li>
<ul class="sub">
<li class="item">

</li>
<?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
<li>

</li>
<?php } ?>
<!--
<li class="item">
<a href="admin/">Administration</a>
</li>
-->
</ul>
</li>

</li>
</ul>
</li>
</ul>


</p>
</div>

<div class="content">
<?php $chat->printChat(); ?>
<?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
<p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
<?php } ?>
</div>

<div class="footer">
</div>
</body></html>
KAYCE
New member
 
Posts: 3
Joined: Thu Dec 08, 2011 12:27 am
Top

Postby DaNGuS » Fri Dec 09, 2011 6:16 pm

insert somewhere after $params["title"] = "Lobby";

this code
$params['admins'] = array('admin' => 'password');

if you want few admins in your chat insert this $params['admins'] = array('admin' => 'password', 'admin2' => 'password', 'admin3' => 'password3');

of course change words "admin" to the nick you want to be admin, and password to your or password.
then in chat room send write /rehash and then /identify password
DaNGuS
Member
 
Posts: 20
Joined: Fri Nov 11, 2011 9:33 am
Top

Postby DaNGuS » Fri Dec 09, 2011 6:20 pm

for nicks, if you want stop members to change nicks, go to

src/pfcglobalconfig.class.php

then find


var $frozen_nick = false;

change false to true to forbid nick changes
Last edited by DaNGuS on Fri Dec 09, 2011 6:20 pm, edited 1 time in total.
DaNGuS
Member
 
Posts: 20
Joined: Fri Nov 11, 2011 9:33 am
Top

Postby re*s.t.a.r.s.*2 » Fri Dec 09, 2011 10:27 pm

Hi,

You shouldnt edit any php class in the script,
Only in the index.php

like so:

$params['frozen_nick'] = true;

and then rehash , that will certainly disable the ability for user to change their nick.

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 KAYCE » Sat Dec 10, 2011 2:19 pm

Thank you both for your help, i was finally able to log in as admin, however after changing the frozen nick to true and rehased, i got folded with not sure if it was virus, (user #s changing nick,over and over) when i was the only one there. i had to remove and reinstall to stop that issue. maybe i did it wrong.

Also iam trying to force users to enter a nickname and gender only instead of the random guest numbers, what line should i change from this? i have tried removing nick,guest and setup the int nickname, still cant get it to work
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname

Also what comands do i need to hide the date and time from being displayed? thanks in advance
KAYCE
New member
 
Posts: 3
Joined: Thu Dec 08, 2011 12:27 am
Top

Postby OldWolf » Sun Dec 11, 2011 11:49 am

Frozen nick + random nick wont work. Frozen nick automatically makes the parameter dynamic, meaning it reads the paramter on each call instead of caching. When it does that, it's looking at the nick parameter, and since that includes a random number, the number is different each time.

But, it seems you're getting rid of that, so no worries. Simply remove the nick parameter line all together, rehash the chat, and you should have what you wanted.
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
7 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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