Seite 1 von 1

update auf 2.0.21 - quelltext in usercp_confirm datei fehlt

Verfasst: 26.01.2007 15:37
von Der Wolf
Hallo,

ich habe ein kleines Problem. Ich wollte meine Forum auf den aktuellsten Stand bringen und fing mit dem Update 2.0.21 an. Anfangs klappte es auch alles wunderbar bis ich zu den datein
includes/usercp_confirm
und
includes/usercp_register kam. z.B. folgender Quelltext:

Code: Alles auswählen

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

#
#-----[ FIND ]---------------------------------------------
# Line 64
// If we can we will generate a single filtered png else we will have to simply
// output six seperate original pngs ... first way is preferable!
if (@extension_loaded('zlib'))
{
	$_png = define_filtered_pngs();

	$total_width = 320;
	$total_height = 50;
	$img_height = 40;
	$img_width = 0;
	$l = 0;

	list($usec, $sec) = explode(' ', microtime()); 
	mt_srand($sec * $usec); 

	$char_widths = array();
	for ($i = 0; $i < strlen($code); $i++)
	{
		$char = $code{$i};

		$width = mt_rand(0, 4);
		$char_widths[] = $width;
		$img_width += $_png[$char]['width'] - $width;
	}

	$offset_x = mt_rand(0, $total_width - $img_width);
	$offset_y = mt_rand(0, $total_height - $img_height);

	$image = '';
	$hold_chars = array();
	for ($i = 0; $i < $total_height; $i++)
	{
		$image .= chr(0);

		if ($i > $offset_y && $i < $offset_y + $img_height)
		{
			$j = 0;

			for ($k = 0; $k < $offset_x; $k++)
			{
				$image .= chr(mt_rand(140, 255));
			}

			for ($k = 0; $k < strlen($code); $k++)
			{
				$char = $code{$k};

				if (empty($hold_chars[$char]))
				{
					$hold_chars[$char] = explode("\n", chunk_split(base64_decode($_png[$char]['data']), $_png[$char]['width'] + 1, "\n"));
				}
				$image .= randomise(substr($hold_chars[$char][$l], 1), $char_widths[$j]);
				$j++;
			}

			for ($k = $offset_x + $img_width; $k < $total_width; $k++)
			{
				$image .= chr(mt_rand(140, 255));
			}

			$l++;
		}
		else
		{
			for ($k = 0; $k < $total_width; $k++)
			{
				$image .= chr(mt_rand(140, 255));
			}
		}

	}
	unset($hold);

	$image = create_png(gzcompress($image), $total_width, $total_height);

	// Output image
	header('Content-Type: image/png');
	header('Cache-control: no-cache, no-store');
	echo $image;

	unset($image);
	unset($_png);
	exit;

}
else
{
	$_png = define_raw_pngs();

	$c = intval($HTTP_GET_VARS['c']);
	$char = substr($code, $c - 1, 1);
	
	header('Content-Type: image/png');
	header('Cache-control: no-cache, no-store');
	echo base64_decode($_png[$char]);

	unset($_png);
	exit;
}

exit;
ist bei mir gar nicht vorhanden, genau wie die anderen Änderungen in den datein usercp_register und usercp_confirm nicht vorhanden sind. Entweder ich stehe gerade auf dem Schlauch oder ich hab ein Problem. Mir fällt auch gerade kein Mod ein, wo ich das rausgeschmissen haben könnte.

Meine beiden Dateien sehen wie folgt aus:
usercp_confirm.txt

usercp_register.txt

Ich würd mich freuen, wenn mir jemand helfen könnte.

Verfasst: 26.01.2007 16:04
von Balint
Hallo!

Zumindest beim usercp_confirm kann ich weiterhelfen. Du hast wohl den "Advanced Visual Confirmation" von AmigaLink installiert, die betreffenden Änderungen an der Datei betreffen dich also nicht. Bei der usercp_register müßte ich die vorzunehmenden Änderungen sehen, vlt. hat das doch ein MOD verändert oder du hast etwas beim letzten Mal ausgelassen...


Viele Grüße,
Bálint

Verfasst: 26.01.2007 16:11
von Der Wolf
Hallo Balint,

vielen Dank für deine schnelle Hilfe.
Ja ich habe den "Advanced Visual Confirmation" von AmigaLink eingebaut.

Die Änderungen für die usercp_regsiter soll so aussehen:

Code: Alles auswählen

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

#
#-----[ FIND ]---------------------------------------------
# Line 989
		$code = strtoupper(str_replace('0', 'o', substr($code, 6)));

#
#-----[ REPLACE WITH ]---------------------------------------------
#
		$code = substr(str_replace('0', 'Z', strtoupper(base_convert($code, 16, 35))), 2, 6);

#
#-----[ FIND ]---------------------------------------------
# Line 1002
		$confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=1") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=2") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=3") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=4") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=5") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=6") . '" alt="" title="" />';

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

# 
#-----[ OPEN ]---------------------------------------------
Dankeschön

Verfasst: 26.01.2007 16:15
von Balint
Hallo!

Beides sind Teile, die von dem MOD von amigaLink verändert wurden, deshalb findest du es nicht. Keine Bange, das ist OK so.


Viele Grüße,
Bálint

Verfasst: 26.01.2007 16:18
von Der Wolf
Hi,

du bist klasse :D
Dann kann ich ja meine geänderten Datein in Ruhe hochladen und mit dem Update fortfahren.

Danke nochmal.