﻿<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!-- $Id: install.xml 31M 2007-08-04 21:44:15Z (local) $ -->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.1.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
    <title lang="en">ACP of 123FlashChat chat module for phpBB 3.x</title>

    <description lang="en">It enables the administrator to configure the location and dimension of the chat room in the phpBB in the Admin Control Panel after the chat room is installed and user database integration is done.</description>

    <author-notes lang="en"><![CDATA[The MOD will be easily installed.
	    It fits two occasions, that the chat server and the web server which hosts phpBB are on the same domain or on the different domains.
	    It enables the administrators to change the chat size and location.
	    It also helps to show the chat room's data on the front page of PHPBB.
	    ]]></author-notes>

    <author-group>
      <author>
        <username>TOPCMM</username>
        <realname>Daniel Jiang</realname>
        <homepage>http://www.123flashchat.com</homepage>
        <email>support@123flashchat.com</email>
		<contributions />
      </author>
    </author-group>
	
	<support>
		<topic>
			<location>www.123flashchat.com</location>
			<topic-name>Support Topic</topic-name>
			<topic-url>http://www.123flashchat.com/forum</topic-url>
		</topic>
		<topic>
			<location>www.topcmm.com</location>
			<topic-name>Support Helpdesk</topic-name>
			<topic-url>http://www.topcmm.com/helpdesk</topic-url>
		</topic>
	</support>

    <mod-version>
      <major>3</major>
      <minor>1</minor>
      <revision>1</revision>
    </mod-version>

    <installation>
      <level>easy</level>
      <time>300</time>
      <target-version>
        <target-primary>3.0.RC4</target-primary>
        <target-major allow="exact">3</target-major>
        <target-minor allow="exact">0</target-minor>
      </target-version>
    </installation>

    <history>
      <entry>
        <date>2008-12-16</date>
        <rev-version>
          <major>3</major>
          <minor>1</minor>
          <revision>1</revision>
        </rev-version>
        <changelog lang="en">
          <change>Official Public Release for PHPBB3</change>
        </changelog>
      </entry>
    </history>
  </header>

  <action-group>
	<open src="Login Admin Panel->Styles->Themes->Edit the activated Style">
    <edit>
    		<find><![CDATA[	.icon-faq						{ background-image: url("{T_THEME_PATH}/images/icon_faq.gif"); }]]></find>
			<action type="after-add"><![CDATA[	.icon-chat						{ background-image: url("{T_THEME_PATH}/images/icon_123flash_chat.gif"); } ]]></action>
	</edit>
	 <edit>
    		<find><![CDATA[	.icon-faq,]]></find>
			<action type="after-add"><![CDATA[	.icon-chat, ]]></action>
	</edit>
	</open>
	<open src="Login Admin Panel->Styles->Template->edit->Template file: overall_header.html">
    <edit>
    		<find><![CDATA[	</head>]]></find>
			<action type="before-add"><![CDATA[	<script language="Javascript" type="text/javascript">
	function openChat()
	{
                  if ({CHAT_FULLSCREEN})
                  {
                    window.open('123flashchat.php', '123flashchat', 'fullscreen=1,resizable=yes');
                  }
                  else
                  {
		    window.open('123flashchat.php', '123flashchat', 'height={CHAT_HEIGHT},resizable=yes,width={CHAT_WIDTH}');
                  }
	}
	</script> ]]></action>
	</edit>
	 <edit>
    		<find><![CDATA[	<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>]]></find>
			<action type="before-add"><![CDATA[	<li class="icon-chat"><a href="http://www.123flashchat.com" onClick="openChat();return false;" onMouseOver="window.status='123flashchat';return true">Chat</a></li> ]]></action>
	</edit>
	</open>
	<open src="Login Admin Panel->Styles->Template->edit->Template file: index_body.html">
    <edit>
    		<find><![CDATA[	<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->  ]]></find>
			<action type="before-add"><![CDATA[	<!-- 123 Flash Chat Server Software Mod Begin --> 
  <tr> 
	<h3><a href="javascript:void(0);" target="_blank" onClick="openChat();return false;" onMouseOver="window.status='123flashchat';return true"><img src="{T_THEME_PATH}/images/123flashchat.gif" alt="open Chat" border="0" />Chat Status</a></h3>
	<p>{CHAT_TOTAL_ROOMS} <br /> {CHAT_TOTAL_CONNECTIONS} <br /> {CHAT_TOTAL_LOGON_USERS}  <br /> {CHAT_USER_LIST} </p>
	
  </tr>
  	<!-- 123 Flash Chat Server Software Mod End -->  ]]></action>
	</edit>
	</open>
    <copy>
      <file from="phpbb module directory/123flashchat.php" to="phpbb install directory/123flashchat.php" />	
      <file from="phpbb module directory/phpbb_login_chat.php" to="phpbb install directory/phpbb_login_chat.php" />	
      <file from="phpbb module directory/adm/style/acp_chat.html" to="phpbb install directory/adm/style/acp_chat.html" />
      <file from="phpbb module directory/includes/functions_chat.php" to="phpbb install directory/includes/functions_chat.php" />
      <file from="phpbb module directory/includes/acp/info/acp_chat.php" to="phpbb install directory/includes/acp/info/acp_chat.php" />
      <file from="phpbb module directory/includes/acp/acp_chat.php" to="phpbb install directory/includes/acp/acp_chat.php" />
      <file from="phpbb module directory/language/en/mods/chat.php" to="phpbb install directory/language/en/mods/chat.php" />
      <file from="phpbb module directory/prosilver/theme/images/123flashchat.gif" to="phpbb install directory/YOUR_THEME_PATH/images/123flashchat.gif" />
      <file from="phpbb module directory/prosilver/theme/images/icon_123flash_chat.gif" to="phpbb install directory/YOUR_THEME_PATH/images/icon_123flash_chat.gif" />
    </copy>

	    <diy-instructions lang="en"><![CDATA[Open File:
root/index.php

Find:
$birthday_list = '';

After add:
// begin 123 flash chat mod include
include ($phpbb_root_path . 'includes/functions_chat.'.$phpEx); 
$chat_info = getChatters(); 
$chat_list = getChatterList();
$Room_im= chat_config();
//end 123 flash chat mod 
]]></diy-instructions>

<diy-instructions lang="en"><![CDATA[Open File:
root/index.php

Find:(you can Ctrl + F 'TOTAL_USERS' )
'TOTAL_USERS'	=> sprintf($user->lang[$l_total_user_s], $total_users), 


After add:
// begin 123 flash chat mod
'CHAT_TOTAL_ROOMS' => $chat_info['room_numbers'],
'CHAT_TOTAL_CONNECTIONS' => $chat_info['connections'],
'CHAT_TOTAL_LOGON_USERS' => $chat_info['logon_users'],
'CHAT_USER_LIST' => $chat_list,
'CHAT_WIDTH'     => $Room_im['chat_width'],'CHAT_HEIGHT'    => $Room_im['chat_height'],
'CHAT_FULLSCREEN' => $Room_im['chat_fullscreen'],
//end 123 flash chat mod

]]></diy-instructions>

    <diy-instructions lang="en"><![CDATA[Administration Control Panel > System > Module Management :: Administration Control Panel 
Add "123flashchat" in "Create new module",and click  it
Select "Module" from the Module Type drop-down menu 
Select "No Parent" from the Parent drop-down menu
Select "Chat[acp_chat]" from the Choose module drop-down menu
and click "submit".
Then back to the  Administration Control Panel and click “Enable” on the 123flashchat ACP.
Refresh admin panel page->123flashchat->set chat configurations]]></diy-instructions>


<diy-instructions lang="en"><![CDATA[
Configure the parameters of the running mode you chose.:

 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:
                                                  
                             Chat group
                             Chat client width
                             Chat client height
                             Chat data path
                             Primary server host
                             Primary server port
                             Client location
                             Client swf name (modification is not recommended)
                            
        Configuration reference:
                             Chat group            =  "default";
                             Chat client width     =  634;
                             Chat client height    =  476;
                             Chat data path        =  "<123flashchat install directory>/server/data/default/"; 
                             Primary server host   =  "localhost";
                             Primary server port   =  51127;
                             Client location       =  "http://www.123flashchat.com/";
                             Client swf name       =  "123flashchat.swf";  



  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:

                              Chat group
                              Chat client width
                              Chat client height
                              Primary server host
                              Primary server port
                              Client location   (Not Necessary)
                              Client swf name (Modification is not recommended)

          Configuration reference:
                              Chat group            =  "default";
                              Chat client width     =  634;
                              Chat client height    =  476;
                              Primary server host   =  "www.123flashchat.com";
                              Primary server port   =  51128;
                              Client location       =  "";
                              Client swf name       =  "123flashchat.swf";  
 
  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:

                               Chat room name 

            Configuration reference:
                               Chat room name         =  "YourRoomName";
                             (If you leave room name as blank, the default room name's value will be your domain's name.)


]]></diy-instructions>




 <diy-instructions lang="en"><![CDATA[
Integrate your chat with PHPBB 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://<PHPBBX install directory>/phpbb_login_chat.php?username=%username%&password=%password%

       4. Press OK to save your setting.
]]></diy-instructions>

 </action-group>
</mod>