To add a feature-rich chat room to your phpBB 2.x, please refer to the following instructions. Firstly, please download phpBB 2.x chat module.
Then copy the following files: 1. Copy: 123flashchat.php To:<your phpBB2 installed directory>/123flashchat.php Without this file, your phpBB chat room will not open successfully. 2. Copy: phpbb_login_chat.php To:<your phpBB2 installed directory>/phpbb_login_chat.php 3. Copy: includes/functions_chat.php To:<your phpBB2 installed directory>/includes/functions_chat.php 4. Copy: templates/subSilver To:<your phpBB2 installed directory>/templates/subSilver (If your current skin is not subSilver,copy the file under templates/subSilver to your current skin folder) Secondly, edit files. 1. Open 123flashchat.php Configure phpBB chat module parameters as following $chat_client_root_path = ""; $swf_file_name = "123flashchat.swf"; $skin_name = "default"; $language = "en"; 2. Open language/lang_english/lang_main.php Find $lang['Session_invalid'] = 'Invalid Session. Please resubmit the form.'; After Add $lang['CHAT'] = 'Chat'; $lang['Chat_connections_zero'] = 'There are <b>0</b> user connected to the chat server'; $lang['Chat_connections'] = 'There are <b>%d</b> users connected to the chat server'; $lang['Chat_connection'] = 'There is <b>%d</b> user connected to the chat server'; $lang['Chat_rooms_zero'] = 'There are <b>0</b> Chat rooms'; $lang['Chat_rooms'] = 'There are <b>%d</b> Chat rooms'; $lang['Chat_room'] = 'There is <b>%d</b> Chat room'; $lang['Chat_logon_users_zero'] = 'There are <b>0</b> logon chatters'; $lang['Chat_logon_users'] = 'There are <b>%d</b> logon chatters '; $lang['Chat_logon_user'] = 'There is <b>%d</b> logon chatter'; $lang['Chat_logon_userlist'] = 'Chatting users: '; 3. Open includes/functions_chat.php Find $chat_data_path = "C:/Program Files/123FlashChatServer6.9.3/server/data/default/"; And configure the chat installation path here. 4. Open includes/page_header.php Find $l_online_users = sprintf($l_t_user_s, $total_online_users); $l_online_users .= sprintf($l_r_user_s, $logged_visible_online); $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online); $l_online_users .= sprintf($l_g_user_s, $guests_online); After Add // begin 123 flash chat mod include($phpbb_root_path . 'includes/functions_chat.'.$phpEx); $chatters = getChatters(); $c_connections = $chatters['connections']; $c_rooms = $chatters['room_numbers']; $c_logon_users = $chatters['logon_users']; if ( $c_connections == 0 ) { $chat_connections = $lang['Chat_connections_zero']; } else if ( $c_connections == 1 ) { $chat_connections = $lang['Chat_connection']; } else { $chat_connections = $lang['Chat_connections']; } if ( $c_rooms == 0 ) { $chat_rooms = $lang['Chat_rooms_zero']; } else if ( $c_rooms == 1 ) { $chat_rooms = $lang['Chat_room']; } else { $chat_rooms = $lang['Chat_rooms']; } if ( $c_logon_users == 0 ) { $chat_logon_users = $lang['Chat_logon_users_zero']; } else if ( $c_logon_users == 1 ) { $chat_logon_users = $lang['Chat_logon_user']; } else { $chat_logon_users = $lang['Chat_logon_users']; } $l_chat_connections = sprintf($chat_connections, $chatters['connections']); $l_chat_rooms = sprintf($chat_rooms, $chatters['room_numbers']); $l_chat_logon_users = sprintf($chat_logon_users, $chatters['logon_users']); $l_chat_user_list = $lang['Chat_logon_userlist'] . getChatterList(); // end 123 flash chat mod After add the above codes, the phpBB chat module will dynamically show the following information on web pages: Find 'T_SPAN_CLASS1' => $theme['span_class1'], 'T_SPAN_CLASS2' => $theme['span_class2'], 'T_SPAN_CLASS3' => $theme['span_class3'], After Add 'L_123FLASHCHAT' => $lang['CHAT'], 'U_123FLASHCHAT_POPUP' => append_sid('123flashchat.'.$phpEx), 'CHAT_TOTAL_ROOMS' => $l_chat_rooms, 'CHAT_TOTAL_CONNECTIONS' => $l_chat_connections, 'CHAT_TOTAL_LOGON_USERS' => $l_chat_logon_users, 'CHAT_USER_LIST' => $l_chat_user_list, 5. Open templates/subSilver/overall_header.tpl Find </head> Before Add <script language="Javascript" type="text/javascript"> function openChat() { window.open('{U_123FLASHCHAT_POPUP}', '_123flashchat', 'HEIGHT=476,resizable=yes,WIDTH=634');; } </script> Find <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a> After Add <a href="http://www.123flashchat.com" onClick="openChat();return false;" onMouseOver="window.status='{L_123FLASHCHAT}';return true" class="mainmenu"><img src="templates/subSilver/images/icon_123flash_chat.gif" width="12" height="13" border="0" alt="{L_123FLASHCHAT}" hspace="3" />{L_123FLASHCHAT}</a> 6. Open templates/subSilver/index_body.tpl Find <tr> <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td> </tr> After add <!-- 123 Flash Chat Server Software Mod Begin --> <tr><td class="row1" align="center" valign="middle" rowspan="2"> <a href="http://www.123flashchat.com" target="_blank" onClick="openChat();returnfalse;" onMouseOver="window.status=''; return true"><img src="templates/subSilver/images/123flashchat.gif" alt="open Chat" border="0"></a></td> <td class="row1" align="left" width="100%"><span class="gensmall"> <br><br><br> </span></td></tr> <!-- 123 Flash Chat Server Software Mod End --> Thirdly, integrate your chat with phpBB user database, after do that, users can single sign-on your phpBB chat, it means they won't have to enter their accounts again. Please set Auth-URL by following the instructions below. 1. Log in the Admin Panel of your 123FlashChat server System Settings -> Integrate Panel 2. Find: DataBase -> SELECT: URL -> edit 3. Change URL to http://<Your phpBB installed directory>/phpbb_login_chat.php?username=%username%&password=%password% 4. Press OK to save your setting. 5. Restart chat server at System Management -> Restart The following image describes how auth-URL integration works. The Auth-URL application will perform as the communicating medium of the chat server and the database, i.e.: in fact, when a user logs on a chat server, the server won't connect to the user database directly, instead, it will send the username and password to the Auth- URL. Then the Auth- URL requests the database to authenticate the user. Finally, the Auth- URL will return the feedback to the chat server in a predefined way, whether approved or declined. Integration done, enjoy your chat. Nine skins options are available:
If you have any questions about chat room, please visit http://www.123flashchat.com/faq.html. You can also send email to support@123flashchat.com, we offer free integration service for license buyer and yearly hosting buyer. |