Seite 1 von 1

[Erledigt] BBCode Problem seit Update auf 2.0.19

Verfasst: 18.01.2006 00:27
von maxl
Hallo!

Habe seit dem Update von 2.0.18 auf 2.0.19 das Problem, daß der BBCode beim zitieren nicht mehr funzt. Und zwar wird das Zitat nicht korrekt angezeigt, sondern mit den Klammern vom BBCode. Also im Klartext z.B.:

Code: Alles auswählen

[quote="nickname"]Bla, Bla, Bla[/quote]
Wenn man aber nur zitiert (ohne Name) funktioniert es. (oder wenn ich das ="nickname" entferne) Da aber die alten Postings mit Zitaten nach wie vor korrekt angezeigt werden, habe ich mich nun mal in der Datenbank umgesehen und in der Tabelle phpbb_posts_text folgendes entdeckt:

Bei älteren Postings (wo das Zitieren noch funktioniert hat) steht in der Datenbank z.B.:

Code: Alles auswählen

[quote:b2bcd00a16="Nick1"]Ich habe...bla.bla,bla[/quote:b2bcd00a16]
und bei Beiträgen wo es nicht funktioniert steht z.B.:

Code: Alles auswählen

[quote="Nick3"]Hallo Nick2....bla,bla,bla[/quote]
Es fehlt also diese Zahlenkombination wie z.B. "b2bcd00a16" nach dem quote!

Könnte das der Fehler sein und wenn ja, was muß ich tun?

Bitte um Hilfe - vielen Dank schon mal!

maxl

Verfasst: 18.01.2006 01:53
von IPB_Flüchtling
Hallo Maxl,

hatte ein sehr ähnliches Problem mit dem Moderator-Tags-Mod: http://www.phpbb.de/viewtopic.php?t=107242

Du hast bestimmt die Änderung in der functions_post.php und/oder in der bbcode.php nicht richtig durchgeführt - bitte überprüfe das einmal.

Code: Alles auswählen

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

# 
#-----[ FIND ]--------------------------------------------- 
# Line 28 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'); 
$html_entities_replace = array('&', '<', '>'); 

# 
#-----[ REPLACE WITH ]--------------------------------------------- 
# 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); 
$html_entities_replace = array('&', '<', '>', '"'); 

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

#
#-----[ FIND ]---------------------------------------------
# Line 203
	$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url1'];

	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";

#
#-----[ REPLACE WITH ]---------------------------------------------
#
	$patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url1'];

	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";

#
#-----[ FIND ]---------------------------------------------
# Line 255
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");

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

#
#-----[ FIND ]---------------------------------------------
# Line 392
				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 (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
						{
							$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);

#
#-----[ REPLACE WITH ]---------------------------------------------
#
				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))
					{
						if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
						{
							$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);
LG, IPB_Flüchtling

Verfasst: 18.01.2006 09:30
von maxl
Hallo IPB_Flüchtling!

Vielen Dank für deine Hilfe! Ich habe tatsächlich in der includes/functions_post.php einen Fehler gehabt und weiß jetzt auch warum. Habe nach dem Update den Cracker-Tracker eingebaut und da versehentlich die alte includes/functions_post.php erwischt!

Jetzt funzt es wieder! :grin:

Danke nochmal und l.g.

maxl