Seite 13 von 13

Verfasst: 22.01.2005 01:43
von scoteire
Hallo,
ich hoffe das ist der richtige Thread zum Quiz Mod, denn hier gibt es ja einige.
Mein Problem:

Es taucht eine Fehlermeldung auf wenn ich eine Quizfrage manuell stellen will:

Code: Alles auswählen

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '/ ADDED , topic_quiz AND , 1 BY Quiz Hack)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('', 2, 1106349067, 20, 0, 0, 0, 1// ADDED , topic_quiz AND , 1 BY Quiz Hack)

Line : 268
File : /www/htdocs/...../forum/includes/functions_post.php
Was ist da wieder falsch?
Die Zeile 261 - 269 sehen so aus:

Code: Alles auswählen

	if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
	{
		$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;

		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . "// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}
Wenn ich die Index Seite oder Threads im Forum öffne erscheint ab und zu auch diese Fehlermeldung. Sie verschwindet wenn ich den Brwoser aktualisiere.

Grundsätzlich warum tauchen die Quizfragen nicht im Forum auf obwohl ich diese Freigegeben habe?
Und wenn ich sie nochmal aktiviere dann kommt "Sie können diese Quizfrage(n) nicht freigeben, da sie bereits freigegeben sind."
Kann mir jemand helfen?

Wer kann mir helfen?

Verfasst: 22.01.2005 13:13
von saerdnaer
erstens: wenn du ein problem mit einem hack hast dann solltest du ein eigenes thema aufmachen und nicht in ein bereits existierendes posten.

zweitens: kommentare müssen immer nach dem stichpunkt eingefügt werden.

ein kommentar ist z.b.
// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack
ich weiß in der anleitung steht das ein bischen doof... aber das AFTER ADD ist kein INLINE, AFTER ADD und das heiß das es nicht nach dem INLINE, FIND sondern nach dem FIND eingefügt werden muss.

im klartext: es müsste am besten so aussehen:
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . ")" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack
mfg ah

Verfasst: 24.01.2005 21:08
von unionerdirk
Wo schiebe ich die install datei hin? Das steht in der readme nicht drin. Außerdem benutze ich subsilver gar nicht. Kann ich die tpl-Dateien einfach in mein Template schieben obwohl es kein subsilver ist?

Verfasst: 25.01.2005 13:21
von saerdnaer
ja, es könnte nur sein das dann nicht ganz so aussieht wie der rest.

ah

Verfasst: 25.01.2005 17:04
von unionerdirk
Habe es hinbekommen habe nur noch ein paar kleinere Fehler wie das nicht automatische Posting nach richtiger Beantwortung der Frage. Hoffe das ich das noch hinbekomme. Hast du einen Tipp.

Verfasst: 25.01.2005 17:20
von saerdnaer
wenn du das eine addon nicht installiert hast würde ich die änderungen an der posting.php und an der includes/functions_post.php überprüfen.

ah

Verfasst: 25.01.2005 17:52
von unionerdirk
Nein das addon habe ich nicht installiert. Werde mal schauen ob ich alle Änderungen richtig übernommen habe. Wenn doch dann melde ich mich wieder :D

Verfasst: 25.01.2005 17:54
von unionerdirk
Gerade habe ich auch noch gesehen das er mir die Frage nicht automatisch stellt. Woran liegt das. Er schaltet dann auch noch die Automatik aus. Die Frage stehen alle als "In der Warteschleife". Muss ich da was ändern?