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.
imq
Mitglied
Beiträge: 98
Registriert: 23.09.2002 17:04
Kontaktdaten:

Beitrag von imq »

Code: Alles auswählen

zeile 255-264	
{
		//
		// Flood control
		//
		$where_sql = ( $userdata['user_id'] == ANONYMOUS ) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
		$sql = "SELECT MAX(post_time) AS last_post_time
			FROM " . POSTS_TABLE . "
			WHERE $where_sql";
		if ( $result = $db->sql_query($sql) )
gruß
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

ähm sind die schon aus der includes/functions_post.php ?

wenn ja poste die fehlermeldung nochmal

ah
imq
Mitglied
Beiträge: 98
Registriert: 23.09.2002 17:04
Kontaktdaten:

Beitrag von imq »

jup die is daraus..

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') VALUES ('dfgsgrsg', 2, 1037367390, 12, 0, 0, 0, )' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, ) VALUES ('dfgsgrsg', 2, 1037367390, 12, 0, 0, 0, )

Line : 264
File : /home/www/htdocs/masterimq.de/phpBB2/includes/functions_post.php

gruß
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

ach schalt doch mal den automatischen zeilenumbruch bei deinem editor ab... und poste die zeilen dann noch mal...

ah
imq
Mitglied
Beiträge: 98
Registriert: 23.09.2002 17:04
Kontaktdaten:

Beitrag von imq »

Code: Alles auswählen

255-264
{
		$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_vote, $quiz_sql1) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $quiz_sql2)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";// ADDED $quiz_sql1 AND $quiz_sql2 BY Quiz Hack
		if ( !$db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
gruß
Deathwish

Zeile 260-269

Beitrag von Deathwish »

@ Saerdner

Hier sind die Zeilen 260-269 meiner functions_post.php

260 $quiz_sql1 = !empty($post_data['topic_quiz']) ? ', topic_quiz' : '';
261 $quiz_sql2 = !empty($post_data['topic_quiz']) ? ', 1' : '';
262 // END Quiz Hack
263
264 $sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ($quiz_sql1,'$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $quiz_sql2)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
265 // ADDED $quiz_sql1 AND $quiz_sql2 BY Quiz Hack
266 if ( !$db->sql_query($sql) )
267
268 {
269 message_die (GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);


Bin schon sehr gespannt woran das nun liegt :D
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

warum kannst nicht machen was in der anleitung steht?
#
#-----[ FIND ]------------------------------------------
#
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
topic_vote
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
$quiz_sql1
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
$topic_vote
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
$quiz_sql2
das ergibt dann bei dir folgendes:

Code: Alles auswählen

      $sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote $quiz_sql1) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote $quiz_sql2)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";// ADDED $quiz_sql1 AND $quiz_sql2 BY Quiz Hack 
ah
imq
Mitglied
Beiträge: 98
Registriert: 23.09.2002 17:04
Kontaktdaten:

Beitrag von imq »

ups sorry hab die kommas zuviel....sorry dann is kalr das dat nich klappt...*vordenkopphau*..*gg*

aba jetzt geht es...

THX
Deathwish

habs geändert

Beitrag von Deathwish »

Hi Saerdnaer...
Ich habe die Zeilen geändert und nun erhalte ich eine neue Fehlermeldung. :(

Allgemeiner Fehler

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'Quiz Frage #1 ...', '99c960e86a', 'Und hier die neue Quiz-Frage: [QUIZ]' )' at line 1

INSERT INTO TRN_phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text ) VALUES ('5, 'Quiz Frage #1 ...', '99c960e86a', 'Und hier die neue Quiz-Frage: [QUIZ]' )

Line : 296
File : /includes/functions_post.php

Die Zeilen 293 bis 297 schauen bei mir so aus:
293 $sql = ( $mode != 'editpost' ) ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text$quiz_sql1) VALUES ('$post_id, '$post_subject', '$bbcode_uid', '$post_message' $quiz_sql2)" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id"; // ADDED $quiz_sql1 AND $quiz_sql2 BY Quiz Hack
294 if ( !$db->sql_query($sql) )
295 {
296 message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
297 }

Danke das Du so schnell Helfen kannst :)
Gruss Deathwish
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

du hast ein hochkomma nach $post_id vergessen:
$sql = ( $mode != 'editpost' ) ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text$quiz_sql1) VALUES ('$post_id', '$post_subject' [...]
PS: benutze endlich

Code: Alles auswählen

 tags !!! ;-)
Gesperrt

Zurück zu „phpBB 2.0: Mod Support“