DirtySnipe Posted September 18, 2008 Share Posted September 18, 2008 I have an ajax chat room up and running and I have been informed it will intergrate into a phpbb3 forum. They have even be so kind to provide the files and read me for the configuration. But and here is the big but... I am dumb... lol I for some reason cannot get this one part to work, I'm not sure which part i should be editing and what exactly i should be putting in there. Here is the read me.. <?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['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(); } return null; } ?> Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory. Here is the url to my site http://www.forums.lbp-community.co.uk and the chat room is located at http://www.forums.lbp-community.co.uk/chat Thanks in advance to those who help. Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/ Share on other sites More sharing options...
DirtySnipe Posted September 19, 2008 Author Share Posted September 19, 2008 Here is the read me file that was supplied. I hope somone here can help me out to get this shoutbox to work. Shoutbox: ========= AJAX Chat is also usable as shoutbox - this is a short guide on how to set it up: 1. Shoutbox stylesheet ---------------------- Add the following line to the stylesheet (CSS) of all pages displaying the shoutbox: @import url("http://example.org/path/to/chat/css/shoutbox.css"); Replace http://example.org/path/to/chat/ with the URL to the chat. Modify css/shoutbox.css to your liking. 2. Shoutbox function -------------------- Add the following function to your PHP code: <?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['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(); } return null; } ?> Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory. 2. Shoutbox output ------------------ Display the shoutbox content using the shoutbox function: <div style="width:200px;"><?php echo getShoutBoxContent(); ?></div> Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/#findComment-645451 Share on other sites More sharing options...
gnize Posted September 19, 2008 Share Posted September 19, 2008 http://ajax-chat.wiki.sourceforge.net/phpBB3+shoutbox+integration Just open the files they say and edit them accordingly. Save backups of all files just in case. You may need to do it a few times till you get it right. Make sure that when you copy and paste the code that you copy everything... Even the spaces. You should use crimson editor to edit the files or another program of the like. Not notepad or wordpad. http://www.crimsoneditor.com/download/cedt370r.exe Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/#findComment-645592 Share on other sites More sharing options...
DirtySnipe Posted September 19, 2008 Author Share Posted September 19, 2008 I have done the steps over ten times now and i use phpeditor to edit the files. Still will not load shoutbox. Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/#findComment-645661 Share on other sites More sharing options...
Loki Posted September 19, 2008 Share Posted September 19, 2008 are you using this version? http://downloads.sourceforge.net/ajax-chat/ajax_chat-0.8.1.2_phpBB3.tar.gz?modtime=1206204156&big_mirror=0 Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/#findComment-645730 Share on other sites More sharing options...
DirtySnipe Posted September 19, 2008 Author Share Posted September 19, 2008 Yea thats the version im tryin to get working. The chatroom loads fine stand alone but i cant get the shoutbox to work in the forum. Quote Link to comment https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/#findComment-645971 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.