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
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" />
<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>
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
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
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.