Cannot get shourbox to work

60 views
Skip to first unread message

Raffaele Mancuso

unread,
Apr 25, 2016, 4:43:23 PM4/25/16
to AJAX-chat
I cannot get the shoutbox to work.

Only a text box is displayed with the copyright below it. No graphics, no buttons, nothing else at all, even pressing enter on the text box does nothing.

I put this code inside the chat subfolder of AJAX. I'm on Windows 8, Apache 2.4, PHP 7, MySql 5.7.11. I didn't do any modifications other that put AllowOverride All in apache.

<?php
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME'])).'/');
define('AJAX_CHAT_URL', realpath(dirname($_SERVER['SCRIPT_FILENAME'])).'/');
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['SCRIPT_FILENAME']).'/chat').'/');
}
// Validate the path to the chat:
if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
// Include Class libraries:
require_once(AJAX_CHAT_PATH.'lib/classes.php');
// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();
// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}
else echo "classes.php not found";
return null;
}

function regularChat()
{
// Initialize the chat:
$ajaxChat = new CustomAJAXChat();
}
echo '<html lang="en">
<head>
<style>
@import url("./css/shoutbox.css");
</style>
</head>
<body>';
echo getShoutBoxContent();
echo'</body>
</html>
';
?>


droquesteni

unread,
May 21, 2018, 7:32:43 PM5/21/18
to AJAX-chat
Hello can you put this working? I need help :(
Reply all
Reply to author
Forward
0 new messages