Knowledgebase
Knowledgebase
phpBB v3.x Integration
Posted by Anthony B. on 03 January 2012 10:32 AM

These instructions assist you with the integration of the AddonChat software into the polular phpBB forum software.

phpBB can be downloaded from www.phpbb.com/downloads.php

AddonChat can be downloaded from www.addonchat.com/products.html


The following instructions apply to the Professional, Professional Plus and Enterprise editions

1. Open up Wordpad or a similar text editing piece of software

2. Copy and paste the following code in Wordpad or similar:

<?php

define('IN_PHPBB', true);

$phpbb_root_path = './';

$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'common.' . $phpEx);

 

// Start session management

$user->session_begin();

$auth->acl($user->data);

$user->setup();

page_header('The Chat Room');

 

if (!$user->data['is_registered'])

{

  trigger_error('You are not allowed to enter the chat-room.');

}

$naam = $user->data['username'];

$template->set_filenames(array(

    'body' => 'chat.html',

));

$template->assign_vars(array(

                'NAAM'  => $naam));

page_footer();

?>

3. Save the file as chat.txt

4. Change the extension of the file to chat.php

5. Upload the file to your server ensuring that it is placed in the same directory where the phpBB index.php file is located

6. Create a new file in Wordpad or similar and paste the following code ensuring that XXXXX is replaced  with your room number and the blue servername is identical with that of your own which you may lookup from the Home -> Chat Room Link Code section of your AddonChat control panel.

<!-- INCLUDE overall_header.html -->

<script type="text/javascript">/*<![CDATA[*/
   var addonchat = {
      signed:true, server:X, id:XXXXXX, width:"600",
      height:"400", language:"en" }
   var addonchat_param = { iconsize: 0,
   username: "{NAAM}",
   autologin: true
} /* ]]> */</script>
   <script type="text/javascript"
   src="http://clientX.addonchat.com/chat.js"></script><noscript>
   To enter this chat room, please enable JavaScript in your web
   browser. This <a href="Chat" _mce_href="http://www.addonchat.com/">Chat">http://www.addonchat.com/">Chat
   Software</a> requires Java: <a href="Get" _mce_href="http://www.java.com/">Get">http://www.java.com/">Get
   Java Now</a>
</noscript>


<!-- INCLUDE overall_footer.html -->

7. Save the file as chat.txt

8. Change the extension of the file to chat.html

9. Upload the file to your server in the location: styles/{required style}/template/

10. Download index_body.tpl from the style/susbsilver2/template directory and open it with Notepad or similar

11. Search for the following code:

<!-- IF S_DISPLAY_BIRTHDAY_LIST -->

    <br clear="all" />

    <table class="tablebg" width="100%" cellspacing="1">

    <tr>

        <td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>

    </tr>

    <tr>

        <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_BIRTHDAYS}" /></td>

        <td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>

    </tr>

    </table>

<!-- ENDIF -->

12. 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:

<br clear="all" />

<table class="tablebg" width="100%" cellspacing="1">

<tr>

    <td class="cat" colspan="2"><h4><a href="chat.php" target="_blank">Users in Chat Room</a></h4></td>

</tr>

<tr>

<td class="row1" width="100%"><iframe

name="scwho"

src="http://clientX.addonchat.com/scwho.pl?id=XXXXXX&subroom=1&boldadmin=0&comma=1&countonly=0&chatbg=FFF5C2&chatusr=3333FF&subroomcolor=000000&chatadmusr=3333FF&nousermsg=There are currently no users in the chatroom"

width=100%

height=50

frameborder=0

scrolling="auto"></iframe></td>

</tr>

</table>

13. Save the file and upload it to your server ensuring it is placed in the style/susbsilver2/template directory

14. Download index_body.tpl from the style/prosilver/template directory and open it with Notepad or similar

15. Search for the followng code:

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->

    <h3>{L_BIRTHDAYS}</h3>

    <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>

<!-- ENDIF -->

16. 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:

<h3><a href="chat.php" target="_blank">Users in Chat Room</a></h3>

<p><iframe

name="scwho"

src="http://clientX.addonchat.com/scwho.pl?id=XXXXXX&subroom=1&boldadmin=0&comma=1&countonly=0&chatbg=FFF5C2&chatusr=3333FF&subroomcolor=000000&chatadmusr=3333FF&nousermsg="There are currently no users in the chatroom"

width=100%

height=50

frameborder=0

scrolling="auto"></iframe></p>

17. Save the file and upload it to your server ensuring it is placed in the style/prosilver/template directory

18. Important (Security) :: Login to your AddonChat Admin Control Panel and select -> settings -> Site integration -> Securtiy URL, then set the 'enable security url' option to yes. and the 'secure by url domain only' option to yes. Then enter the full url of the domain on which the AddonChat will be running from and finally click save

19. Important (Security) :: Finally ensure that your username and password to the AddonChat Admin Control Panel is different to your phpBB administrator username and password. This adds additional security to both your phpBB and AddonChat installations and is good practice in any case.

(22 vote(s))
This article was helpful
This article was not helpful

Comments (0)