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;
}
Code: Select all
?>
Add:
Code: Select all
'SHOUTBOX' => getShoutBoxContent(),
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
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.