Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:04 am EST
Geeklog Forums
Phpfreechat with geeklog help
Chatter
Anonymous
Hi, i'm trying to put phpfreechat [ http://www.phpfreechat.net/ ] to work integrated with geeklog, but no success.
The following code is from phpbb integrationwith phpfreechat, i just want to show an example for what i need:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../phpbb/'; // See phpbb_root_path documentation
$phpEx = substr(strrchr(__FILE__, '.'), 1); // Set the File extension for page-wide usage.
include($phpbb_root_path . 'common.' . $phpEx); // include the common.php file, this is important, especially for database connects.
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
get_username_string ;
$oog = $user->data [username];
// redirect to phpBB logon page if the user is not logged in
if ($oog == "Anonymous")
{
header("Location: http://www.survivorsresource.com/phpbb/ … ogin");
}
$utz = $user->data['user_timezone']; // Get user's time zone information from phpBB3 account settings
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "survivorsresources";
$params["nick"] = $user->data [username];
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["isadmin"] = false; // just for debug wink
$params["language"] = "ru_RU";
$params["serverid"] = md5(survivorsresources);
//$params["debug"] = true;
$params["theme_path"] = dirname(__FILE__)."/themes";
$params["theme"] = "green";
$params["time_offset"] = $utz*60*60; // Sets user's time_offset to their timezone
$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>survivorsresource</title>
</head>
<body>
<div class="header">
<h1><a href="http://www.survivorsresource.com/index.html">survivorsresource</a></h1>
</div>
<div class="content">
<?php $chat->printChat(); ?>
</div>
</body></html>
This code is including the common.php of phpbb, the lib-common.php equivalent in geeklog for database connection, etc...
So, I'm including lib-common.php and system/lib-user.php in the phpfreechat code.
and what do i put in phpfreechat code to show the nickname of geeklog logged user??
i tried $username but it didn't work...
Thanks a lot
The following code is from phpbb integrationwith phpfreechat, i just want to show an example for what i need:
Text Formatted Code
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../phpbb/'; // See phpbb_root_path documentation
$phpEx = substr(strrchr(__FILE__, '.'), 1); // Set the File extension for page-wide usage.
include($phpbb_root_path . 'common.' . $phpEx); // include the common.php file, this is important, especially for database connects.
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
get_username_string ;
$oog = $user->data [username];
// redirect to phpBB logon page if the user is not logged in
if ($oog == "Anonymous")
{
header("Location: http://www.survivorsresource.com/phpbb/ … ogin");
}
$utz = $user->data['user_timezone']; // Get user's time zone information from phpBB3 account settings
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "survivorsresources";
$params["nick"] = $user->data [username];
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["isadmin"] = false; // just for debug wink
$params["language"] = "ru_RU";
$params["serverid"] = md5(survivorsresources);
//$params["debug"] = true;
$params["theme_path"] = dirname(__FILE__)."/themes";
$params["theme"] = "green";
$params["time_offset"] = $utz*60*60; // Sets user's time_offset to their timezone
$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>survivorsresource</title>
</head>
<body>
<div class="header">
<h1><a href="http://www.survivorsresource.com/index.html">survivorsresource</a></h1>
</div>
<div class="content">
<?php $chat->printChat(); ?>
</div>
</body></html>
This code is including the common.php of phpbb, the lib-common.php equivalent in geeklog for database connection, etc...
So, I'm including lib-common.php and system/lib-user.php in the phpfreechat code.
and what do i put in phpfreechat code to show the nickname of geeklog logged user??
i tried $username but it didn't work...
Text Formatted Code
$params["nick"] = what variable do i put here?;Thanks a lot
10
11
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
COM_getDisplayName()
You should not need to include lib-user.php. lib-common.php handles most of those sorts of dependencies for you.
You should not need to include lib-user.php. lib-common.php handles most of those sorts of dependencies for you.
11
8
Quote
All times are EST. The time is now 01:04 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content