SMF Quiz

Started by Diego Andrés, February 18, 2009, 01:08:19 PM

Previous topic - Next topic

Eclipse16V

Quote from: Jessica. on June 22, 2011, 01:43:45 PM
can't edit any parts of the Quiz in the admin anymore, can't get to Admin Center, Settings, Quizes, Quiz Leagues etc because I get this error in every single one:

Fatal error: Cannot redeclare parseleaguemessage() (previously declared in /home/u674831363/public_html/smfforum/Sources/ScheduledTasks.php:733) in /home/u674831363/public_html/smfforum/Sources/SMFQuizAdmin.php on line 348

I'm going to take a look at SMFQuizAdmin.php...
Have the same problem with SMF 2.0.
I install it manually.
I worked with:
SMF 2 in German

Shop:
SID Giessen

Jessica.

okay the thing is, when I barely have any mods installed, with this as one of them, it works. I can create a quiz. but when I go take a quiz, I get an error (Pop up)

then I go install more mods and suddenly it doesn't work anymore.
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Eclipse16V

If I change the following, it works without problems (at present) with me.

SMFQuizAdmin.php
Search
function ParseMessage($message, $quiztitle, $total_seconds, $total_points, $top_time, $top_points, $quizImage, $scripturl, $id_quiz, $old_member_name) {

global $user_settings;

$message = str_replace("{quiz_name}", $quiztitle, $message);
$message = str_replace("{new_score_seconds}", $total_seconds, $message);
$message = str_replace("{new_score}", $total_points, $message);
$message = str_replace("{old_score_seconds}", $top_time, $message);
$message = str_replace("{old_score}", $top_points, $message);
$message = str_replace("{member_name}", $user_settings['real_name'], $message);
$message = str_replace("{old_member_name}", $old_member_name, $message);
$message = str_replace("{quiz_image}", "[img]" . $quizImage . "[/img]", $message);
$message = str_replace("{quiz_link}", $scripturl . '?action=SMFQuiz;sa=categories;id_quiz=' . $id_quiz, $message);
return $message;
}

function ParseLeagueMessage($message, $quizLeagueName, $oldPosition, $newPosition, $positionMovement, $id_quiz_league) {

global $user_settings, $scripturl;

$message = str_replace("{quiz_league_name}", $quizLeagueName, $message);
$message = str_replace("{old_position}", $oldPosition, $message);
$message = str_replace("{new_position}", $newPosition, $message);
$message = str_replace("{position_movement}", $positionMovement, $message);
$message = str_replace("{quiz_league_link}", $scripturl . '?action=SMFQuiz;sa=quizleagues;id=' . $id_quiz_league, $message);
return $message;
}


Replace with
function ParseMessage($message, $quiztitle, $total_seconds, $total_points, $top_time, $top_points, $quizImage, $scripturl, $id_quiz, $old_member_name) {

global $user_settings, $scripturl;

$message = str_replace("{quiz_name}", $quiztitle, $message);
$message = str_replace("{new_score_seconds}", $total_seconds, $message);
$message = str_replace("{new_score}", $total_points, $message);
$message = str_replace("{old_score_seconds}", $top_time, $message);
$message = str_replace("{old_score}", $top_points, $message);
$message = str_replace("{member_name}", $user_settings['real_name'], $message);
$message = str_replace("{old_member_name}", $old_member_name, $message);
$message = str_replace("{quiz_image}", "[img]" . $quizImage . "[/img]", $message);
$message = str_replace("{quiz_link}", $scripturl . '?action=SMFQuiz;sa=categories;id_quiz=' . $id_quiz, $message);
return $message;
}
/*
function ParseLeagueMessage($message, $quizLeagueName, $oldPosition, $newPosition, $positionMovement, $id_quiz_league) {

global $user_settings, $scripturl;

$message = str_replace("{quiz_league_name}", $quizLeagueName, $message);
$message = str_replace("{old_position}", $oldPosition, $message);
$message = str_replace("{new_position}", $newPosition, $message);
$message = str_replace("{position_movement}", $positionMovement, $message);
$message = str_replace("{quiz_league_link}", $scripturl . '?action=SMFQuiz;sa=quizleagues;id=' . $id_quiz_league, $message);
return $message;
}
*/


This is not ideal, but at least I'm in the admin area.
I worked with:
SMF 2 in German

Shop:
SID Giessen

M50Freak

#303
Hello

I need help with the SMF Quiz.

I have already install the Quiz on my Board.

My SMF Version is: Powered by SMF 2.0 RC5 | SMF © 2006–2010, Simple Machines LLC
Extended by PortaMx v1.0 RC4 | PortaMx © 2008-2011 by PortaMx corp.

When I will start the Quiz:

QuoteAn unexpected parser error has occurred while retrieving data from the server. Please contact the server administrator and inform them of this error.

By the install of the Quiz came one Error: Language - My Forum runs on German.UTF8.
I think the Quiz have a problem with that?

Sorry for my bad English.

www.abload.de/img/unbenanntfu2c.jpg

Gruß
Norbert

M50Freak

Leute???
Brauch dirngend hilfe mit meinen Problem...
>:( :(

M50Freak

halllllllooooooooooo????????

Eclipse16V

Leider gibt es auch noch Leute die sich ein wenig Urlaub gönnen. :-)

So, wo liegt jetzt noch mal das Problem?
I worked with:
SMF 2 in German

Shop:
SID Giessen

M50Freak

#307
Hallo


Das Problem ist:

Ich hab mir das SMF Quiz installiert. (Bei mir im Forum soll bald ein Gewinnspiel laufen mit Sachpreisen vom Sponsor)

So das Installieren des Quiz war ja ganz einfach/ ebenso das erstellen.

Zum Testen habe ich mir ein Testquiz eröffnet, jedoch wenn ich das Quiz Starten will kommt der Fehler:

An unexpected parser error has occurred while retrieving data from the server. Please contact the server administrator and inform them of this error.

So im Fehlerprotokoll steht:
http://mofaforum.net/XXXXXXXXXXXXXMEINSXXXXXXXXXXXXXXXX [nofollow]: Undefined index: SMFQuizDatei: /var/www/MEINS/html/Sources/Subs.php
Zeile: 4194

Also solte ich mal dort in der Subs.php Zeile 4194 nachgucken;)

Aus Subs.php

//Begin SMFQuiz
4191.            'SMFQuiz' => array(
4192.                'title' => $txt['SMFQuiz'],
4193.                'href' => $scripturl . '?action=SMFQuiz',
4194.                'show' => allowedTo('quiz_view'),
4195.                'sub_buttons' => array(
4196.                ),
4197.            ),
4198.            //End SMFQuiz
4199.           
4200.            'calendar' => array(
4201.                'title' => $txt['calendar'],
4202.                'href' => $scripturl . '?action=calendar',
4203.                'show' => $context['allow_calendar'],
4204.                'sub_buttons' => array(
4205.                    'view' => array(
4206.                        'title' => $txt['calendar_menu'],
4207.                        'href' => $scripturl . '?action=calendar',
4208.                        'show' => allowedTo('calendar_post'),
4209.                    ),
4210.                    'post' => array(
4211.                        'title' => $txt['calendar_post_event'],
4212.                        'href' => $scripturl . '?action=calendar;sa=post',
4213.                        'show' => allowedTo('calendar_post'),
4214.                        'is_last' => true,
4215.                    ),
4216.                ),
4217.            ),




Ebenso habe ich nun in der Datei  /var/www/MEINS/html/Sources/SMFQuiz.php bei Zeile 14 einen Fehler:


1: <?php 
2
: if (!defined('SMF')) 
3 die('Hacking attempt...'); 
4:  
5// Include the SMF2 specific database file 
6: require_once($sourcedir '/SMFQuizDb.php'); 
7:  
8isAllowedTo('quiz_view'); 
9:  
10: function SMFQuiz() { 
11:  
12 global $context$txt
13  
==>
14 $context['page_title'] = $txt['SMFQuiz']; 
15:  
16 // Load the language file 
17 loadLanguage('SMFQuiz'); 
18:  
19 if ($context['current_subaction'] == 'play') { 
20 $context['template_layers'] = array(); 
21 $context['sub_template'] = 'quiz_play'
22
23:  
24 if (isset($_POST['id_quiz'])) { 
25 $context['id_quiz'] = $_POST['id_quiz']; 
26 } else if (isset($_GET['id_quiz'])) { 
27 $context['id_quiz'] = $_GET['id_quiz']; 
28 } else { 
29 $context['id_quiz'] = !empty($context['id_quiz']) ? $context['id_quiz'] : ''
30
31  
32 // Create an array of possible actions with the functions that will be called 
33 $actions = array( 
34 'home' => 'GetHomePageData'
 
mfg

Eclipse16V

Welche Sprache nutzt Du bzw. hast Du eingebaut?
Standard also Englisch oder eine eigene?
I worked with:
SMF 2 in German

Shop:
SID Giessen

M50Freak

Hallo

Forum Deutsch? (UTF-8)

Sonst hab ich nichts geändert...
Mus ich im Quiz ne Datei German anlegen?

Eclipse16V

Ja bzw. so einfach ist es nicht.
Du musst da einiges an der Mod ändern um es in Deutsch zum laufen zu bekommen.
I worked with:
SMF 2 in German

Shop:
SID Giessen

M50Freak

Moin

Und was? Sorry hab damit noch nicht so viel erfahrung.

mfg

Eclipse16V

Fast jede Datei dieser Mod habe ich geändert. IM ACP der Mod muss man aber aufpassen da sonst nichts mehr geht.
Ist ein haufen arbeit. Bin auch noch nicht ganz fertig bei mir.
I worked with:
SMF 2 in German

Shop:
SID Giessen

M50Freak

OMG  :'(

Das bekomme ich dan sicherlich nicht hin:(:(

Könntest du mir die Deutsche Datei zukommen lassen?
In welchen Forum hast du es eingebunden?

Meine SMF Version:
Powered by SMF 2.0 RC5 | SMF © 2006–2010, Simple Machines LLC
Extended by PortaMx v1.0 RC4 | PortaMx © 2008-2011 by PortaMx corp.
BlackRain V2 2009, by CripXHTMLRSSWAP2


mfg
Norbert

bearstreet

is there anyone  using mod this for smf who can post the link of their of quiz website made with this mod?
Dont do drugs, coz if you get caught u will go to prison, and drugs are real expensive in prison
:P

Ask me Maths Questions

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bearstreet

Quote from: Kindred on October 05, 2011, 03:46:08 PM
I am using it on 40konline.com

i tried registering on your forum,
but the answer to that worded question 5+ ....... is 12 or something else...

5+11-4=12

i couldnt register so couldnt see
Dont do drugs, coz if you get caught u will go to prison, and drugs are real expensive in prison
:P

Ask me Maths Questions

Ozzie

i have it on my site if you having trouble getting onto Kindred's site

2000+ games available to download

bearstreet

Quote from: Ozzie on October 06, 2011, 04:32:52 AM
i have it on my site if you having trouble getting onto Kindred's site

it says after registering that admin must approve my request
Dont do drugs, coz if you get caught u will go to prison, and drugs are real expensive in prison
:P

Ask me Maths Questions

Ozzie

yer for some reason your user name you used  "sunny" sent stop spammer into overdrive  ....sent email but will monitor

2000+ games available to download

Advertisement: