Seite 2 von 4
Verfasst: 07.04.2006 22:28
von Diesel
Selbes Problem, muss mich dazugesellen:
Code: Alles auswählen
Warning: preg_replace(): Empty regular expression in /var/www/web4/html/forum/privmsg.php on line 3038
Warning: Cannot modify header information - headers already sent by (output started at /var/www/web4/html/forum/privmsg.php:3038) in /var/www/web4/html/forum/includes/page_header.php on line 541
Warning: Cannot modify header information - headers already sent by (output started at /var/www/web4/html/forum/privmsg.php:3038) in /var/www/web4/html/forum/includes/page_header.php on line 547
Verfasst: 07.04.2006 22:31
von Kortirion
Ich hab jetzt auch mal die original 2.0.20er genommen...die funktioniert anstandslos.
Imho kann der Fehler nicht an dem bei mir verbauten Font Face BBCode liegen...vor allem nicht, wenn Ihr anderen icht auch diesen Mod verwendet.
Nachtrag: Mod neu eingebaut, kein Fehler. Der ist also schon mal nicht die Fehlerquelle.
Fehler in den Codechanges?
Verfasst: 07.04.2006 22:42
von miccom
Verfasst: 07.04.2006 22:52
von Scotty
Hab’s
Da fehlt was in der Anleitung bei der privmsg.php:
Suche:
Code: Alles auswählen
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
Ersetze mit:
Code: Alles auswählen
$orig_word = $replacement_word = array();
obtain_word_list($orig_word, $replace_word);
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
Ich hab jetzt einfach mal das ofensichtliche kopiert, wahrscheinlich muss weniger ersetzt werden, aber ich bin nun schon arg müde

.
Verfasst: 07.04.2006 22:59
von miccom
jup, habs auch gerade gefunden.
das problem mit quote="username" konnte ich aber nicht lösen, den codechanges in der function_posts.php scheinen alle zu stimmen.
Verfasst: 07.04.2006 23:05
von Kortirion
Scotty: Großartig! Vielen Dank. ich hab mich hier schon so dumm und dämlich gesucht, dass ich schon zwei Alster beim basteln trinken musste

Verfasst: 07.04.2006 23:21
von BZebra
Scotty hat geschrieben:Hab’s
Da fehlt was in der Anleitung bei der privmsg.php:
Suche:
Code: Alles auswählen
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
Ersetze mit:
Code: Alles auswählen
$orig_word = $replacement_word = array();
obtain_word_list($orig_word, $replace_word);
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
Ich hab jetzt einfach mal das ofensichtliche kopiert, wahrscheinlich muss weniger ersetzt werden, aber ich bin nun schon arg müde

.
Das ändert leider bei mir nichts. Also, lade ich mal die 4. Datei zum anschauen hoch:
http://www.skoliose-info-forum.de/datei/privmsg.php.txt
Es so was zum kotzen. Nichts als Fehlermeldungen. Konfig-Menü geht auch nicht mehr und von Sourceforge gibts zur Zeit noch nicht mal die aktuelle Version zum downloaden.

Verfasst: 07.04.2006 23:44
von Kortirion
BZebra:
Code: Alles auswählen
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
$orig_word = $replacement_word = array();
obtain_word_list($orig_word, $replace_word);
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
Das erste
Code: Alles auswählen
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
ist doppelt und muss raus.
Hier mal die funktionierende Codeumgebung...(etwas großzügiger)
Code: Alles auswählen
else if ( $mode == 'reply' || $mode == 'quote' )
{
$sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_from_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain private message for editing', '', __LINE__, __FILE__, $sql);
}
if ( !($privmsg = $db->sql_fetchrow($result)) )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
$orig_word = $replacement_word = array();
obtain_word_list($orig_word, $replace_word);
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
if ( $mode == 'quote' )
{
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
$privmsg_message = preg_replace($orig_word, $replacement_word, $privmsg_message);
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']);
$privmsg_message = '[quote="' . $to_username . '"]' . $privmsg_message . '[/quote]';
$mode = 'reply';
}
}
Verfasst: 07.04.2006 23:46
von miccom
mittels diesem workaround hat sich das quote problem gelöst:
http://www.phpbb.com/phpBB/viewtopic.ph ... 73#2078473
Verfasst: 08.04.2006 00:48
von Underhill
btw:
mit dem "ListUsers MOD" hatte ich gerade auch Probleme - Kann aber auch schon ein einem aelteren Update rausgefolgen sein

...
Egal - Habe auch schon eine Loesung:
Problem -> Bei klick auf "Benutzernamen auflisten" geht zwar das PopUp auf, aber drin steht eine SQL-Fehlermeldung...
Loesung:
in list_usernames.php:
Code: Alles auswählen
$db_table = $table_prefix . 'users';
$sql = "
SELECT username
FROM $db->dbname.$db_table
WHERE user_active = '1'
ORDER BY username
ASC
";
gegen
Code: Alles auswählen
$db_table = $table_prefix . 'users';
$sql = "
SELECT username
FROM $db_table
WHERE user_active = '1'
ORDER BY username
ASC
";
tauschen - dann klappte er bei mir wieder...
Gruss
Underhill