Mansoor Khan - 2011-12-07

Hi,

I need to put a shoutbox on my website on an html page.

Is that possible?  As all I see here is people who have put it on punBB and SF etc.

I already have the Chat Room working beautifully at http://www.acres-wild.com/AjaxChat/chat/

Can anyone help me resolve this as have already tried a lot with the instructions given in the READ ME and the code there but no use.

This is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<!- @import url("http://example.org/path/to/chat/css/shoutbox.css"); if you put on a css already in use->
<style type="text/css">
@import url("http://www.acres-wild.com/AjaxChat/chat/css/shoutbox.css");
</style>
</head>

<body>
<?php
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
define('AJAX_CHAT_URL', './chat/');
}

// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER).'/chat').'');
}

// Validate the path to the chat:
if(@is_file(http://www.acres-wild.com/AjaxChat/.'lib/classes.php')) {

// Include Class libraries:
require_once(http://www.acres-wild.com/AjaxChat/.'lib/classes.php');

// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();

// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}

return null;
}
?>
<div style="width:400px; height:600px;"><?php echo getShoutBoxContent(); ?></div>
</body>
</html>

AND THE OUTPUT I get is nothing but the last line of the code.  Namely………..

getShoutBoxContent(); } return null; } ?>

Would really appreciate some help.

Thanks