Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
Pages : 1
Bonjour,
Comme le nom d'indique je cherche à intégrer ce tchat sur mon forum car il est super simpas au terme partique et aussi design que l'ont peut adapter. Il y as de la docs sur leurs site, j'ai suivie les indications mais je n'est pas réussi à l'intégrer....
<?php
require_once "src/phpfreechat.class.php"; // adjust to your own path
$params["serverid"] = md5(__FILE__);
$params["nick"] = "guest"; // it can be useful to take nicks from a database
$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>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>phpFreeChat demo</title>
</head><body>
<?php $chat->printChat(); ?>
</body>
</html>
J'ai bien mis ça dans main.pl mais rien ne marque,quand j'affiche le forum sa me met la ligne "<?php $chat->printChat(); ?>" et rien de plus. Du cou je n'est pas testé cette doc: http://www.phpfreechat.net/faq#how-to-c … hpfreechat
Avez-vous une idée sur la question?
Cordialement,
Baltar
Dernière modification par baltar (29-04-2011 09:55:09)
Hors ligne
Il y a cette solution :
http://fluxbb.fr/aide/doku.php?id=integ … script_php
Hors ligne
Bonjour,
Merci pour ta réponse
J'ai fait comme sur l'astuce,mais sa me donne toujours ça:

Hors ligne
How to connect PunBB nicknames to phpfreechat ?
You have to put this piece of code at beginning of your chat script:
session_start();
if (!isset($_SESSION['punbb_to_pfc_nickname']))
{
define('PUN_ROOT', dirname(__FILE__).'/forum/'); // adjust this path to your forum installation root
require PUN_ROOT.'include/common.php';
$userdata = array();
check_cookie($userdata);
if ($userdata['username'] == 'Guest')
$userdata['username'] .= rand(1,1000); // generate a random guest username
$_SESSION['punbb_to_pfc_nickname'] = $userdata['username'];
}Then you can write the classic phpfreechat parameter list using “$_SESSION['punbb_to_pfc_nickname']” as the phpfreechat nickname. For example:
require_once "src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__);
$params["title"] = "phpFreeChat connected to the PunBB forum";
$params["channels"] = array("General","PunBB support");
$params["language"] = "en_US";
$params["nick"] = $_SESSION['punbb_to_pfc_nickname'];
$chat = new phpFreeChat($params);
Tout cela me paraît étrange. Essaye plutôt comme ceci:
How to connect PunBB nicknames to phpfreechat ?
You have to put this piece of code at beginning of your chat script:
session_start();
if (!isset($_SESSION['punbb_to_pfc_nickname']))
{
define('PUN_ROOT', dirname(__FILE__).'/forum/'); // adjust this path to your forum installation root
require PUN_ROOT.'include/common.php';
if ($pun_user['username'] == 'Guest')
$pun_user['username'] .= rand(1,1000); // generate a random guest username
$_SESSION['punbb_to_pfc_nickname'] = $pun_user['username'];
}Then you can write the classic phpfreechat parameter list using “$_SESSION['punbb_to_pfc_nickname']” as the phpfreechat nickname. For example:
require_once "src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__);
$params["title"] = "phpFreeChat connected to the PunBB forum";
$params["channels"] = array("General","PunBB support");
$params["language"] = "fr_FR";
$params["nick"] = $_SESSION['punbb_to_pfc_nickname'];
$chat = new phpFreeChat($params);
Hors ligne
Pages : 1