<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="./contrib/xsl/modx.prosilver.en.xsl"?>
<!--
	NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.
-->
<!--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/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
		<title lang="en">Prime Instant Redirect</title>
	<description lang="en">Instantly redirects the user when they would normally be presented with a notification page that automatically redirects after three seconds.</description>
	    <author-notes lang="en">Creating, maintaining, and updating MODs requires a lot of time and effort, so if you like this MOD and have the desire to express your thanks through donations, that would be greatly appreciated. My Paypal ID is primehalo@gmail.com, or contact me for my mailing address. The suggested donation amount for this MOD is $2.00 (but any amount will help).</author-notes>
		<author-group>
			<author>
				<realname>Ken F. Innes IV</realname>
				<email>primehalo@gmail.com</email>
				<username>primehalo</username>
				<homepage><![CDATA[http://www.absoluteanime.com/admin/mods.htm#instant_redirect]]></homepage>
			</author>
		</author-group>
		<mod-version>1.0.3</mod-version>
		<installation>
			<level>easy</level>
			<time>300</time>
			<target-version>3.0.10</target-version>
		</installation>
		<history>
			<entry>
				<date>2010-06-05</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Initial release.</change>
				</changelog>
			</entry>
			<entry>
				<date>2011-04-09</date>
				<rev-version>1.0.1</rev-version>
				<changelog lang="en">
					<change>Don't automatically redirect the page confirming a password was re-sent.</change>
				</changelog>
			</entry>
			<entry>
				<date>2011-06-21</date>
				<rev-version>1.0.2</rev-version>
				<changelog lang="en">
					<change>Don't automatically redirect the page confirming an account was activated.</change>
				</changelog>
			</entry>
			<entry>
				<date>2012-01-30</date>
				<rev-version>1.0.3</rev-version>
				<changelog lang="en">
					<change>Fixed: "Mark Forums Read" stopped working after the phpBB 3.0.10 update.</change>
				</changelog>
			</entry>
		</history>
		<link-group>
			<link type="contrib" href="contrib/update 1.0.0 to 1.0.1.xml" lang="en">Update 1.0.0 to 1.0.1</link>
			<link type="contrib" href="contrib/update 1.0.1 to 1.0.2.xml" lang="en">Update 1.0.1 to 1.0.2</link>
			<link type="contrib" href="contrib/update 1.0.2 to 1.0.3.xml" lang="en">Update 1.0.2 to 1.0.3</link>
		</link-group>
	</header>
	<action-group>
		<copy>
 			<file from="root/includes/prime_instant_redirect.php" to="includes/prime_instant_redirect.php" />
		</copy>
		<open src="includes/functions.php">
			<edit>
				<find><![CDATA[	$url = redirect($url, true, $disable_cd_check);]]></find>
				<action type="after-add"><![CDATA[//-- mod: Prime Instant Redirect --------------------------------------------//
	global $phpbb_root_path, $phpEx;
	include($phpbb_root_path . 'includes/prime_instant_redirect.' . $phpEx);
	$prime_instant_redirect->redirect($url, $time);
//-- end: Prime Instant Redirect --------------------------------------------//]]></action>
			</edit>
		</open>

		<open src="includes/functions_display.php">
			<edit>
				<find><![CDATA[		$redirect = build_url(array('mark', 'hash'));
		meta_refresh(3, $redirect);]]></find>
				<action type="replace-with"><![CDATA[		$redirect = build_url(array('mark', 'hash'));
//-- mod: Prime Instant Redirect --------------------------------------------//
// We are commenting out this line because we are moving it elsewhere:
//		meta_refresh(3, $redirect);
//-- mod: Prime Instant Redirect --------------------------------------------//]]></action>
			</edit>

			<edit>
				<find><![CDATA[			trigger_error(
				$user->lang['FORUMS_MARKED'] . '<br /><br />' .
				sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>')
			);]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Instant Redirect --------------------------------------------//
			meta_refresh(3, $redirect);
//-- mod: Prime Instant Redirect --------------------------------------------//]]></action>
			</edit>

			<edit>
				<find><![CDATA[			trigger_error(sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Instant Redirect --------------------------------------------//
			meta_refresh(3, $redirect);
//-- mod: Prime Instant Redirect --------------------------------------------//]]></action>
			</edit>
		</open>
	</action-group>
</mod>
