To add a feature-rich chat room to your SMF, please refer to the following instructions. Firstly, please download SMF chat module, and uncompress the package.  Then copy files. 1. Copy: Themes/default/images/123flashchat.gif To: <SMF installed directory>/Themes/default/images/123flashchat.gif 2. Copy: folder chat/ To: <SMF installed directory>/chat/ Secondly, edit files. 1. Open: <SMF installed directory>/Themes/default/index.template.php Find: function template_menu() { global $context, $settings, $options, $scripturl, $txt; After Add: $context['menu_buttons']['123flashchat']['title'] = '123flashchat'; $context['menu_buttons']['123flashchat']['href'] = 'javascript:openChat();'; $context['menu_buttons']['123flashchat']['show'] = 1; $context['menu_buttons']['123flashchat']['sub_buttons'] = array(); $context['menu_buttons']['123flashchat']['active_button'] = '1'; 2.Open: <SMF installed directory>/Themes/default/BoardIndex.template.php Find: // "Users online" - in order of activity. Before Add: include_once "chat/chatwinsize.php";
$chatters = getChatters ( $running_mode, $free_server_path, $room_name, $client_location, $chat_data_path); $user_list = getChatterList ( $running_mode, $free_server_path, $room_name, $client_location, $chat_data_path);
echo ' <div class="infocenter_section"> <h4 class="headerpadding titlebg">Chat</h4> <div class="windowbg"> <p class="section"> <a href="http://www.123flashchat.com" onClick="openChat();return false;" onMouseOver="window.status=\'123flashchat\';return true"><img src="', $settings['images_url'], '/123flashchat.gif" alt="123 Flash Chat" /></a> </p> <div class="windowbg2 sectionbody middletext">'; if($running_mode != 3){ echo 'There are <b>',$chatters ['room_numbers'],'</b> rooms<br>'; echo 'There are <b>',$chatters ['connections'],' </b> connections<br>'; } echo' There are <b>',$chatters ['logon_users'],' </b> logon users<br> User list: <b>',$user_list,' </b> <br><br> </div> </div> </div>'; Thirdly, configure SMF chat module's running mode. Please choose the running mode according to your need, and the configuration path is <SMF installed directory>/chat/config/config.php Then configure the following parameters: $running_mode Configuration reference: $running_mode = 1; (only 1 or 2 or 3) 1. Chat server is hosted by your own ($running_mode = 1). If your chat is hosted by your own, 123FlashChat server software should be installed at first, please download 123FlashChat.  Configuration path: <SMF installed directory>/infusions/chat/config/config_local.php Configure the following parameters: $chat_group = "default"; $client_size_width = 634; $client_size_height = 476; $chat_data_path = "<123flashchat installed directory>/server/data/default/"; $primary_server_host = "localhost"; $primary_server_port = 51127; $chat_client_root_path = “http://localhost/client”; $swf_file_name = "123flashchat.swf"; 2. Chat server is hosted by 123flashchat.com ($running_mode = 2). If your chat is hosted by 123Flashchat.com, no 123FlashChat server software is needed to be installed; you may connect to your host chat room directly. Configuration path: <SMF installed directory>/chat/config/config_host.php Configure the following parameters: Configuration reference: $client_size_width = 634; $client_size_height = 476; $chat_client_root_path = "http://host*.123flashchat.com/hostname/"; 3. Chat server is hosted by 123flashchat.com free of charge ($running_mode = 3). If you prefer free hosting, then you don't have to install 123 Flash Chat server software, we take care the hosting and all you need to do is just pick a room name you want.  Configuration path: <SMF installed directory>/chat/config/config_free.php Configure the following parameters: $room_name = "YourRoomName"; (If you leave $room_name as blank, the default $room_name's value will be your domain's name.) $client_size_width = 634; $client_size_height = 476; Fourthly, integrate your chat with SMF user database, after doing that, users can single sign-on your SMF chat, it means they won't have to enter their accounts again. If you choose running mode (1) or mode (2), you need to set Auth-URL by following the instructions below. 1. Log in the Chat Admin Panel. 2. Server Settings -> Integration ->DataBase -> SELECT: URL -> edit.  3. Change URL to http://<SMF installed directory>/chat/login_chat.php?username=%username%&password=%password%  4. Press OK to save your setting. 5. Restart chat server at Server 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.  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. |