Quiz Mod (functions_post.php)

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
Andy120
Mitglied
Beiträge: 3430
Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:

Quiz Mod (functions_post.php)

Beitrag von Andy120 »

Wie muss ich das beheben?

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 , 0 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 ('Test', 2, 1090452078, 48, 0, 0, 0, 0// ADDED , topic_quiz AND , 0 BY Quiz Hack)

Line : 264
File : /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php
Benutzeravatar
Fabse
Mitglied
Beiträge: 1401
Registriert: 02.06.2003 15:10
Wohnort: Klagenfurt
Kontaktdaten:

Beitrag von Fabse »

Ersetze

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('Test', 2, 1090452078, 48, 0, 0, 0, 0// ADDED , topic_quiz AND , 0 BY Quiz Hack)
mit

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('Test', 2, 1090452078, 48, 0, 0, 0, 0)
Benutzeravatar
Andy120
Mitglied
Beiträge: 3430
Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:

Beitrag von Andy120 »

Bei mir siehts aber so aus....

Code: Alles auswählen

"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);
Benutzeravatar
Fabse
Mitglied
Beiträge: 1401
Registriert: 02.06.2003 15:10
Wohnort: Klagenfurt
Kontaktdaten:

Beitrag von Fabse »

Code: Alles auswählen

"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"; 
      if (!$db->sql_query($sql)) 
      { 
         message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
Nochmals editiert!
Benutzeravatar
Fabse
Mitglied
Beiträge: 1401
Registriert: 02.06.2003 15:10
Wohnort: Klagenfurt
Kontaktdaten:

Beitrag von Fabse »

Auch mit dem Editiertem?

Wenn ja poste mal ein bisschen mehr! +- 5 Zeilen
Benutzeravatar
Andy120
Mitglied
Beiträge: 3430
Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:

Beitrag von Andy120 »

Also :D Hier....

Code: Alles auswählen

		remove_search_post($post_id);
	}

	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' ) . ", 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);
		}

		if ($mode == 'newtopic')
		{
			$topic_id = $db->sql_nextid();
		}
	}
Benutzeravatar
Fabse
Mitglied
Beiträge: 1401
Registriert: 02.06.2003 15:10
Wohnort: Klagenfurt
Kontaktdaten:

Beitrag von Fabse »

Der nächste Versuch:

Code: Alles auswählen

"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"; 
Benutzeravatar
Andy120
Mitglied
Beiträge: 3430
Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:

Beitrag von Andy120 »

Jetzt kommt folgende meldung....

Code: Alles auswählen

Parse error: parse error in /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php on line 261

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php:261) in /var/www/web102/html/index/phpbb2.0.6/includes/sessions.php on line 318

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php:261) in /var/www/web102/html/index/phpbb2.0.6/includes/sessions.php on line 319

Warning: Empty regular expression in /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php on line 102

Fatal error: Call to undefined function: submit_post() in /var/www/web102/html/index/phpbb2.0.6/posting.php on line 565
Edit

Kann den keiner Helfen... Fehler habe ich wieder rüchgängig gemacht, diesen da oben...
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

suche:

Code: Alles auswählen

"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);
ersetze mit:

Code: Alles auswählen

"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";
     if (!$db->sql_query($sql))
      {
	 message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
      }
Markus
Antworten

Zurück zu „phpBB 2.0: Mod Support“