|
phpBB v2.x Integration
Posted by Anthony B. on 03 January 2012 09:58 AM
|
|
|
These instructions assist you with the integration of the AddonChat software into the polular phpBB forum software. phpBB can be obtained from www.phpbb.com/downloads.php The following instructions apply to the Professional / Professional Plus or Enterprise editions:
<?php
// standard hack prevent
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// standard session management
$userdata = session_pagestart($user_ip, PAGE_INDEX );
init_userprefs($userdata);
// set page title
$page_title = 'AddOnChat';
// redirect to login if not logged in
if ( empty($userdata['user_id']) || $userdata['user_id'] == ANONYMOUS )
{
redirect(append_sid("login.$phpEx?redirect=chat.$phpEx", true));
}
// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$naam = $userdata['username'];
?>
<applet code="Client.class"
codebase="http://clientX.addonchat.com/current/"
archive="scclient_en_uk.zip" width="600" height="425"
alt="Java Chat Software - AddonChat" MAYSCRIPT>
<param name="room" value="XXXXX">
<a href="Java" _mce_href="http://www.addonchat.com/">Java">http://www.addonchat.com/">Java Chat Software</a>
<param name="username" value="<?php echo $naam?>" />
<param name="autologin" value="yes">
</applet>
<?php
// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
<table width="100%" cellpadding="1" cellspacing="1" border="0">
After these lines add the following code ensuring that XXXXX is your room number, the green URL matches that in your Admin Control Panel and if the blue value is set to 1 for the rooms the users are in to be shown: <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%>
Save the file and upload it to your server ensuring it is placed in the templates/subSilver directory ** Important: Room Security ** These final steps ensure that your chat room is secure. It disallows the room to be accessed from other websites.
| |
|
|
|
