Quiz Hack

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
Oede
Mitglied
Beiträge: 256
Registriert: 27.10.2002 17:47
Wohnort: Germany
Kontaktdaten:

Beitrag von Oede »

achso, nee das Fenster bleibt auch nur weiß
Wie gut, das es Frauen und Männer gibt!
Markocat
Mitglied
Beiträge: 245
Registriert: 16.05.2002 18:57
Wohnort: Bad Dürrenberg
Kontaktdaten:

Beitrag von Markocat »

@saerdnaer
ich will ja nicht nerven
aber hast du vielleicht BITTE für mein Problem schon eine Lösung
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag 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
Markocat
Mitglied
Beiträge: 245
Registriert: 16.05.2002 18:57
Wohnort: Bad Dürrenberg
Kontaktdaten:

Beitrag 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
Markocat
Mitglied
Beiträge: 245
Registriert: 16.05.2002 18:57
Wohnort: Bad Dürrenberg
Kontaktdaten:

Beitrag 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 ;
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag 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
Markocat
Mitglied
Beiträge: 245
Registriert: 16.05.2002 18:57
Wohnort: Bad Dürrenberg
Kontaktdaten:

Beitrag 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
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag 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);
Benutzeravatar
Oede
Mitglied
Beiträge: 256
Registriert: 27.10.2002 17:47
Wohnort: Germany
Kontaktdaten:

Beitrag von Oede »

Vergiss mich nicht*lol*
Wie gut, das es Frauen und Männer gibt!
Markocat
Mitglied
Beiträge: 245
Registriert: 16.05.2002 18:57
Wohnort: Bad Dürrenberg
Kontaktdaten:

Beitrag 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 :)
Gesperrt

Zurück zu „phpBB 2.0: Mod Support“