Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/124817-cant-figure-this-intergration-script/
Share on other sites

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>

 

 

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.