Seite 2 von 5

Verfasst: 16.11.2005 02:00
von franticfreak
Hi
hab grad mal nen neues topic gemacht,wollte was posten
dann kam diese meldung
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use 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', 18, 1132102720, 30, 0, 0, 0, 0// ADDED , topic_quiz AND , 0 BY Quiz Hack)

Line : 264
File : functions_post.php
und diser wenn ich auf was antworten will
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '/ ADDED , quiz_answer AND , '' BY Quiz Hack)' at line 1

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES (9381, '', '2ed0da67c2', 'test', ''// ADDED , quiz_answer AND , '' BY Quiz Hack)

Line : 288
File : functions_post.php
daher gib ich dir nun auch mal diese datei
http://fallinangel.fa.funpic.de/functions_post.rar

und hier auch mal die anleitung zum quiz hack
http://fallinangel.fa.funpic.de/readme.txt

Verfasst: 16.11.2005 02:05
von Markus67
Hi ...

suche in der posting.php

Code: Alles auswählen

$params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');$params['answer'] = 'answer'; // ADDED BY Quiz Hack
ersetze mit:

Code: Alles auswählen

$params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');
$params['answer'] = 'answer'; // ADDED BY Quiz Hack
suche:

Code: Alles auswählen

		$sql = "SELECT f.*, t.topic_status, t.topic_title
, t.topic_poster, t.topic_quiz,// ADDED , t.topic_quiz WITH Quiz Hack			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE t.topic_id = $topic_id
				AND f.forum_id = t.forum_id";
		break;
ersetze mit:

Code: Alles auswählen

		$sql = "SELECT f.*, t.topic_status, t.topic_quiz, t.topic_title, t.topic_type  
			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE t.topic_id = $topic_id
				AND f.forum_id = t.forum_id";
		break;
suche:

Code: Alles auswählen

		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';		$select_sql .= ( $mode == 'delete' ) ? ', t.topic_quiz' : ''; // ADDED BY Quiz Hack		$submit = $temp;
ersetze mit:

Code: Alles auswählen

		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
		$select_sql .= ( $mode == 'delete' ) ? ', t.topic_quiz' : ''; // ADDED BY Quiz Hack
		$submit = $temp;
suche:

Code: Alles auswählen

		$post_data['poster_id'] = $post_info['poster_id'];		$post_data['topic_quiz'] = !empty($post_info['topic_quiz']); // ADDED BY Quiz Hack
ersetze mit:

Code: Alles auswählen

		$post_data['poster_id'] = $post_info['poster_id'];
		$post_data['topic_quiz'] = !empty($post_info['topic_quiz']); // ADDED BY Quiz Hack
Und ich vermute jetzt mal dass in den ganzen anderen Dateien auch Fehler drin sind. 8)

Markus

Verfasst: 16.11.2005 02:07
von franticfreak
bisher nur noch in der function_post.php :cry:
bin hald noch nicht so gut wie du. 8)

Verfasst: 16.11.2005 02:15
von Markus67
Hi ..

suche in der functions_post.php

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

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, 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";
suche:

Code: Alles auswählen

	$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "'// ADDED , quiz_answer AND , '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "' BY Quiz Hack)" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
ersetze mit:

Code: Alles auswählen

	$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
Markus

Verfasst: 16.11.2005 02:20
von franticfreak
Danke
aber....
Fatal error: Call to undefined function: clean_words() in /usr/export/www/vhosts/funnetwork/hosting/fallinangel/includes/functions_search.php on line 119
http://fallinangel.fa.funpic.de/functions_search.rar 8)

oh man ich weiß garnicht wie ich dir danken soll,ist mor voll peinlich das du grad alles machen musst :oops:

ich hab probleme damit wenn in der anleitung steht
zb.
#-----[ IN-LINE, FIND ]------------------------------------------
#
t.topic_status
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, t.topic_quiz
#
#-----[ AFTER, ADD ]------------------------------------------
#
// ADDED , t.topic_quiz WITH Quiz Hack
damit komm ich nie klar
mit diesem in line after und dann nochmal after....aber zum glück gibts dich ;-)

Verfasst: 16.11.2005 02:28
von Markus67
Hi ...

dann wirds dringend nötig dass du dich damit mal auseinandersetzt ....
schau mal hier rein ... da wird es eigentlich wunderbar erklärt ... :wink:
KB:modsfaq

suche in der functions_search.php

Code: Alles auswählen

// END Quiz Hackfunction clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
ersetze mit:

Code: Alles auswählen

// END Quiz Hack
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
suche:

Code: Alles auswählen

	global $HTTP_GET_VARS; // ADDED BY Quiz Hack	$username_list = '';
ersetze mit:

Code: Alles auswählen

	global $HTTP_GET_VARS; // ADDED BY Quiz Hack
	$username_list = '';
suche:

Code: Alles auswählen

		// END Quiz Hack		'S_USERNAME_OPTIONS' => $username_list,
ersetze mit:

Code: Alles auswählen

		// END Quiz Hack
		'S_USERNAME_OPTIONS' => $username_list,
Markus

Verfasst: 16.11.2005 02:33
von franticfreak
ok danke nun scheint alles zu gehen, nur wo wird den nun das quiz angezeigt?
habe nen extra topic für erstellt names "quiz"
und habe im ACP unter quiz - einstellungen, auch dort das forum angegeben.wird aber nichts angezeigt

Verfasst: 16.11.2005 02:35
von Markus67
franticfreak hat geschrieben:ok danke nun scheint alles zu gehen, nur wo wird den nun das quiz angezeigt?
habe nen extra topic für erstellt names "quiz"
und habe im ACP unter quiz - einstellungen, auch dort das forum angegeben.wird aber nichts angezeigt
wie der MOD funktioniert kann ich dir nicht beantworten da ich den MOD noch nie installiert und/oder ausprobiert habe ... da musst du auf jemanden warten der sich mit dem Quiz MOD auskennt und den selbst installiert hat :wink:

Markus

Verfasst: 16.11.2005 02:38
von franticfreak
ich glaub ich weiß warum, .liegt es evtl daran,das ich ja jetzt garkeine auswhal habe, den ich habe ja in der posting_body.tpl nichts verändern können
wegen der BBbox.
kann man den code den ich nicht eingebaut bekomme nicht auch woanders hin machen?

Verfasst: 16.11.2005 02:49
von Markus67
Hi ...

das glaube ich eigentlich nicht. Ich würde eher vermuten dass da irgendwo in den anderen Dateien noch Fehler sind die im Moment nicht ersichtlich sind.

Markus