Seite 1 von 3

Fehler bei Update auf 2.0.19 in bbcode.php

Verfasst: 01.01.2006 15:09
von Pseiko
Ich erhalte beim Update von 2.0.18 auf 2.0.19 folgende Fehlermeldung:

Code: Alles auswählen

Parse error: parse error, unexpected $ in /home/www/web17/html/a1gp/includes/bbcode.php on line 836
Bloß dort ist nur das Ende der Datei.

Codezeilen von 826 bis 836

Code: Alles auswählen

function smiley_sort($a, $b)
{
	if ( strlen($a['code']) == strlen($b['code']) )
	{
		return 0;
	}

	return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
}

?>

Verfasst: 01.01.2006 15:53
von Saint
Sonst verlink doch mal die bbcode.php als Textdatei.

Gruß

Saint

Verfasst: 01.01.2006 15:56
von Pseiko

Verfasst: 01.01.2006 16:06
von Saint
sind einige Macken drin:

suche:

Code: Alles auswählen

$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");
ersetze durch:

Code: Alles auswählen

$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");
suche:

Code: Alles auswählen

//
				// We're going to try and catch usernames with "[' characters.
				//
				if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
				{
					// OK we are in a quote tag that probably contains a ] bracket.
					// Grab a bit more of the string to hopefully get all of it..
					if ($close_pos = strpos($text, '"]', $curr_pos + 9))
					{
					if ($close_pos = strpos($text, '"]', $curr_pos + 14))
ersetze durch:

Code: Alles auswählen

//
				// We're going to try and catch usernames with "[' characters.
				//
				if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
				{
					// OK we are in a quote tag that probably contains a ] bracket.
					// Grab a bit more of the string to hopefully get all of it..
					if ($close_pos = strpos($text, '"]', $curr_pos + 14))
suche:

Code: Alles auswählen

$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
ersetze durch:

Code: Alles auswählen

$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
suche:

Code: Alles auswählen

// Replace 2 spaces with "  " so non-tabbed code indents without making huge long lines.
		$after_replace = str_replace("  ", "  ", $after_replace);
		// now Replace 2 spaces with "  " to catch odd #s of spaces.
		$after_replace = str_replace("  ", "  ", $after_replace);

		// Replace tabs with "   " so tabbed code indents sorta right without making huge long lines.
		$after_replace = str_replace("\t", "   ", $after_replace);

		// now Replace space occurring at the beginning of a line
		$after_replace = preg_replace("/^ {1}/m", ' ', $after_replace);
ersetze durch:

Code: Alles auswählen

// Replace 2 spaces with "&nbsp; " so non-tabbed code indents without making huge long lines.
		$after_replace = str_replace("  ", "&nbsp; ", $after_replace);
		// now Replace 2 spaces with " &nbsp;" to catch odd #s of spaces.
		$after_replace = str_replace("  ", " &nbsp;", $after_replace);

		// Replace tabs with "&nbsp; &nbsp;" so tabbed code indents sorta right without making huge long lines.
		$after_replace = str_replace("\t", "&nbsp; &nbsp;", $after_replace);

		// now Replace space occurring at the beginning of a line
		$after_replace = preg_replace("/^ {1}/m", '&nbsp;', $after_replace);
suche:

Code: Alles auswählen

$input = preg_replace("/>/i", ">", $input);
	$input = preg_replace("/</i", "<", $input);
	$input = preg_replace("/\"/i", "\"", $input);
	$input = preg_replace("/&/i", "&", $input);
ersetze durch:

Code: Alles auswählen

$input = preg_replace("/>/i", ">", $input);
	$input = preg_replace("/</i", "<", $input);
	$input = preg_replace("/"/i", "\"", $input);
	$input = preg_replace("/&/i", "&", $input);
Gruß

Saint

Verfasst: 01.01.2006 17:35
von Pseiko
okay geht erst mal wieder.
danke

Aber diese Stelle habe ich nicht gefunden:

Code: Alles auswählen

suche:
Code:
$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');


ersetze durch:
Code:
$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');

Verfasst: 01.01.2006 18:11
von Saint
oha - der Code wird nicht korrekt in den BBcode Tags in diesem Forum angezeigt. Da werden Teile rausgelöscht, ich kann Dir das hier nicht posten. Interessant. :-?

Also in eine Textdatei, kannst Du hier runterladen:
http://www.ostpocken.breest.net/board/d ... php?id=398

Gruß

Saint

Verfasst: 03.01.2006 13:36
von kazwo
Hi,

Ich nutze den Thread mal, da er von der Thematik passt.
Ich bin mir nicht sicher, ob es was mit dem Update auf 2.0.19 zu tun hat, allerdings ist es erst jetzt aufgefallen.
Und zwar kann man im Postingbereich nicht mehr auf die BBCode-Buttons drücken, so dass im Textfeld z.B. das kommt.
Leider weiß ich nicht, seit wann es den Fehler gibt, da ich das Forum erst vor einer Woche übernommen hab und seitdem hab ich eigentlich auch nichts eingebaut, was eine der Dateien betreffen könnte...abgesehen von dem Update auf 2.0.19.
Laut Aussage meiner Vorgängerin ging diese Funktion vorher noch..und es wurde auch nur der Center-Code zusätzlich eingebaut.
Ich bin alles nochmal durchgegangen..und ich schein zu blind zu sein, um den Fehler zu finden.
Hat jemand ähnliche Probleme gehabt und mir eine Lösung sagen? denn geschrieben funktionieren die BBCodes noch einwandfrei. Nur der Klick auf die Buttons möchte nicht funktionieren :(

lG

k2

Verfasst: 03.01.2006 18:43
von Pseiko
Also bei mir geht das noch.

Verfasst: 03.01.2006 18:49
von Saint
Verlink mal deine bbcode.php und deine posting_body.tpl als Textdatei.

Gruß

Saint

Verfasst: 03.01.2006 20:25
von kazwo
Mir ist aufgefallen, dass ich auch den Basic AJAX Features drin hab..ich weiß aber nicht, ob der damit was zu tun hat..

http://kazwo.ka.funpic.de/bbcode.txt

http://kazwo.ka.funpic.de/posting_body1.txt

http://kazwo.ka.funpic.de/posting_body2.txt

Danke :)