Skip to content

Phpbb3 custom chat path

Frug edited this page Oct 18, 2012 · 1 revision

How to use the chat in a different directory than inside the forum directory

This is a fairly easy task and just depends on where you want to put your chat directory relative to the forum directory.

As an example, we're assuming the following structure:

http://example.org/chat
http://example.org/forum

Edit lib/custom.php and change

$phpbb_root_path = AJAX_CHAT_PATH.'../';
to
$phpbb_root_path = AJAX_CHAT_PATH.'../forum/';

Additional adjustments for the shoutbox integration

If you're using the chat as shoutbox in your forum, you will have to adjust the following paths as well:

Edit includes/functions.php (of your forum) and change

   // Path to the chat directory (absolute path including the trailing slash):
   define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
to
       // Path to the chat directory (absolute path including the trailing slash):
       define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/../chat').'/');

Edit styles/[STYLE_NAME]/theme/stylesheet.css and change

    @import url("../../../chat/css/shoutbox.css");
to
    @import url("../../../../chat/css/shoutbox.css");