Seite 1 von 1

quiz Mod -Installation

Verfasst: 23.03.2005 10:50
von Helmut71
Hi all, versuche mich gerade am Quiz-Mod.

Hab aber schon bei der Installation Probleme:
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, p.*, pt.post_text, pt.bbcode_uid, pt.post_subject, p.post_username
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time ASC";
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
pt.post_subject,
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
pt.quiz_answer,
#
#-----[ IN-LINE, FIND ]------------------------------------------
#
p.post_time ASC
#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, p.post_id ASC
#
#-----[ AFTER, ADD ]------------------------------------------
#
// ADDED pt.quiz_answer, AND , p.post_id ASC WITH Quiz Hack
#
#-----[ FIND ]------------------------------------------
#
$message = str_replace("\n", '<br />', $message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// BEGIN Quiz Hack
if ( !empty($topic_row['topic_quiz']) )
{
if ( $i == 0 )
{
if ( !isset($quiz) )
{
include($phpbb_root_path . 'includes/quiz.'.$phpEx);
}
$message = $quiz->insert_block(QUIZ_QUESTION, $message, $topic_id, true);
}
else if ( !empty($postrow[$i]['quiz_answer']) )
{
if ( !isset($quiz) )
{
include($phpbb_root_path . 'includes/quiz.'.$phpEx);
}
$message = $quiz->insert_block(QUIZ_ANSWER, $message, $topic_id, $postrow[$i]);
}
}
// END Quiz Hack
#
#-----[ FIND ]------------------------------------------
und zwar ist in meiner modcp.php das
$sql = "SELECT u.username, p.*, pt.post_text, pt.bbcode_uid, pt.post_subject, p.post_username
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time ASC";
und das

Code: Alles auswählen

$message = str_replace("\n", '<br />', $message);
doppelt vorhanden...in der Installationsanleitung steht davon aber nichts.

Und:

in meiner posting_pody.tpl

Code: Alles auswählen

/templates/xxx/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
		formErrors = "{L_EMPTY_MESSAGE}";
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#
	<!-- BEGIN switch_quiz_answer_js -->
	{switch_quiz_answer_js.JS} 
	<!-- END switch_quiz_answer_js -->
gibts das hier

Code: Alles auswählen

		formErrors = "{L_EMPTY_MESSAGE}";
	}
nicht.

Verfasst: 23.03.2005 22:37
von Chyna
Also in meiner modcp.php ist das jeweils nur 1x vorhanden. Hast Du die schon für andere Mod´s benutzt oder ist es noch die Originale ?

Code: Alles auswählen

formErrors = "{L_EMPTY_MESSAGE}";
   } 
Gibt es bei mir. Das steht in diesem Block hier:

Code: Alles auswählen

function checkForm() {

        formErrors = false;

        if (document.post.message.value.length < 2) {
                formErrors = "{L_EMPTY_MESSAGE}";
        }

        if (formErrors) {
                alert(formErrors);
                return false;
        } else {

Schau mal nach ob Du ansatzweise irgend etwas davon findest oder ob das gar nicht vorhanden ist. Auch hier wieder die Frage ... Noch original oder schon gemodet ? Schau doch mal in den Originaldateien nach - ob´s da vorhanden ist.

Gruß Chyna

Verfasst: 24.03.2005 10:05
von Helmut71
naja die Antwort heißt - ja. Ich hab mehrere Mods eingebaut, die die betreffenden Dateien verändert haben.

Im Konkreten: Die modcp.php wurde vermutlich durch den merge-Mod verändert, hier ist sie,w ie sie jetzt ist: http://www.hohenau.net/modcp_neu1.txt

Die posting_body.tpl wurde von dem bbcode-Box Mod verändert bzw. viele Funktionen in eine bbcode.php bzw bbcode.tpl transferiert. Den Mod hab ich von hier: http://www.phpbbhacks.com/download/1059

Code: Alles auswählen

function checkForm() { 

        formErrors = false; 

        if (document.post.message.value.length < 2) { 
                formErrors = "{L_EMPTY_MESSAGE}"; 
        } 

        if (formErrors) { 
                alert(formErrors); 
                return false; 
        } else {
Diesen Code hab ich interessanterweise nirgends mehr gefunden...

Wäe für fachkundige Hilfe dankbar!