ciao, vorrei implementare la chat di http://www.phpfreechat.net/ nel mio forum, ma come fare?
non conosco molto il php, solo javascript e html, qualche mod sono riuscito a farla un pò a tentoni ma ora devo proprio consultarmi con qualcuno.
Vorrei aprire la chat con un file nella root principale, tipo chat.php, che prendendo spunto da chiSiamo.php, dovrebbe avere questo codice:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx); // Start session management
$user->session_begin();
$auth->acl($user->data); $user->setup();
page_header('Chat');
$template->set_filenames(array('body' => 'chat.html',));
make_jumpbox(append_sid("{$phpbb_root_path}viewfor um.phpEx"));
page_footer();
?>
I file della chat li ho messi in miosito/chat, e li si trova l' index.php della chat che ha questo codice:
<?php
require_once dirname(__FILE__)."miosito/chat/src/phpfreechat.class.php";
$params = array(); $params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params["isadmin"] = true; // do not use it on production servers
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat //$params["debug"] = true;
$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>phpFreeChat- Sources Index</title>
<link rel="stylesheet" title="classic" type="text/css" href="miosito/chat/style/generic.css" />
<link rel="stylesheet" title="classic" type="text/css" href="miosito/chat/style/header.css" />
<link rel="stylesheet" title="classic" type="text/css" href="miosito/chat/style/footer.css" />
<link rel="stylesheet" title="classic" type="text/css" href="miosito/chat/style/menu.css" />
<link rel="stylesheet" title="classic" type="text/css" href="miosito/chat/style/content.css" />
</head>
<body>
<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>
</body>
</html>
come faccio a farne uno?![]()