**************************************************************************
** Dating Pro: 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.datingpro.com/                                            **
**                                                                      **
**  DatingPro version : 2013.01                                         **
**  DatingPro Test version : 2013.01                                    **
**  Version : 2.0                                                       **
**                                                                      **
**************************************************************************



####################################################################################################################
## Notes:                                                                                                         ##
##                                                                                                                ##
##     IMPORTANT!!!!                                                                                              ##
##     If you need to use the webmessenger service on a local machine, before installing this module, please      ##
##     download 123WebMessenger Server software first from this page:                                             ##
##     http://www.123flashchat.com/web-messenger-download.html                                                    ##
##     You may get the latest free demo version of 123 web messenger 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 IP.Board, You Should Backup All The Files Related To This MOD                  ##
####################################################################################################################


Step 1, Copy the neccessary file to the DatingPro

		Copy topcmm_webmessenger/   ->      http://<Your datingpro root URL>/topcmm_webmessenger

Step 2, Install database
		With this the following url copied to the browser then run;
		Url:<Your datingpro root URL>/topcmm_webmessenger/123webmessenger_install.php

Step 3, Edit DatingPro Files

		1) Open <Your datingpro root URL>/templates/admin/admin_modules.tpl

			 Find:
					 
		{if $settings.install_pilot_module_blog eq '1'}

			Before Add:
		
<!--123 Web Messenger Code Start-->
{if $settings.install_pilot_module_topcmm_webmessenger eq '1'}
        <div class="sg_settings_box sg_settings_module">
            <div class="sg_box_title" onclick="document.location.href='{$settings.topcmm_webmessenger_admin_url}/topcmm_webmessenger/admin/settings.php'">
                123 Web Messenger (2.0)
            </div>
            <div class="sg_box_text" style="height: 45px;" onclick="document.location.href='{$settings.topcmm_webmessenger_admin_url}/topcmm_webmessenger/admin/settings.php'">
				
            </div>
            <div style="position:absolute;bottom:10px;right:10px;">
				{if $settings.use_pilot_module_topcmm_webmessenger eq '1'}
					<a class="notuse_module_icon" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.make_inactive}');return false" onclick="javascript:notuse('topcmm_webmessenger');">&nbsp;</a>
				{else}
					<a class="use_module_icon" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.make_active}');return false" onclick="javascript:use('topcmm_webmessenger');">&nbsp;</a>
				{/if}
            </div>
        </div>
{/if}
<!--123 Web Messenger Code End-->

		2) Open <Your datingpro root URL>/homepage.php

			Find:

include_once "./include/class.wall_events.php";

			 After Add:

/*****************************************************************/
if(file_exists("./topcmm_webmessenger/common_index.php")){
	include_once "./topcmm_webmessenger/common_index.php";
}
/*****************************************************************/

		3) Open <Your datingpro root URL>/templates/pilot_3_theme/index_bottom.tpl

			 Find:
</body>
</html>

			Before Add:
				 	 
<!-- Begin 123WebMessenger code --> 
{if $settings.use_pilot_module_topcmm_webmessenger eq '1'}
	{if $wmconfig.wm_extendserver == '2'}
		<script language="javascript" src="http://free.123flashchat.com/wmjs.php?domain={$servername}"></script>
	{else}
		<script language="javascript" src="{$wmconfig.wm_web_path}js/config.js"></script><br /><br />
		<script language="javascript" src="{$wmsiteroot}/topcmm_webmessenger/wmessenger_js_config.php"></script>
		<script language="javascript" src="{$wmconfig.wm_web_path}js/123webmessenger_fb.js"></script>
	{/if}
{/if}
<!-- End 123WebMessenger code -->

				
Step 4, Configure module:
        
    1. Login your website with admin account.

    2. Find and click "Modules management" at the left of DatingPro Admin Panel.

    3. Make sure 123 Web Messenger has been activated, and click it to redirect to a config page.

    4. Configure and save the Settings.

Step 5, Integrate your webmessenger with DatingPro user database

    Intro: For those who chooses running webmessenger on [123WebMessenger Server Hosted By Your Own] or [123WebMessenger Server Hosted By 123FlashChat], database integration is necessary, 
    please follow the instructions below.

            1. DatingPro Admin Panel -> Modules Management -> 123 Web Messenger -> Admin Panel, Log in the Admin Panel of your 123WebMessenger server using webmessenger admin account.
               OPEN: System Settings-> Integration Panel
 
            2. For DataBase, SELECT: URL, and click "edit"
      
            3. Change URL to:

               http://<DatingPro install directory>/topcmm_webmessenger/login_chat.php?username=%username%&password=%password%

            4. Press OK to save the setting.

Step 6, If you want to integrate 123webmessenger friendlist with DatingPro friendlist,please follow the instructions below.

			1. If you are running webmessenger on [123WebMessenger Server Hosted By Your Own].
				Open and edit <123Webmessenger Server Path>/server/etc/groups/default/server.xml
				Find document "integrated-user-data", 
					set enable On 
					set url http://<DatingPro install directory>/topcmm_webmessenger/userdata.php?action=%action%&amp;username=%username%&amp;destusername=%destusername%&amp;friendgroup=%friendgroup%
					
			2. If you are running webmessenger on [123WebMessenger Server Hosted By 123FlashChat].
				Please feel comfortable  to connect us support@123flashchat.com.
			
			