<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="./modx.smith2.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/-->
<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">Photo Visual Confirmation</title>
		
		<description lang="en">
			Adds a new kind of Visual Confirmation, also known as a CAPTCHA, to phpBB 3.  The person presented with a confirmation prompt must look at photographs and determine if they fit in a certain category or not.
		</description>
		
		<author-notes lang="en"><![CDATA[
This modification includes several stock photos that are used to build the captcha.  It is highly recommended that you replace all of the default photos with unique photos of your own.  For maximum effectiveness, you should use a group of photos that no one else would have, such as photos you have taken personally and not posted online.

The captcha can be broken by a bot that has a copy of the photos you use.  To do this, the bot must compare the presented images to source images, such as the photos in this distribution.  To make this comparison more difficult, the presented images are tweaked using a number of random settings before being shown to the user.  Therefore, comparison requires more than a simple bit-for-bit equality test.  This isn't a very strong protection, but it's better than nothing.  The real strength of the captcha comes from the ease with which photos can be replaced.  Once the photos have been replaced, this captcha becomes much harder to break because the bots will not have the unmodified images.

Dropping in new photos has been made as easy as possible.  There is a new images/captcha/ directory, which contains directories holding photos. Three default sets of photos are supplied: cats, cars, and dogs. You can simply drop in new photos of cats, cars, or dogs to the appropriate directory. You may use as many images as you wish.  All images must be in the JPEG format.  They must have filenames ending with the extension ".jpg" or ".jpeg"; other than this, the filenames can be any valid name.  All of the supplied images are 256x192 - this is considered an optimal size, however, you can use images that are somewhat smaller or larger.

For this distribution package, the photos are intentionally limited to three clear categories.  It is easier to visually scan for cats or dogs specifically than for animals in general.  If you want to use entirely different image sets (for example, birds), please see the instructions in Add-More-Categories.html in the contrib/ directory of this distribution.

To place added protection on your images, it is also recommended that you rename the images/captcha/ directory to something completely random. After doing so, be sure to update the new Administration Control Panel configuration setting for the path to this directory.

This captcha requires the PHP GD extension.  Some image tweaks have further requirements that will not be present on all servers.  If you install this modification on a server where some of these requirements are not met, the settings page will display a notice informing you of such.
		]]></author-notes>
		
		<author-group>
			<author>
				<realname>Jeremy Rogers</realname>
				<username>Thoul</username>
				<homepage>http://www.phpbbsmith.com</homepage>
				<contributions-group>
					<contributions status="current" position="Developer, phpBB 3.0 Version"/>
				</contributions-group>
			</author>
			<author>
				<realname>Josh Yelon</realname>
				<username>Josh Yelon</username>
				<contributions-group>
					<contributions status="past" from="2006-10-19" to="2006-12-12" position="Developer, phpBB 2 Version"/>
				</contributions-group>
			</author>
		</author-group>
		
		<mod-version>2.0.2</mod-version>
		
		<installation>
			<level>easy</level>
			<time>120</time>
			<target-version>3.0.7-pl</target-version>
		</installation>

		<history>
			<entry>
				<date>2010-04-01</date>
				<rev-version>2.0.1</rev-version>
				<changelog lang="en">
					<change>Fixed a display issue with the confirmation prompt on posting and login.</change>
					<change>Improved randomization in image set selections.</change>
				</changelog>
			</entry>
			<entry>
				<date>2010-03-27</date>
				<rev-version>2.0.0</rev-version>
				<changelog lang="en">
					<change>Recoded to work with new phpBB captcha plugin system.  This includes removing several things that were no longer needed, such as the UMIL installer.</change>
					<change>Added support for more than two sets of images.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-06-12</date>
				<rev-version>1.1.2</rev-version>
				<changelog lang="en">
					<change>Modified install Find instructions for phpBB 3.0.5. (Applies to new installs only.)</change>
					<change>Added note to clear browser cache to instructions, due to cached ACP stylesheets making the preview look wonky.</change>
					<change>Added default mode setting, for better integration with modifications that use captchas, like Contact Board Administration.</change>
					<change>Borrowed the new wave transformation from phpBB's default captcha.</change>
					<change>Added new grayscale, interlace, and noise functions.</change>
					<change>Rewrote much of ACP interface for easier expansion in the future.</change>
					<change>Rotation and colorize settings are now a 1 in X chance.</change>
					<change>Image transformations are now listed in the order they are applied.</change>
					<change>No configuration changes are saved when an error is encountered. In the past, all changes except those triggering the error were saved.</change>
					<change>Added admin log entry on configuration update.</change>
					<change>On configuration change errors, the messages are displayed inline.</change>
					<change>Added ACP form token.</change>
					<change>Replaced installer with UMIL installer.</change>
					<change>Added integration install instructions for Contact Admin.</change>
					<change>Removed old upgrade instructions that are not supported by the new installer.</change>
					<change>Fix: Non-functioning rotation and mirror previews on lower PHP versions.</change>
					<change>Fix: Blank page errors resulting from including photo.php twice when a login form is displayed by posting.php.</change>
					<change>Fix: Removed dependency on phpBB 3.0.4's user->lang() due to too many forums having incomplete 3.0.4 upgrades.</change>
					<change>Fix: Replaced image selection method. Should hopefully end any residual problems due to file permission restrictions and perform better.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-04-03</date>
				<rev-version>1.1.1</rev-version>
				<changelog lang="en">
					<change>Added configuration options for the new image transformations added last version.</change>
					<change>Improved handling of settings in ACP preview.</change>
					<change>Improved exit handling on image errors.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-03-21</date>
				<rev-version>1.1.0</rev-version>
				<changelog lang="en">
					<change>Consolidated functions.php into photo.php, removed functions.php.</change>
					<change>Rewrites of code added to most files to make installation more concise.</change>
					<change>Removed change to language file, merged it with the modification's lang file.</change>
					<change>Added new template files to hold the HTML used.</change>
					<change>Added label HTML tags, so the pictures can be clicked to select them. (Note: doesn't work in Internet Explorer 7. That's browser bug, nothing I can do.)</change>
					<change>Replaced table layout of confirm images with lists on prosilver.</change>
					<change>Bug fix for broken images on systems with restrictive PHP safe_mode and open_basedir settings.</change>
					<change>Added per-instance width and height settings for output images.</change>
					<change>Added rotation option.</change>
					<change>Added a whole host of other new image transformations, which are randomly applied if available. Some require PHP 5 and/or that PHP uses the bundled version of the GD library. If these transformations are not available, they will simply not be used.</change>
					<change>The ACP preview is now run off the same code as the regular CAPTCHA, so if one displays, both will display.</change>
					<change>The ACP preview can now preview post and login settings.</change>
					<change>Changed location of ACP template files.</change>
					<change>Added error message when setting more than 32 photos on a prompt in the ACP. That is the limit, due to database restrictions.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-07-11</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Updated for phpBB 3 RC 3.</change>
					<change>Removed edit to language/en/acp/common.php (no longer needed in RC3).</change>
					<change>Changed some include()s to include_once()s to potentially cut down processing time in ACP.</change>
					<change>Renamed the language file from photo_captcha.php to info_acp_photo_captcha.php.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-06-04</date>
				<rev-version>0.6.0</rev-version>
				<changelog lang="en">
					<change>Moved the HTML for the confirm images to new template files.</change>
					<change>Added subsilver2 support.</change>
					<change>Adjusted the confirm code explain message to include a contact link.</change>
					<change>Tweaked the edit to prosilver's ucp_register.html to display only one explain message.</change>
					<change>Added version number in database.</change>
					<change>Added includes/captcha/photo.php to list of included files; it was accidentally left out.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-06-01</date>
				<rev-version>0.5.0</rev-version>
				<changelog lang="en">
					<change>Initial port of phpBB 2 version.</change>
				</changelog>
			</entry>
		</history>

		<link-group>
			<link type="template" href="contrib/subsilver2.xml" lang="en">subsilver2</link>
		</link-group>
	</header>
	
	<action-group>
		<copy>
			<file from="root/*.*" to="/" />
		</copy>
		
		<open src="adm/style/admin.css">
			<edit>
				<find><![CDATA[/*  phpBB 3.0 Admin Style Sheet
	------------------------------------------------------------------------
	Original author:	subBlue ( http://www.subblue.com/ )
	Copyright 2007 phpBB Group ( http://www.phpbb.com/ )
	------------------------------------------------------------------------
*/]]></find>
				<action type="after-add"><![CDATA[@import url("mods/photo_confirm.css");]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/theme/stylesheet.css">
			<edit>
				<find><![CDATA[@import url("colours.css");]]></find>
				<action type="after-add"><![CDATA[@import url("photo_confirm.css");]]></action>
			</edit>

		</open>

		<diy-instructions lang="en">Browse to your board's Administration Panel, the "CAPTCHA module settings"
link, and select "Photo Visual Confirmation" from the "Installed CAPTCHA
plugins" list.  You can change the default settings there. Clear your
browser cache to ensure the preview appears correctly.

Don't forget the replace the default photos as recommended in the Author's Notes.
</diy-instructions>
	</action-group>
</mod>