﻿<?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.0</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>1</major>
      <minor>0</minor>
      <revision>0</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-05-20</date>
        <rev-version>
          <major>1</major>
          <minor>0</minor>
          <revision>0</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->Themes->Edit the activated Template->edit->overall_header.html">
    <edit>
    		<find><![CDATA[	</head>]]></find>
			<action type="before-add"><![CDATA[	<script language="Javascript" type="text/javascript">
	function openChat()
	{
		window.open('123flashchat.php', '123flashchat', 'height={CHAT_HEIGHT},resizable=yes,width={CHAT_WIDTH}');
	}
	</script> ]]></action>
	</edit>
	 <edit>
    		<find><![CDATA[	<a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" class="icon-faq">{L_FAQ}</a>&nbsp;]]></find>
			<action type="before-add"><![CDATA[	<a href="http://www.123flashchat.com" onClick="openChat();return false;" onMouseOver="window.status='123flashchat}';return true" class="icon-chat">Chat</a> ]]></action>
	</edit>
	</open>
	<open src="Login Admin Panel->Styles->Themes->Edit the activated Template->edit->index_body.html">
    <edit>
    		<find><![CDATA[	<h3>{L_BIRTHDAYS}</h3> ]]></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="root/123flashchat.php" to="root/123flashchat.php" />	
      <file from="root/phpbb_login_chat.php" to="root/phpbb_login_chat.php" />	
      <file from="root/adm/style/acp_chat.html" to="adm/style/acp_chat.html" />
      <file from="root/includes/functions_chat.php" to="includes/acp/functions_chat.php" />
      <file from="root/includes/acp/info/acp_chat.php" to="includes/acp/info/acp_chat.php" />
      <file from="root/includes/acp/acp_chat.php" to="includes/acp/acp_chat.php" />
      <file from="root/language/en/mods/chat.php" to="language/en/mods/chat.php" />
      <file from="root/{T_THEME_PATH}/images/123flashchat.gif" to="root/{T_THEME_PATH}/images/123flashchat.gif" />
      <file from="root/{T_THEME_PATH}/images/icon_123flash_chat.gif" to="root/{T_THEME_PATH}/images/123flashchat.gif" />
    </copy>

	    <diy-instructions lang="en"><![CDATA[Open File:
root/index.php

Find:
$birthday_list = '';

After add:
// begin 123 flash chat mod
include($phpbb_root_path . 'includes/functions_chat.'.$phpEx);
$chat_info = getChatters();
$chat_list = getChatterList();
//end 123 flash chat mod
]]></diy-instructions>

<diy-instructions lang="en"><![CDATA[Open File:
root/index.php

Find:
'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'     => $config['chat_width'],
'CHAT_HEIGHT'    => $config['chat_height'],
//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 click “Enable” on the Module.
Refresh admin panel page->123flashchat->set chat configurations]]></diy-instructions>

 <diy-instructions lang="en"><![CDATA[Integrate PHPBB3 user database with chat server:
  1.Chat server is hosting by your own.
  Please open <123flashchat installed directory>/server/etc/groups/{groupname}/server.xml
  Find Option:
    <integrated-other-database>None</integrated-other-database> 
  Change it to:
    <integrated-other-database>URL</integrated-other-database> 
  Find Option:
    <auth-url charset="UTF-8">http://yourwebsite/login_chat.php?username=%username%&amp;password=%password%</auth-url>
  Change it to:
    <auth-url charset="UTF-8">http://{phpbb_site}/phpbb_login_chat.php?username=%username%&amp;password=%password%</auth-url>	
  Please restart chat room to make integration work.
   	
  2.Chat server is hosting by 123FlashChat
  Please contact us at support@123flashchat.com and provide the url of phpbb_login_chat.php,we will add this url to your host chat's configuration for you.]]></diy-instructions>
  </action-group>
</mod>