Seite 40 von 111

Verfasst: 26.01.2003 00:13
von ChaoS
² Jupiter:
ja das hatte ich auch bei dem Versuch das über das Install Script ausführen zu lassen. Das teil hat anscheinend probs mit dem Attachment Mod.

Ich habe das aber so umgegangen dass ich die DB Queries per Hand ausgeführt habe.

Code: Alles auswählen

$sql_query = "
CREATE TABLE phpbb_QUIZ_TABLE
   quiz_id mediumint(8) unsigned DEFAULT '0' NOT NULL auto_increment,
   question text NOT NULL,
   answer varchar(100) NOT NULL,
   answer2 varchar(100) NOT NULL,
   answer3 varchar(100) NOT NULL,
   answer4 varchar(100) NOT NULL,
   quiz_points tinyint(2) DEFAULT '1' NOT NULL,
   quiz_type tinyint(1) DEFAULT '0' NOT NULL,
   quiz_status tinyint(1) DEFAULT '0' NOT NULL,
   quiz_from_user_id mediumint(8) DEFAULT '0' NOT NULL,
   quiz_topic_id mediumint(8) unsigned DEFAULT '0' NOT NULL,
   quiz_bot_post_id mediumint(8) unsigned DEFAULT '0' NOT NULL,
   answered_by_user_id mediumint(8) DEFAULT '0' NOT NULL,
   PRIMARY KEY (quiz_id),
   KEY quiz_status (quiz_status),
   KEY quiz_topic_id (quiz_topic_id),
   KEY user_id (quiz_from_user_id)


CREATE TABLE phpbb_QUIZ_CONFIG_TABLE 
   config_name varchar(255) NOT NULL,
   config_value text NOT NULL,
   PRIMARY KEY (config_name)


INSERT INTO phpbb_QUIZ_CONFIG_TABLE 
('quizbot_id', '2'),
('forum_id', '1'),
('next_quiz', '" . ( time() - 3600 ) . "'),
('next_quiz_step', '1'),
('next_quiz_step_mode', '1'),
('disable', '1'),
('subject', 'Quiz Frage #{NUM} ...'),
('message', 'Und hier die neue Quiz-Frage:\r\n{QUIZ}'),
('subject2', 'Quiz beantwortet'),
('message2', 'Die Quiz-Frage wurde von [i]{USERNAME}[/i] richtig beantwortet.\r\nDas Quiz wurde beendet.'),
('subject3', 'Fehler'),
('message3', 'Aus technischen Gründen wurde die Antwort von [i]{USERNAME}[/i] irrtümlich als richtig markiert. Wir bitten dies zu entschuldigen.\r\nDas Quiz wird nicht wiedereröffnet und bleibt beendet. \r\n'),
('next_quiz_number', '1'),
('quiz_points_disable', '0'),
('banned_users', ''),
('banned_groups', ''),
('admin_user_id', '2'),
('allow_admin_in_quiz', '0'),
('allow_mod_in_quiz', '0'),
('allow_quiz_from_user_in_quiz', '0'),
('html', '1'),
('bbcode', '1'),
('smilies', '1'),
('imported_files', ''),
('last_start_time', '0'),
('version', '0.1.0');

ALTER TABLE phpbb_USERS_TABLE ADD quiz_points MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;

ALTER TABLE phpbb_TOPICS_TABLE . " ADD topic_quiz MEDIUMINT(8) DEFAULT '0' NOT NULL;

ALTER TABLE phpbb_POSTS_TEXT_TABLE . " ADD quiz_answer VARCHAR(100) NOT NULL;
Das "phpbb_" musst du durch deinen prefix ersetzen.

Verfasst: 26.01.2003 00:55
von Jupiter
habe gearde ne andere lösung gefunden...habe einfach in der functions.php das Attachment Mod deaktiviert...dann die install datei vom quiz mode ausgeführt...und dann habe ich das Attachment Mod in der functions.php wieder aktiviert...und es geht alles supi...

Verfasst: 26.01.2003 02:03
von Jupiter
Hi Leute

ich habe bei mir das Quiz Mode in der Version 0.1.1 installiert allerdings habe ich ein paar Probs.
Wenn ich eine Quiz Frage erstelle, finde ich diese nirgendwo wieder...
Wenn ich dann ins Admin Menü gehe unter Bearbeiten kann er diese Datei nicht finden obwohl sie ja vorhanden ist...
Und bei Quizfrage manuell stellen zeigt er mir nur eine leere Seite an...
In der Konfiguration kann ich Benutzer dürfen an den von ihnen vorgeschlagenen Quizfragen teilnehmen nicht auf Ja stellen...
Und Quiz Hack Automatik deaktivieren kann ich net aktivieren...

Ich hoffe ihr könnt mir bei diesen kleinen Probs. weiter helfen.
Mfg. Jupiter!

www.games-seven.de

Verfasst: 26.01.2003 02:37
von ChaoS
Hi,
so gehts natürlich auch...Also bei funzt das Quiz (phpBB 2.04).

Jedoch gehts nur unter kleinen Modifikationen. Da ich den Categories Before Topic Title eingebaut hatte gings nicht da genau in der 268 Zeile noch die Variable k_id eingebaut wurde. Leider funzt natürlich dieser schöner Hack nicht mehr, wenn ich die Variable rausnehme...

Daher die Frage an die Spezies hier wie man das umbasteln kann:

1. Kombination (Quiz geht, Cat... geht nicht)

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";
2. Kombination (Quiz geht nicht , Cat... geht)

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[color=red], k_id[/color]) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote $quiz_sql2, [color=red]$k_id[/color])" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote, [color=red]k_id=$k_id[/color] WHERE topic_id = $topic_id";

Verfasst: 26.01.2003 19:49
von Gast
Gibt es hier Hilfe?

Verfasst: 26.01.2003 20:03
von ChaoS
Anonymous hat geschrieben:Gibt es hier Hilfe?
Eigentlich schon, wenn jemand Rat weiss....

Verfasst: 26.01.2003 20:06
von saerdnaer
@jupiter: bist du die person die mich per email angesprochen hat? schau mal ob die die admin/admin_quiz.php im ascii oder text modus hochgeladen hast...

@chaos: probier mal

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, k_id $quiz_sql1) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $k_id $quiz_sql2)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote, k_id=$k_id WHERE topic_id = $topic_id";
achja und inerhalb des code tags gehen andere bbcodes nicht...

@gast: natürlich: deine includes/funtions_post.php und deine includes/quiz.php als .txt bitte...

@mandy: was war dein problem nochmal?

hab ich irgenjemand vergessen?

Verfasst: 26.01.2003 20:12
von Jupiter
jip, ich war es der dir die mail geschickt hatte....ich hatte es per auto übertragen lassen und sonst geht es ja auch...und die anderen mods gehen ja auch nur das halt net....

jupiter!

Verfasst: 26.01.2003 20:12
von Mandy
Hallo Saerdnaer,
mein Problem war:

DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' 1043265623, 11, 0, 0, 0 , 1)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote , topic_quiz) VALUES ('Quiz Frage #1 ...', , 1043265623, 11, 0, 0, 0 , 1)

Line : 272
File : /www/htdocs/includes/functions_post.php
die beiden Dateien wolltest du haben.
http://www.spektacoolair.de/funtions_postphp.txt

http://www.spektacoolair.de/quizphp.txt

Verfasst: 26.01.2003 20:19
von saerdnaer
@mandy: könnte es sein das du keinen user als quizbot definiert hast?

ah