Good evening
Could someone help me to integrate phpfreechat-1.3 to phpBB 3.0.7 PL-1?
Assistance in the FAQ is outdated and therefore unsuitable for my version.
Regards, Drago
Moderators: OldWolf, re*s.t.a.r.s.*2
define("IN_PHPBB", true);
$phpbb_root_path = "./"; //Root to phpBB
$phpEx = substr(strrchr(__FILE__, "."), 1);
include($phpbb_root_path . "common." . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
get_username_string ;
$oog = $user->data [username];
if ($oog == "Anonymous")
{
header("Location: ./ucp.php?mode=login");
}
if ($user->data['is_registered'])
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$sql = "SELECT u.user_id, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, u.username, u.user_rank, u.user_colour
FROM " . USERS_TABLE . ' AS u
WHERE u.user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql,300);
$row = $db->sql_fetchrow($result);
$avatar_img = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height'], '',true);
$username_trim = (strlen($row['username']) > 9) ? substr($row['username'],0,9) . ".." : $row['username'];
$u_profile = get_username_string('full', $row['user_id'], $username_trim, $row['user_colour']);
$params["nickmeta"] = array(
'avatar'=> '<img src="' . $avatar_img .'">',
'profile'=> $u_profile,
//'profile'=>'<a href="memberlist.php?mode=viewprofile&u=2">test</a>',
); // additional values
$db->sql_freeresult($result);
}
require_once dirname(__FILE__)."/chat/src/phpfreechat.class.php";
todhend wrote:http://www.phpfreechat.net/forum/viewtopic.php?id=2651
if the chat file is in the main forum dir, this will work, I used chat.php ,
- Code: Select all
define("IN_PHPBB", true);
$phpbb_root_path = "./"; //Root to phpBB
$phpEx = substr(strrchr(__FILE__, "."), 1);
include($phpbb_root_path . "common." . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
get_username_string ;
$oog = $user->data [username];
if ($oog == "Anonymous")
{
header("Location: ./ucp.php?mode=login");
}
if ($user->data['is_registered'])
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$sql = "SELECT u.user_id, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, u.username, u.user_rank, u.user_colour
FROM " . USERS_TABLE . ' AS u
WHERE u.user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql,300);
$row = $db->sql_fetchrow($result);
$avatar_img = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height'], '',true);
$username_trim = (strlen($row['username']) > 9) ? substr($row['username'],0,9) . ".." : $row['username'];
$u_profile = get_username_string('full', $row['user_id'], $username_trim, $row['user_colour']);
$params["nickmeta"] = array(
'avatar'=> '<img src="' . $avatar_img .'">',
'profile'=> $u_profile,
//'profile'=>'<a href="memberlist.php?mode=viewprofile&u=2">test</a>',
); // additional values
$db->sql_freeresult($result);
}
require_once dirname(__FILE__)."/chat/src/phpfreechat.class.php";
the rest here is your config variables
Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
Users browsing this forum: No registered users and 5 guests