1 頁 (共 1 頁)

[BETA] FreeCap Visual Confirmation 0.0.3

發表於 : 2006-09-09 , 13:23
yehrussell
http://www.phpbb.com/phpBB/viewtopic.php?t=344831

代碼: 選擇全部

##############################################################
## MOD Title: FreeCap Visual Confirmation
## MOD Author: A_Jelly_Doughnut <support> (n/a) N/A
## MOD Description: Replaces the visual confirmation with a GD-based one
##		New CAPTCHA is based on freeCap 1.4.  See www.puremango.co.uk for that.
## MOD Version: 0.0.3
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: usercp_confirm.php, usercp_register.php
##
## Included Files: functions_freecap.php, .ht_freecap_font1.gdf, .ht_freecap_font2.gdf, .ht_freecap_font3.gdf,
##	.ht_freecap_font4.gdf, .ht_freecap_font5.gdf, .ht_freecap_im1.jpg, .ht_freecap_im2.jpg, .ht_freecap_im3.jpg,
##  .ht_freecap_img.jpg, .ht_freecap_im5.jpg
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## 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/
##############################################################
## Author Notes:
##	This has been ported to and fro so many times...
##	Ported from Standalone to OCbb 0.9.5 by A_Jelly_Doughnut
##	Ported from OCbb 0.9.5 to phpBB2 by A_Jelly_Doughnut
##
##  Note the included fonts only work on little-endian processors like x86
##  You'll need to generate your own fonts for UltraSparc and similar architectures.
##
##############################################################
## MOD History:
##   2006-06-11 - Version 0.0.3
##		- Updated for 2.0.21
##		- Stupid bugs
##	 2005-11-28 - Version 0.0.2
##		- Oops, that method of generating and confirming a code didn't work if a # showed up
##		- Renamed from Enhanced Visual Confirmation
##   2005-11-27 - Version 0.0.1
##      - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#----[ COPY ]---------------------
#
# Note that you can replace any of these fonts or images with your own should you desire.
# Just keep the names the same.
freecap/.ht_freecap_font1.gdf to includes/freecap/.ht_freecap_font1.gdf
freecap/.ht_freecap_font2.gdf to includes/freecap/.ht_freecap_font2.gdf
freecap/.ht_freecap_font3.gdf to includes/freecap/.ht_freecap_font3.gdf
freecap/.ht_freecap_font4.gdf to includes/freecap/.ht_freecap_font4.gdf
freecap/.ht_freecap_font5.gdf to includes/freecap/.ht_freecap_font5.gdf
freecap/.ht_freecap_im1.gdf to includes/freecap/.ht_freecap_im1.gdf
freecap/.ht_freecap_im2.gdf to includes/freecap/.ht_freecap_im2.gdf
freecap/.ht_freecap_im3.gdf to includes/freecap/.ht_freecap_im3.gdf
freecap/.ht_freecap_im4.gdf to includes/freecap/.ht_freecap_im4.gdf
freecap/.ht_freecap_im5.gdf to includes/freecap/.ht_freecap_im5.gdf
functions_freecap.php to includes/functions_freecap.php

#
#----[ OPEN ]---------------------
#
includes/usercp_confirm.php

#
#----[ FIND ]---------------------
#
else
{
	exit;
}

#
#----[ AFTER, ADD ]---------------
#

if ((@extension_loaded('gd') || @extension_loaded('gd2')) && @extension_loaded('zlib'))
{
	require($root_path . "includes/functions_freecap.$phpEx");

	// output final image :-)
	sendImage($im);
	// (sendImage also destroys all used images)
}

#
#----[ OPEN ]---------------------
#
includes/usercp_register.php

#
#----[ FIND ]---------------------
#
				if ($row['code'] != $confirm_code)
#
#----[ REPLACE WITH ]-------------
#

				if (@extension_loaded('gd') || @extension_loaded('gd2'))
				{
					$logic = 'return strtolower($row['code']) != strtolower($confirm_code);';
				}
				else
				{
					$logic = 'return $row['code'] != $confirm_code;';
				}

				if (eval($logic))

#
#----[ FIND ]---------------------
#
			$code .= $confirm_chars[mt_rand(0, $max_chars)];
		}

#
#----[ AFTER, ADD ]---------------
#
		$code = strtolower(preg_replace('#(d)#e', 'chr($1 + 96)', $code));

#
#----[ FIND ]---------------------
#
		$confirm_image = '<img src="' . append_sid(" alt="" title="">';

#
#----[ REPLACE WITH ]-------------
#
		$confirm_image = (@extension_loaded('gd') || @extension_loaded('gd2')) ? "<img src="" . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid(" alt="" title="">';

#
#----[ SAVE/CLOSE ALL FILES ]-----
#
# EoM

圖檔

圖檔



今天已經裝好

Re: [BETA] FreeCap Visual Confirmation 0.0.3

發表於 : 2006-09-14 , 11:02
懸壺子
圖片難度太高,刪掉