Seite 13 von 111

Verfasst: 15.11.2002 14:27
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ß

Verfasst: 15.11.2002 14:31
von saerdnaer
ähm sind die schon aus der includes/functions_post.php ?

wenn ja poste die fehlermeldung nochmal

ah

Verfasst: 15.11.2002 14:35
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ß

Verfasst: 15.11.2002 14:40
von saerdnaer
ach schalt doch mal den automatischen zeilenumbruch bei deinem editor ab... und poste die zeilen dann noch mal...

ah

Verfasst: 15.11.2002 14:43
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ß

Zeile 260-269

Verfasst: 15.11.2002 14:46
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

Verfasst: 15.11.2002 14:49
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

Verfasst: 15.11.2002 15:09
von imq
ups sorry hab die kommas zuviel....sorry dann is kalr das dat nich klappt...*vordenkopphau*..*gg*

aba jetzt geht es...

THX

habs geändert

Verfasst: 15.11.2002 15:14
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

Verfasst: 15.11.2002 15:26
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 !!! ;-)