Seite 26 von 111

Verfasst: 26.12.2002 18:31
von Oede
achso, nee das Fenster bleibt auch nur weiß

Verfasst: 26.12.2002 18:36
von Markocat
@saerdnaer
ich will ja nicht nerven
aber hast du vielleicht BITTE für mein Problem schon eine Lösung

Verfasst: 26.12.2002 18:44
von saerdnaer
ach ja du bist ja auch noch da... suche in der includes/quiz.php nach folgendem

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), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
und ersetz es durch

Code: Alles auswählen

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, 0, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length,0); 
die einzigen änderungen sind die 2 nullen, da andere hack der funktion noch parameter hinzugefügt haben...

ah

Verfasst: 26.12.2002 19:06
von Markocat
ja hab ich jetzt so gemacht in der includes\Quiz.php

aber es kommt leider immer noch der Fehler

Code: Alles auswählen

Parse error: parse error, unexpected '=', expecting ')' in d:\apache group\www\phpBB2\includes\functions_post.php on line 491

Fatal error: Call to undefined function: submit_post() in d:\apache group\www\phpBB2\includes\quiz.php on line 351

Verfasst: 26.12.2002 22:08
von Markocat
@saerdnaer
ich hab das mal in der includes\Quiz.php so umbenannt

Code: Alles auswählen

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $topic_auto_disapprove, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $MsgIcon);
müsste doch eigendlich auch gehn
weil ich mit dem = 0 in der functions_post.php ja immer den selben Fehler bekomme
hab ich das auch wieder so umbenannt

Code: Alles auswählen

$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_auto_disapprove, topic_vote $quiz_sql1, topic_icon) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_auto_disapprove, $topic_vote $quiz_sql2, '$MsgIcon')" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_auto_disapprove = $topic_auto_disapprove, topic_vote = $topic_vote, topic_icon = $MsgIcon WHERE topic_id = $topic_id";
jetzt bekomm ich aber an ner anderen stelle in der functions_post.php
einen Fehler

Code: Alles auswählen

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ' 0 , 1, '')' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_auto_disapprove, topic_vote , topic_quiz, topic_icon) VALUES ('Quiz Frage #3 ...', 2, 1040936134, 1, 0, 0, , 0 , 1, '')

Line : 560
File : d:\apache group\www\phpBB2\includes\functions_post.php
beteutet das, dass der eine jetzt weg ist
und das ein neuer der behoben werden muss

das ist der abschnitt wo der Fehler ist

Code: Alles auswählen

	if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
	{
		$topic_vote = ( !empty($poll_title) && count($poll_options) >= 2 ) ? 1 : 0;
		// BEGINN Quiz Hack
		$quiz_sql1 = !empty($post_data['topic_quiz']) ? ', topic_quiz' : '';
		$quiz_sql2 = !empty($post_data['topic_quiz']) ? ', 1' : '';
		// END Quiz Hack
		$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_auto_disapprove, topic_vote $quiz_sql1, topic_icon) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_auto_disapprove, $topic_vote $quiz_sql2, '$MsgIcon')" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_auto_disapprove = $topic_auto_disapprove, topic_vote = $topic_vote, topic_icon = $MsgIcon 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();
		}
	}

	$user_id = $userdata['user_id'];
// I-MOD-start
	// a person is making a reply; see if the thread creator wants
	//   the reply to be approved or disapproved by default
	$auto_disapprove = 0 ;

Verfasst: 27.12.2002 11:07
von saerdnaer
deswegen wollte ich das ja mir der 0... damit dieser fehler nicht kommt...

also nochmal in der includes/quiz.php soll die zeile so aussehen:

Code: Alles auswählen

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, 0, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length,0); 
und in der includes/funtions_post.php soll die zeile so aussehen:

Code: Alles auswählen

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$topic_auto_disapprove, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length, &$MsgIcon)
ah

Verfasst: 27.12.2002 12:30
von Markocat
ja hab ich mal so gemacht
aber danach bekomm ich den Fehler

Code: Alles auswählen

Fatal error: Cannot pass parameter 10 by reference in d:\apache group\www\phpBB2\includes\quiz.php on line 351

Verfasst: 27.12.2002 21:37
von saerdnaer
axo... dann ersetz die zeile in der quiz.php durch

Code: Alles auswählen

$MsgIcon = 0;
$topic_auto_disapprove = 0;
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $topic_auto_disapprove, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $MsgIcon);

Verfasst: 27.12.2002 21:45
von Oede
Vergiss mich nicht*lol*

Verfasst: 27.12.2002 22:13
von Markocat
saerdnaer hat geschrieben:axo... dann ersetz die zeile in der quiz.php durch

Code: Alles auswählen

$MsgIcon = 0;
$topic_auto_disapprove = 0;
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $topic_auto_disapprove, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $MsgIcon);
Ja super
es klappt und kam auch keine Fehlermeldung mehr
nochmals vielen Dank :)