Code: Alles auswählen
Fatal error: Call to a member function on a non-object in /home/www/web8/html/phpBB2/includes/functions_post.php on line 246
Code: Alles auswählen
Fatal error: Call to a member function on a non-object in /home/www/web8/html/phpBB2/includes/functions_post.php on line 246
Code: Alles auswählen
if ( $post_info['bbcode_uid'] != '' )
{
$message = preg_replace('/\:(([a-z0-9]:)?)' . $post_info['bbcode_uid'] . '/s', '', $message);
}
// add by makue 10.06.04 (Profillink für Usernamen im Posting)
$message = preg_replace("/<a class=\"gen\" href=\"profile\.php\?mode=viewprofile&u=.+\" target=\"_blank\">/","", $message);
$message = str_replace("</a >","", $message);
// end of add
$message = str_replace('<', '<', $message);
$message = str_replace('>', '>', $message);
$message = str_replace('<br />', "\n", $message);
if ( $mode == 'quote' )
{
$orig_word = array();
$replacement_word = array();
Code: Alles auswählen
else if ( count($poll_options) > $board_config['max_poll_options'] )
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['To_many_poll_options'] : $lang['To_many_poll_options'];
}
else if ( $poll_title == '' )
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_poll_title'] : $lang['Empty_poll_title'];
}
}
}
// add by makue 10.06.04 (Profillink für Usernamen im Posting)
if (!empty($message)) {
$words = split("[/.-\,\!? ]",$message);
foreach($words as $word) {
$word = trim($word);
if (strlen($word)>2) {
$sql = "SELECT user_id FROM ".USERS_TABLE." WHERE username = '".$word."' LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
message_die(GENERAL_ERROR, 'Cannot read userdata','',__LINE__,__FILE__,$sql);
if( $row = $db->sql_fetchrow($result) ) {
$message = ereg_replace($word,"<a class=\"gen\" href=\"profile.".$phpEx."?mode=viewprofile&u=".$row["user_id"]."\" target=\"_blank\">".$word."</a >",$message);
}
}
}
}
// end of add
return;
}
//
// Post a new topic/reply/poll or edit existing post/poll
//
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length, &$MsgIcon)
{
In Deinem Code ist es in Zeile 126, ausmakue hat geschrieben:Also, ich habe mal eben einen Code eingebaut. in der functions_post.php muss man in der Funktion prepare_post die Variable $db mit bei global... aufnehmen.
Code: Alles auswählen
global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path;
Code: Alles auswählen
global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path, $db;
Code: Alles auswählen
$message = ereg_replace($word,"<a class=\"gen\" href=\"profile.".$phpEx."?mode=viewprofile&u=".$row["user_id"]."\" target=\"_blank\">".$word."</a >",$message);
Code: Alles auswählen
$message = preg_replace("/<a class=\"gen\" href=\"profile\.php\?mode=viewprofile&u=.+\" target=\"_blank\">/","", $message);