**************************************************************************
** Moodle: 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.moodle.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 moodle, You Should Backup All The Files Related To This MOD                     ##
####################################################################################################################

 


Step 1, Install module files to your moodle.
        
        File copy


             copy forder mod/flashchat/                     to                  <moodle installed directory>/mod/
             copy forder mod/icon.gif                       to                  <moodle installed directory>/theme/chameleon/pix/mod/flashchat/


Step 2, Install the module in the admin panel.

        2). OPEN: Admin panel -> "Notifications" (in "Site Administration" menu) -> the module will be automatically installed in your moodle site;

        3). OPEN: Admin panel -> "turn editing on" -> Choose: "add an activity" (in "Main Menu") -> Select: "Flashchat".



Step 2, "Add a new chat room" and configure chat module's running mode.
        
        1). In the "Add a new chat room" panel:
            
            1. "Name"       ->   Choose a name for the chat room you want.(for example: 123flashchat)
 
                           
            2. Please choose the running mode according to your needs.(in "Flashchat settings")

               Configure the first parameters (very important):
                                                                  Mode (flashchat running mode)


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


            1. Chat server is hosted by your own.
            
                 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. 

               Configure the following parameters:
                                                  
                                                      Group
                                                      Client Width
                                                      Client height
                                                      Chat Data Path
                                                      Primary Host/Host Path
                                                      Primary Port
      
                            
               Configuration reference:
                                                      group                  =  "default";
                                                      Client Width           =  634;
                                                      Client height          =  476;
                                                      Chat Data Path         =  "<123flashchat install directory>/server/data/default/"; 
                                                      Primary Host/Host Path =  "localhost";
                                                      Primary Port           =  51127;


               Configuration introduce:
                              Primary Host/Host Path:
                                                     It should be "localhost" if your chat server and moodle are on the same server,if not,
                                                     fill in the real ip where yoru chat server located.
                              Primary Port:
                                                     If you don't change it in fcserver.xml,default value is 51127.
              
                              Group:                
                                                     If you don't use a pro version of 123flashchat,normally it should be default.
                              Chat Data Path:
                                                     Should be <123Flashchat Server directory>/server/data/
          
                              Client Width:
                                                     The chat room's width,should be larger than 634.
                              Client Height:
                                                     The chat room's height,should be larger than 476.



             2. Chat server is hosted by 123flashchat.com.

                 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.

               Configure the following parameters:

                                                      Group
                                                      Client Width
                                                      Client height
                                                      Primary Host/Host Path
                                                      Primary Port
                                                      Secondary Host 
                                                      Secondary Port 
                                                      Http Host 
                                                      Http Port 

               Configuration reference:
                                                      group                  =  "default";
                                                      Client Width           =  634;
                                                      Client height          =  476;
                                                      Primary Host/Host Path =  "www.123flashchat.com";
                                                      Primary Port           =  51128; 

               Configuration introduce:

                              Primary Host/Host Path:
                                                     the host address of your chat room,for example:"host.123flashchat.com"
                              Primary Port:
                                                     If you don't change it in fcserver.xml,default value is 51127.

 
             3. Chat server is hosted by 123flashchat.com free of charge .

                 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.
            

               Configure the following parameters:

                                                      Initial Room 
                                                      Client Width
                                                      Client height

               Configuration reference:
                                                      Initial Room           =  "YourRoomName";
                                               (If you leave room name as blank, the default room name's value will be your domain's name.)
                                                      Client Width           =  634;
                                                      Client height          =  476;


               Configuration introduce:

                              Initial Room:         
                                                     Room's name or id could be defined here for people to enter this room automatically.




Step 4, Integrate your chat with moodle 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://<moodle install directory>/mod/flashchat/login_chat.php?username=%username%&password=%password%

            4. Press OK to save your setting.
   
       

   Then you can upload 123flashchat.php to any directory you prefer, login on moodle with your account, you will find yourself could automatically log in the chat. Enjoy!!
