**************************************************************************
** Phpnuke: Web Portal System                                           **
** Module for 123 Flash Chat Server software                            **
** ==============================================                       **
**                                                                      **
** Copyright (c) by TopCMM 					        **
** Daniel Jiang (support@123flashchat.com)          			**
** http://www.topcmm.com						**
** http://www.123flashchat.com                                          **
** http://www.phpnuke.org/                                              **
**                                                                      **
**************************************************************************



####################################################################################################################
## Notes:                                                                                                         ##
##                                                                                                                ##
##     IMPORTANT!!!!                                                                                              ##
##     If you need to use the chat service on a local machine, before installing this module, please              ##
##     download 123FlashChat Server software first from this page:                                                ##
##     http://www.123flashchat.com/download.html                                                                  ##
##     You may get the latest free demo version of 123 flash chat server software at there.                       ##
##                                                                                                                ## 
##     And get professional support from: http://www.123flashchat.com/support.html                                ##
##     We provide online forum support, email support, online live support, and phone support                     ##
##     etc.                                                                                                       ##
##                                                                                                                ##
##     Good luck and have a nice day!                                                                             ##
##                                                                                                                ##
####################################################################################################################
## Before Adding This MOD To Your phpnuke, You Should Backup All The Files Related To This MOD                    ##
####################################################################################################################


Step 1, Install module files to your phpnuke:


        File Copy 

            copy blocks/block-123_Flash_Chat_Server.php              to                  <phpnuke installed directory>/blocks/block-123_Flash_Chat_Server.php
            copy folder modules/123flashchat/                        to                  <phpnuke installed directory>/modules/123flashchat/


Step 2, Configure chat module's running mode:
        
        1). Please choose the running mode according to your needs.
             
            Configuration path:                       <phpnuke installed directory>/modules/123flashchat/flashchatconf/config.php

            Configure the following parameters:
                                                      $running_mode
            Configuration reference:
                                                      $running_mode = 1; (only 1 or 2 or 3)


        2). Configure the parameters of the running mode you chose.


            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:  http://www.123flashchat.com/download.html. 

               Configuration path:                    <phpnuke installed directory>/modules/123flashchat/flashchatconf/config_local.php

               Configure the following parameters:
                                                  
                                                      $chat_group
                                                      $client_size_width
                                                      $client_size_height
                                                      $chat_data_path
                                                      $primary_server_host
                                                      $primary_server_port
                                                      $chat_client_root_path
                                                      $swf_file_name   (modification is not recommended)
                            
               Configuration reference:
                                                      $chat_group            =  "default";
                                                      $client_size_width     =  634;
                                                      $client_size_height    =  476;
                                                      $chat_data_path        =  "<123flashchat install directory>/server/data/default/"; 
                                                      $primary_server_host   =  "localhost";
                                                      $primary_server_port   =  51127;
                                                      $chat_client_root_path =  "http://www.123flashchat.com/";
                                                      $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:                    <phpnuke installed directory>/modules/123flashchat/flashchatconf/config_host.php

               Configure the following parameters:

                                                      $chat_group 
                                                      $client_size_width
                                                      $client_size_height
                                                      $primary_server_host
                                                      $primary_server_port 
                                                      $chat_client_root_path (Not Necessary)
                                                      $swf_file_name (Modification is not recommended)

               Configuration reference:
                                                      $chat_group            =  "default";
                                                      $client_size_width     =  634;
                                                      $client_size_height    =  476;
                                                      $primary_server_host   =  "www.123flashchat.com";
                                                      $primary_server_port   =  51128;
                                                      $chat_client_root_path =  "";
                                                      $swf_file_name         =  "123flashchat.swf";  
 
             3. Chat server is hosted by 123flashchat.com free of charge ($running_mode = 3).

                 If you need to use this service, no 123FlashChat server software is needed to be installed, 
                 we will provide you free chat room, and you can choose the room name as you want.
            
               Configuration path:                    <phpnuke installed directory>/modules/123flashchat/flashchatconf/config_free.php

               Configure the following parameters:

                                                      $room_name 

               Configuration reference:
                                                      $room_name              =  "YourRoomName";
                                                      (If you leave $room_name as blank, the default $room_name's value will be your domain's name)







Step 3, Install the module in the admin panel

            1. OPEN: Admin Panel -> Blocks -> Find: Add a New Block -> config it:
              
                                                                 title       ->  chat (or others you like)
                                                                 Filename    ->  "123 flash chat server"
                                                                 Position -> Left
            2. "Create Block"  -> "home".
             





Step 4, Integrate your chat with phpnuke user database

        If you choose running mode 1 or mode 2, integration is needed, you may achieve this by following the instructions below.

            1. Log in the Admin Panel of your 123FlashChat server
               OPEN: System Settings -> Integrate Panel
 
            2. Find: DataBase -> SELECT: URL -> edit 
      
            3. Change URL:
                 http://<phpnuke install directory>/modules.php?name=123flashchat&op=login&username=%username%&password=%password%

            4. Press OK to save your setting.
   
    