Quote-Problem nach Update auf 2.0.19
Verfasst: 08.08.2006 00:48
Ich bin gerade dabei, mein altes 2.0.16-Board mit vielen Hacks auf den aktuellen Stand zu bringen. Ich weiß, dass das eigentlich viel zu spät ist, aber was solls.
Jedenfalls gibt es das folgende Problem: Nach dem Patchen der includes/bbcode.php funktioniert das Quoten mit Angabe eines Benutzernamens nicht mehr. Heißt also, sowas hier
Ich bin auch schon dahintergekommen, dass das Problem beim Posten liegt. Also normalerweise speichert der ja beim Quoten irgendwas mit [quote:abcdef="bla"] usw. in die Datenbank, aber mit der neuen bbcode.php speichert das Forum halt den nackten BBCode ohne Doppelpunkt und Zeichenfolge rein. Keine Ahnung, ob es daran nun wirklich liegt, aber das ist mir dabei aufgefallen.
Die alte bbcode.php (mit der es im Moment funktioniert) findet ihr hier --> http://sentaforum.davlam.de/bbcode-2018.txt
Und die von mir gepatchte: http://sentaforum.davlam.de/bbcode-2019.txt
Und hier noch der entsprechende Auszug aus der Update-Anleitung:
Ich hoffe, ihr könnt mir da helfen. Ich weiß es nämlich echt nicht. 
Danke im Voraus jedenfalls!
derDavid.
Jedenfalls gibt es das folgende Problem: Nach dem Patchen der includes/bbcode.php funktioniert das Quoten mit Angabe eines Benutzernamens nicht mehr. Heißt also, sowas hier
wird nicht als Zitat gezeigt, sondern nackter BBCode, in der Praxis sieht das so aus: http://sentaforum.davlam.de/viewtopic.p ... 354#294354Benutzer hat geschrieben:bla
Ich bin auch schon dahintergekommen, dass das Problem beim Posten liegt. Also normalerweise speichert der ja beim Quoten irgendwas mit [quote:abcdef="bla"] usw. in die Datenbank, aber mit der neuen bbcode.php speichert das Forum halt den nackten BBCode ohne Doppelpunkt und Zeichenfolge rein. Keine Ahnung, ob es daran nun wirklich liegt, aber das ist mir dabei aufgefallen.
Die alte bbcode.php (mit der es im Moment funktioniert) findet ihr hier --> http://sentaforum.davlam.de/bbcode-2018.txt
Und die von mir gepatchte: http://sentaforum.davlam.de/bbcode-2019.txt
Und hier noch der entsprechende Auszug aus der Update-Anleitung:
Code: Alles auswählen
#
#-----[ 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);

Danke im Voraus jedenfalls!

derDavid.