PHP Version:5.2
Shared or Dedicated Hosting: Shared (JustHost, cPanel based)
Link to your website:www.resurrectionremix.com
Are you able to reproduce the issue on the official demo (http://www.phpfreechat.net/demo)?:
No, chat works fine via direct link (www.resurrectionremix.com/chat/index.php)
Issue is with SMF 2.0.2 integration
Have you set any parameters?:
Yes, code listed below
What is the issue you are experiencing in detail?:
Chat Loading message won't go away. Chat appears to load, as the cache folder gets an entry. Also, view/source on the page shows a lot of PFC variables in the HTML
Are you seeing any error messages, such as javascript errors?: No
Hi all
I have been searching and reading pretty much everything I can find on integrating with SMF and I have gotten pretty close...
When I goto index.php?action=chat now, I just get the "Chat Loading" message.
However, I think it is loading...it just doesn't display (the cache folder gets an entry...suggesting chat is up). Also, when I View Source on the page from my browser..the username etc seems to have been passed successfully along with a load of other var pfc statements.
I just can't figure out how to get it to display.
My files
Chat.php (in Sources folder)
- Code: Select all
<?php
// If not called by SMF, it's bad!
if (!defined('SMF'))
die('Hacking attempt...');
function Chat()
{
global $context, $user_info, $boarddir, $chat;
// They're a guest? Don't let them in!
is_not_guest('Sorry, you can not enter the chat room!');
require_once($boarddir . '/chat/src/phpfreechat.class.php');
$params = array();
$params['serverid'] = md5(__FILE__);
$params['title'] = 'Resurrection Remix Chat';
$params['nick'] = $user_info['name'];
$params['admins'] = array('USERNAME' => 'PASSWORD');
$params['frozen_nick'] = true;
$params['height'] = '300';
$params['clock'] = false;
$params['btn_sh_whosonline'] = false;
$params['nickname_colorlist'] = array('#f00','#0f0','#00f','#909','#099');
$params['channels'] = array('Chat','Support');
$params["data_private_path"] = ($boarddir . '/chat/data/private');
$params["data_public_path"] = ($boarddir . '/chat/data/public');
$params["data_public_url"] = ($boarddir . '/chat/data/public');
$params["prototypejs_url"] = ($boarddir . '/chat/data/js/prototype.js');
$params["server_script_path"] = ($boarddir . '/Sources/Chat.php');
$params["server_script_url"] = ($boarddir . '/Sources/Chat.php');
$chat = new phpFreeChat($params);
$context['html_headers'] .= $chat->printJavascript(true);
$context['html_headers'] .= $chat->printStyle(true);
$context['sub_template'] = 'chat';
$context['page_title'] = 'Chat - '.$context['forum_name'];
loadTemplate('Chat');
}
?>
Chat.template.php (in Themes/default folder):
- Code: Select all
<?php
function template_chat()
{
global $user_info, $context, $boarddir, $chat;
$chat->printChat();
}
?>
index.php (edit)
- Code: Select all
Search for: 'calendar' => array('Calendar.php', 'CalendarMain'),
add after: 'chat' => array('Chat.php', 'Chat'),
URL is www.resurrectionremix.com/index.php?action=chat
I haven't linked to the chat anywhere yet...so you would need to login to the board before using that URL
username: plwtest
pass: phpfreechat
It would be great if someone could point me in the right direction.
Many thanks