Seite 2 von 2

Verfasst: 13.04.2004 14:49
von Holger
Hallo,

ich bekomme im ACP
Warning: Missing argument 21 for submit_post() in /customers/gremminger.se/gremminger.se/httpd.www/service/forum/includes/functions_post.php on line 224
wenn ich eine Frage manuell freischalte.

Habe nicht den Message Icon Hack installiert, nur den Category Mod.

Woran kann das liegen?

includes/quiz.php:

Code: Alles auswählen

		submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("'", "''", $username), str_replace("'", "''", $subject), str_replace("'", "''", $message), $poll_title, $poll_options, $poll_length);
includes/functions_post.php:

Code: Alles auswählen

		$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack
		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz,k_id) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . ", '". $k_id ."' )" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", k_id=$k_id WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}

		if ($mode == 'newtopic')
		{
			$topic_id = $db->sql_nextid();
		}
	}

	$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
	$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
	if (!$db->sql_query($sql, BEGIN_TRANSACTION))
	{
		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
	}

	if ($mode != 'editpost')
	{
		$post_id = $db->sql_nextid();
	}
// ADDED , quiz_answer AND , '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "' BY Quiz Hack
	$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
	if (!$db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
	}

	add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
Gruss
Holger

Verfasst: 13.04.2004 14:54
von Angela Goldig
dann nimm mal das $msgicon aus sardeners änderung raus. (also beides)

Verfasst: 13.04.2004 15:05
von Holger
Habe "$k_id = 0;" eingefügt und ", $k_id", klappt gut, danke!

Wenn ich jetzt testweise eine Frage stelle, und sie richtig beantworte, dann bekomme ich die Zwischenmeldung "die Frage wurde falsch beantwortet" danach erscheint ein Post in dem steht, dass ich die Frage RICHTIG beantwortet habe.
Was ist das nun? :oops:

/Holger

Verfasst: 16.05.2004 18:54
von AmigaLink
Ich hatte vergleichbare fehler!
hab in der includes/quiz.php das gemacht:

Code: Alles auswählen

$topic_calendar_time = 0;
$topic_calendar_duration = 0;
$topic_calendar_repeat = 0;
		prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length, $topic_calendar_time, $topic_calendar_duration, $topic_calendar_repeat);
		if ( $error_msg != '' )
		{
			$this->notify_admin('Quiz Bot error while make_post():<br/>' . $error_msg);
			return false;
		}
		submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("'", "''", $username), str_replace("'", "''", $subject), str_replace("'", "''", $message), $poll_title, $poll_options, $poll_length, $topic_calendar_time, $topic_calendar_duration, $topic_calendar_repeat);
		if ( $error_msg != '' )
		{
			$this->notify_admin('Quiz Bot error while make_post():<br/>' . $error_msg);
			return false;
		}
		if ( $mode != 'editpost' )
		{
			update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $userdata['user_id']);
		}
		if ( isset($userdata2) )
		{
			$userdata = $userdata2;
			unset($userdata2);
		}
		return true;
Und sie sind weg!

ABER in der Quizfrage wird der bbcode [quiz] nicht gegen eine Frage ersetzt!!! :cry: (auch vor meiner änderung nicht!)
Alte Fragen dagegen, die vor den neumodden meines Boards (umstellung von 2.0.4 auf komplett neugemoddetes 2.0.8a mit cat.hierarchie und diversen anderen mods) gepostet wurden, werden korrekt angezeigt! :o

// EDIT
Das beantworten der älteren Fragen geht und wird auch korrekt ausgewertet! Allerdings kommt bei dem Beantworten wieder kurz die Fehlermeldung
Warning: Missing argument 16 for prepare_post() in e:\wamp\homepages\neues_board\includes\functions_post.php on line 138

Warning: Missing argument 23 for submit_post() in e:\wamp\homepages\neues_board\includes\functions_post.php on line 251
(Nur wenn auf eine Quizfrage geantwortet wird. Nicht beim normalem Posten. Auch nicht wenn das normale Posten in einem Quiz-Thread ist!)

Verfasst: 16.05.2004 19:33
von saerdnaer
dann hast du wohl noch ein paar variablern der funktionen vergessen

Verfasst: 16.05.2004 20:22
von AmigaLink
Bin ich denn auf dem richtigem weg?
Und kannst du mir mal auf die Sprünge helfen?

Code: Alles auswählen

function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length, $topic_calendar_time = 0, $topic_calendar_duration = 0, $topic_calendar_repeat)

Code: Alles auswählen

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, $topic_calendar_time = 0, $topic_calendar_duration = 0, $topic_calendar_repeat )
(jeweils aus der funktions_post.php)