﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<!-- $Id: install.xml 279 2008-04-13 08:54:14Z paul $ -->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.2.xsd">
	<header>
	<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
	<title lang="en">Ajax ShoutBox</title>
	<title lang="fr">ShoutBox en Ajax</title>
	<description lang="en">This mod add a fully configurable shoutbox to your forum index.</description>
	<description lang="fr">Ce mod ajoute une shoutbox totalement configurable à votre forum.</description>
	<author-notes lang="en">This mod requires for the user visiting the forum that he has eneblad JavaScript. Without JavaScript, the shoutbox isn't displayed.

You can place this shoutbox eveywhere on the forum, the only thing you has to do is editing the correct html file, with the changes that are normally done for index_body.html.
If you place it somewhere else as index_body.html you need also to move the calls to as_display (And the include) in index.php to the correct page.

Please report bug or feature requests ONLY at http://www.paulsohier.nl/ajax/ Thats the only place where I will answer bugreports and featurerequests!

Use contrib/upgrade.xml to upgrade from 1.0.3 to 1.2.0, and use contrib/update.xml to update from 1.1.1 to 1.2.0.

</author-notes>
<author-notes lang="fr">Ce mod requière pour le visiteur sur le forum qu'il ai activé JavaScript. Sans JavaScript, la shoutbox ne s'affiche pas.

Vous pouvez placer cette shoutbox n'importe ou sur le forum, la seule chose que vous aavez à faire est de corriger la modification du fichier html, avec les modifications qui sont normalement faites pour index_body.html.
Si vous la placez à un autre endroit que sur index_body.html de passer des appels vers les as_display (Et les inclure) dans index.php vers la bonne page.

Veuillez rapporter tout bug ou demandes de fonctionnalités SEULEMENT sur http://www.paulsohier.nl/ajax/ Ceci est le seul endroit où je vais répondre des reports de bugs et demandes de fonctionnalités!

Utilisez contrib/upgrade.xml à la mise à niveau de 1.0.3 vers 1.2.0, et l'utilisation contrib/update.xml pour mettre à jour à partir de 1.1.1 vers 1.2.0.

</author-notes>
	<author-group>
		<author>
		<realname>Paul Sohier</realname>
		<email>mods@paulscripts.nl</email>
		<username>Paul</username>
		<homepage>http://www.paulscripts.nl/</homepage>
		<contributions />
		</author>
	</author-group>
	<mod-version>1.2.0</mod-version>
	<installation>
		<level>easy</level>
		<time>1000</time>
		<target-version>3.0.4</target-version>
	</installation>
	<link-group>
		<link type="template" href="contrib/subsilver2.xml" lang="en">subsilver2</link>
		<link type="language" lang="en" href="contrib/fr.xml">French language</link>
		<link type="language" lang="fr" href="contrib/fr.xml">Langage Francais</link>
	</link-group>

	<history>
		<entry>
			<date>2007-12-23</date>
			<rev-version>1.1.0</rev-version>
			<changelog lang="en">
				<change>First release for the 1.2.x development line, see the wiki for the major changes.</change>
			</changelog>
			<changelog lang="fr">
				<change>Première version de la ligne de développement 1.2.x, voir le wiki pour les grandes modifications.</change>
			</changelog>
		</entry>

		<entry>
			<date>2008-02-17</date>
			<rev-version>1.1.1</rev-version>
			<changelog lang="en">
				<change>Dont prune message if time is 0.</change>
				<change>Dont submit form if you press enter on edit, but trigger the js function instead.</change>
				<change>Log prunning</change>
				<change>A call-time pass by reference warning fixed</change>
				<change>Delete message when decode_message returns empty data.</change>
				<change>Bug #49: Delete button wasnt displayed when user has no info permission</change>
				<change>Fixed copy instruction with wrong filename for index.php</change>
				<change>Fixed bug with installation for mysql4</change>
				<change>Bug #58: Check to see if the returned xml in javascript is an object, this directly means that there should be no errors like with undfined function, xml error etc. If these still happen, please report them at trac (Not in the support topic!!!)</change>
				<change>Bug #55: Instead of clicking there is now a button to edit.</change>
				<change>Dynamic width of username/message field</change>
				<change>Fixed a xhtml error</change>
				<change>Fixed a JS error when delete was disabled but info was enabled</change>
				<change>Fixed a bug that the shoutbox wasnt refreshed after the cancel button was pressed for editing</change>
			</changelog>
		</entry>
		
		<entry>
			<date>2007-03-02</date>
			<rev-version>1.1.2</rev-version>
			<changelog lang="en">
				<change>Fixed a small bug with the wrong count of pruned/removed messages is logged.</change>
				<change>Fixed a typo.</change>
				<change>Fixed some bugs with edit function</change>
				<change>Moved several functions from js.php to static.js</change>
			</changelog>
		</entry>
		<entry>
			<date>2009-03-22</date>
			<rev-version >1.2.0</rev-version>
			<changelog lang="en">
                <change>Some small changes, nothing major</change>
			</changelog>
		</entry>
		</history>
		<meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
	</header>
	<action-group>
	    <diy-instructions lang="en">
	    Point your browser now to the install/index.php directory, to add the sql tables, config items and ACP modules.
	    After that, delete the install directory again!
	    Dont forget to set the permissions after that, as else nobody will see the shoutbox!
	    </diy-instructions>
		<diy-instructions lang="fr">
	    Pointez votre navigateur sur le répertoire install/index.php, afin d'ajouter les tables sql, les éléments de configuration et les modules ACP.
		Après cela, supprimez le répertoire d'installation.
		N'oubliez pas de mettre les autorisations, sinon personne ne verra la shoutbox!
	    </diy-instructions>
		<copy>
		    <file from="root/install/functions.php" to="install/functions.php" />
		    <file from="root/install/index.php" to="install/index.php" />

			<file from="root/ajax.php" to="ajax.php" />
			<file from="root/js.php" to="js.php" />
			<file from="root/static.js" to="static.js" />
			<file from="root/adm/style/acp_shoutbox.html" to="adm/style/acp_shoutbox.html" />
			<file from="root/includes/functions_shoutbox.php" to="includes/functions_shoutbox.php" />
			<file from="root/includes/acp/acp_shoutbox.php" to="includes/acp/acp_shoutbox.php" />
			<file from="root/includes/acp/info/acp_shoutbox.php" to="includes/acp/info/acp_shoutbox.php" />
			<file from="root/language/en/acp/permissions_ajax_shoutbox.php" to="language/en/acp/permissions_ajax_shoutbox.php" />
			<file from="root/language/en/acp/mods/ajax_shoutbox.php" to="language/en/acp/mods/ajax_shoutbox.php" />
			<file from="root/language/en/mods/info_acp_ajax_shoutbox.php" to="language/en/mods/info_acp_ajax_shoutbox.php" />
			<file from="root/language/en/mods/shout.php" to="language/en/mods/shout.php" />
			<file from="root/styles/prosilver/template/shout_body.html" to="styles/prosilver/template/shout_body.html" />
		</copy>
		<open src="cron.php">
		    <edit>
		        <find>/**
* Run cron-like action
* Real cron-based layer will be introduced in 3.2
*/
switch ($cron_type)
{
				</find>
				<action type="after-add"><![CDATA[	case 'as':
		if (time() - $config['as_interval'] <= $config['last_as_run'])
		{
			break;
		}

		include_once($phpbb_root_path . 'includes/functions_shoutbox.' . $phpEx);

		if ($use_shutdown_function)
		{
			register_shutdown_function('as_cron');
		}
		else
		{
			as_cron();
		}
	break;]]></action>
			</edit>
		</open>
		<open src="index.php">
			<edit>
				<find>$user->setup('viewforum');</find>
					<action type="after-add"><![CDATA[if (!function_exists('as_display'))
{
	include($phpbb_root_path . 'includes/functions_shoutbox.' . $phpEx);
}
as_display();
]]></action>
			</edit>
		</open>
		
		<open src="includes/constants.php">
			<edit>
				<find><![CDATA[?>]]></find>
				<action type="before-add">define('SHOUTBOX_TABLE', $table_prefix . 'shoutbox');</action>
			</edit>
		</open>
		
		<open src="styles/prosilver/template/editor.js">
		    <edit>
			    <find><![CDATA[	for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)]]></find>
				<action type="before-add">try
{
				</action>
			</edit>
			<edit>
				<find>      // we ignore the end value for IE, this is already dirty enough and we don't need it
      caretPos.start = txtarea.sel_start;
      caretPos.end = txtarea.sel_start;</find>
                <action type="after-add">}
catch(e)
{
}
				</action>
			</edit>
			
		</open>


		<open src="styles/prosilver/template/index_body.html">
			<edit>
				<find><![CDATA[<!-- INCLUDE forumlist_body.html -->]]></find>
				<action type="before-add"><![CDATA[<!-- INCLUDE shout_body.html -->]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[</head>]]></find>
				<action type="before-add"><![CDATA[
	<!-- IF S_DISPLAY_SHOUTBOX -->
		<script type="text/javascript" src="{U_SHOUT_STATIC}"></script>
		<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
		<script type="text/javascript" src="{U_SHOUT}"></script>
    <!-- ENDIF -->
	]]></action>
			</edit>
		</open>

	</action-group>
</mod>