My biggest problem is I don't know what half of the things mean. I know where to place the code but I don't know what lines to edit and how it should look. Anyways I will pick apart the things I seem to be messing up and I hope all of you can be patient with me and tell me what it should look like.
Edit includes/functions.php
Add:
- Code: Select all
function getShoutBoxContent()
{
global $phpEx, $phpbb_root_path;
// Get the URL to the chat directory:
if (!defined('AJAX_CHAT_URL'))
{
define('AJAX_CHAT_URL', $phpbb_root_path . 'chat/');
}
// Get the real path to the chat directory:
if (!defined('AJAX_CHAT_PATH'))
{
if (empty($_SERVER['SCRIPT_FILENAME']))
{
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_URL'];
}
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/chat') . '/');
}
// Validate the path to the chat:
if (@is_file(AJAX_CHAT_PATH . 'lib/classes.' . $phpEx))
{
// Include Class libraries:
require_once(AJAX_CHAT_PATH.'lib/classes.' . $phpEx);
// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();
// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}
return null;
}
before :
- Code: Select all
?>
This is my biggest problem. In here I have a hard time figuring out what AJAX_CHAT_URL and AJAX_CHAT_PATH should become. For the URL I figure its where my chat is located which is http:twinsuncoalition.com/forum/chat I could be way off, Thats why I am here. I am totally clueless on AJAX_CHAT_PATH. I am sure you could tell me what I am doing wrong but I would really appreciate a example of this using the code posted above.
Add:
- Code: Select all
'SHOUTBOX' => getShoutBoxContent(),
after
- Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
I can't seem to find the above piece of code when I search for it. Only a partial piece. I assume thats what I am looking for anyways. I hope someone can clear this up.
That seems to be my major problem and where ever I look for answers I come across people who are already well established in coding, I just can't seem to understand what stuff means. Atleast the parts I need to edit, I just guess what its supposed to be and sometimes I am right and sometimes I am wrong. I would really appreciate the help on some of these things.

