<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="./modx.smith.en.xsl"?>
<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">Hide the Red X</title>
		
		<description lang="en">Show a custom graphic for broken images in posts.</description>
		
		<author-notes lang="en"><![CDATA[
We've all seen the dreaded Red X and its cousins, the graphics some web browsers will display in place of an image that does not load on a web page.  They can make a web site look unprofessional or unfinished - things that can have negative impact on people's perception of the site. With Hide the Red X, you can display your own custom graphic for broken images posted with phpBB's image BBCode.

Instructions will be provided only for prosilver. Most other styles, including subsilver2, do or will use the same bbcode.html file as prosilver, so these instructions should work for most styles. Just remember to copy the image to the styles you're installing on and to change the prosilver path in the last snippet of code added.

If you have additional image BBCodes defined in the Administration Control Panel or otherwise installed, this modification's features can be added to them as well. Just insert the same code added to the prosilver bbcode.html into their HTML Replacement.

Previous and latest versions of this and all my phpBB works can be found at my personal phpBB related web site, phpBB Smith, linked in the Author details. If you enjoy this modification and would like to support future development or suggest a new feature, please feel free to drop by and leave a comment.

Have a nice day. :D
]]></author-notes>
		
		<author-group>
			<author>
				<realname>Jeremy Rogers</realname>
				<username>Thoul</username>
				<homepage>http://www.phpbbsmith.com/</homepage>
			</author>
		</author-group>
		
		<mod-version>1.2.0</mod-version>
		
		<installation>
			<level>easy</level>
			<time>120</time>
			<target-version>3.0.4</target-version>
		</installation>

		<history>
			<entry>
				<date>2009-03-11</date>
				<rev-version>1.2.0</rev-version>
				<changelog lang="en">
					<change>Repacked for MODx.</change>
					<change>Tested on phpBB 3.0.4, no changes needed.</change>
					<change>Dropped the subsilver2 instructions for a smaller package. It's the same as prosilver anyway, see the Author Notes.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-31</date>
				<rev-version>1.1.0</rev-version>
				<changelog lang="en">
					<change>Updated for phpBB 3.0.0 Gold.</change>
					<change>Added bbcode.php edit.</change>
					<change>Corrected wrong path structure for the subsilver2 template in the package.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-04-24</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
				    <change>Initial release.</change>
				</changelog>
			</entry>
		</history>
	</header>
	
	<action-group>
		<copy>
			<file from="root/styles/prosilver/theme/images/missing.gif" to="styles/prosilver/theme/images/missing.gif" />
		</copy>
		
		<open src="includes/bbcode.php">
			<edit>
				<find><![CDATA[				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',]]></find>
				<inline-edit>
					<inline-find><![CDATA[$user->lang['IMAGE'] . '"]]></inline-find>
					<inline-action type="after-add"><![CDATA[ onError="javascript:this.src=\'styles/' . $user->theme['template_path'] . '/theme/images/missing.gif\'"]]></inline-action>
				</inline-edit>
			</edit>
		</open>
		<open src="styles/prosilver/template/bbcode.html">
			<edit>
				<comment lang="en">If you're installing on other styles or plan to use a different image, don't forget to change the image path and/or filename in the In-line Add after below.</comment>
				<find><![CDATA[<!-- BEGIN img -->]]></find>
				<inline-edit>
					<inline-find><![CDATA[alt="{L_IMAGE}"]]></inline-find>
					<inline-action type="after-add"><![CDATA[ onError="javascript:this.src='styles/prosilver/theme/images/missing.gif'"]]></inline-action>
				</inline-edit>
			</edit>
		</open>
	</action-group>
</mod>
