4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: mawenzi on June 22, 2006, 03:37:39 AM

Title: [MOD] 4images Quiz V.1.0
Post by: mawenzi on June 22, 2006, 03:37:39 AM
Hey guys,
Im looking for a php Quiz script to integrate with my 4images..do you know of any MOD like that ?
Feature of my dream Quiz would be:

1. You can include image with an url pulled from your 4images database.
2. multiple choice questions
3. shows one question at a time
4. shows the answer and explanation when the question is answered
5. pulls question at random from a database
6. On/Off timing.
7. each question could have a score so more diff q. willhave higher scores
8. Hi-score table based on bell-shaped curves ( how the taker compares to the rest of the people taking the same test)
9. 4images registered users can save their hi-scores in the DB..and redo question they messed up etc..etc..

of course this is just the ideal variant... :mrgreen:

thnx.
ms

Just my example for your testing and downloading ...  :wink:

4images Quiz Version 1.0 (http://klick.kl.funpic.de/quiz_v1.php)


it looks very good..

some questions and sugestions:

1. will it be free
2. does it give you score at the end. I did not go true all the q my German is nowere to be found. :lol:
3. are q pulled randomly from the db.
4. the picture is kinda small and clicking on it goes to the 4images so the people can cheat. I think just showind the image in full size rahter than thumb is better.
5. can you make it so the people can choose the number of q they want and then get random.

otherwize is exactly what Im looking for.
thnx.

... thanks ...  :mrgreen:

answers :

1. yes (as a registered user)
2.1 yes (test it by clicking some answer and as a registered user ...  :wink:)
3.1 at the moment ... no
3.2 questions are not stored in db ... are stored in a txt-file
4.1 the thumbnail link goes target="_blank" to the 4images details ... !
4.2 it is your thumbnail size ...
4.3 image full size is possible ... but not a good solution ... it is a quiz ... not a 2.gallery
5. at the moment ... no

Title: Re: [MOD] 4images Quiz
Post by: MadSci on June 22, 2006, 04:29:09 AM
How difficult will it be to:
1) load all the question in an array and the shuffle the array.
2) ask the user for number of questions to display
5) loop n times as per users choice..

now if you use xml for the questions you can assign an ID to any of the questins and then just use random numbers to display the approate question.
My background is not PHP unfortunatly but VB (no smiles kids... :lol:)

ok about the thumb here is what I do:

1 I read the question
2. I read the multiple choice answers..
3. I wonder which is correct
4. I click on the thimb and go the gallery to see the answer.
5. close the window and click the right choice.
6. I get 100 all the time wich makes the high score kinda useless..if you realy want to test the people.


I think this is going to become a big mod...thanx..great work.
Title: Re: [MOD] 4images Quiz
Post by: gustav on June 22, 2006, 10:40:53 AM
it's great..... but can you make it so, that only the first try get's stored in the "highscore"?.... else everyone can obtain 100% by simply doing it over and over again..... ;)
Maybe with a comment when trying it for a second time like "You decisions will not be counted as you already tried your luck.... this will be for learning purposes only" ;)

And you already shuffeled the answers when trying again.. can you also shuffel the questions? So that they always come in a diffrent order?
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on June 22, 2006, 03:23:36 PM
... ok guys ... step by step ...  :wink:

6. I get 100 all the time wich makes the high score kinda useless..if you realy want to test the people.
it's great..... but can you make it so, that only the first try get's stored in the "highscore"?.... else everyone can obtain 100% by simply doing it over and over again..... ;)

my solution :
- now two Quiz-Levels are stored for the Highscore List
- First-Quiz-Level for the entrance quiz rounds (fix)
- End-Quiz-Level for the latest quiz rounds (variabl.)

2) ask the user for number of questions to display
...
4. I click on the thimb and go the gallery to see the answer.

I think that is not the right way. All users must answer the same questions.
On details the answer must not have to be read. The link can be also removed.

And you already shuffeled the answers when trying again.. can you also shuffel the questions? So that they always come in a diffrent order?

I think shuffeled answers are enough ... for the moment ...  :wink:

All features of 4images Quiz Version 1.1 you can find : here (http://klick.kl.funpic.de/quiz_v1.php) !



Title: Re: [MOD] 4images Quiz
Post by: MadSci on June 23, 2006, 02:50:39 PM
I guess I will give it a try and I will keep an eye for updates.
You may want to move that to the MODS and Plugins sections.

I have a pure selfish favor to ask:
is it easy to make: when you click on the thumb to make a pop-up window showing the full image with no link to 4images
can we use HTML tags to include links in the explanations ?

MS  :D
Title: Re: [MOD] 4images Quiz
Post by: MadSci on June 23, 2006, 10:31:52 PM
How do we download or its not ready yet... 8O

ms
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on July 28, 2006, 12:26:38 AM
All features and download (*) of 4images Quiz Version 1.0 you can find : here (http://klick.kl.funpic.de/quiz_v1.php) !

(*) ... and download options ...  :mrgreen:
Title: Re: [MOD] 4images Quiz
Post by: Stoleti on July 28, 2006, 02:35:15 AM
All features and download (*) of 4images Quiz Version 1.0 you can find : here (http://klick.kl.funpic.de/quiz_v1.php) !

(*) ... and download options ...  :mrgreen:


theres only the german version ,i've clicked at english but this seems not be avaliable ... :|
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on July 28, 2006, 03:32:56 PM
... sorry ...
... the english version (translation is not complete) you can download here (http://klick.kl.funpic.de/files.php) ...
Title: Re: [MOD] 4images Quiz
Post by: JensF on August 14, 2006, 01:21:16 PM
Hi there,

i have a little problem with the Quiz.

I will see the results on my tempalte site but now it show wrong.

See this: http://www.terraristik-galerie.de/quiz_galerie.php

What must i do to have the result in my template????
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on August 15, 2006, 11:19:00 AM
@ JensF

... das ist kein Problem mit dem Quiz, sondern mit der zusätzlichen Darstellung der Highsoreliste in einem anderen Template ...
... habe deine gleiche Anfrage hier (http://klick.kl.funpic.de/showthread.php?bid=3&threadid=67&page=2) beantwortet ...
Title: Re: [MOD] 4images Quiz
Post by: JensF on August 15, 2006, 04:00:53 PM
Ja danke, aber es haut immer noch nicht hin. Habe hier halt nochmal nachgefragt weil mir da vielleicht auch andere noch weiterhelfen können ;)
Title: Re: [MOD] 4images Quiz
Post by: fabio on August 16, 2006, 07:51:22 PM
i got a 92.86 % and tried to download the script but both links lead to the german version ....
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on August 16, 2006, 08:21:08 PM
... not completely correct ...
... but the english installation instruction is not completely translated yet ... sorry for that ...  :oops:
... try to use translate.google.com ...
... I will try it also and then I will post it there ...
Title: Re: [MOD] 4images Quiz
Post by: fabio on August 16, 2006, 08:34:33 PM
i asked just in case it was  something wrong the zip files

i got it to work anyway


thanks
Title: Re: [MOD] 4images Quiz
Post by: Gwydion on August 20, 2006, 04:36:02 PM
Die Idee ist gut, aber ich hab nicht wirklich viel Ahnung von Databases .. bzw. der direkten Manipulation.
Kann jemand die Anleitung
Quote
» Die 4images Datenbank ist in der Tabelle 4images_users um folgenden 2 Felder zu erweitern :
 
  1. SQL-Befehl:
  ALTER TABLE `4images_users` ADD `user_quiz_level` DECIMAL( 6, 2 ) DEFAULT '0.00' NOT NULL

  2. SQL-Befehl:
  ALTER TABLE `4images_users` ADD `user_quiz_firstlevel` DECIMAL( 6, 2 ) DEFAULT '0.00' NOT NULL
 

in eine step-by-step für Dummies umwandeln?
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on August 21, 2006, 11:15:40 PM
@ Gwydion

werde einen "Installer" erstellen und ihn in die Download-Area stellen ... doch kleinen Moment noch ...  :wink:

[edit] ... ist erledigt ... steht hier (http://klick.kl.funpic.de/files.php) zum Download ...  8)
Title: Re: [MOD] 4images Quiz
Post by: tdkpaul on August 22, 2006, 08:13:24 PM
ihr könnt es ja mal bei mir ausprobieren falls ihr Bock habt  :lol:

http://www.mobsterbb.de./gbbcontent/index.php?template=quiz

ist noch nicht vollständig und auf der Seite noch nicht verlinkt, da ich mind. 50 Fragen erstellen möchte



ist aber ein echt geiler MOD von mawenzi  !!

 8)
Title: Re: [MOD] 4images Quiz
Post by: Gwydion on August 22, 2006, 08:48:52 PM
Dankeschön. :)
Scheint auch alles zu klappen.

Nur 2 Dinge .. für Dummies wie mich ist die Verzippung ein bißchen irreführend .. mußte erst mal probieren, welcher Folder nun genau hochzuladen war. Vielleicht ließe sich das für zukünftige Nutzer vereinfachen.
Gleiches gilt für den Link im ACP .. mußte erstmal überlegen, ehe ich kapiert habe, daß der Link nicht funzen kann (im Verweis in quiz_admin_eng.php wird ja ein dir "quiz_eng" angesprochen wird, das aber nicht angelegt wurde bzw. enthalten ist).

Ist wie gesagt, kein Problem, kann aber verwirren.
Sonst sieht alles super aus. :)

ETA: eine Frage noch - können Guests auch spielen? Hab es noch nicht ausprobiert, aber so wie ich das sehe, können sie, es werden jedoch keine highscores eingetragen, richtig?
Gibt es eine Möglichkeit nicht-registrierte User aufzunehmen?
Ich frage deshalb, weil ich in meiner gallery keine registrierten User habe (n will).
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on August 22, 2006, 11:27:05 PM
@ tdkpaul

1.deine Links laufen mit "Authorization Required" auf ... da kann man also nichts sehen bzw. testen ... schade ... :?
2.danke für dein Urteil  zu diesem MOD

@ Gwydion

1. das ist eigentlich das undankbare an einer Veröffentlichung einer Modifizierung ... man muss alle Eventualitäten der zukünftigen Verwender mit einplanen ... und dann soll der Verwender auch noch mit überlegen ... ist das zu viel verlangt ...  :? ... nichts für ungut ... ich versuche mein Bestes ...  :wink: ... und für dich habe ich speziell noch den Installer bereit gestellt !
2. ja, als Gast kannst du das Quiz auch spielen und du wirst auch als solcher begrüßt ... die Ergebnisse von nicht registrierten Usern kannst du in der User Tabelle nur unter "Guest" speichern, d.h. dieser Level würde jedes mal überschrieben werden. Wolltest du individuelle "Guest"-Ergebnisse, dann benötigst du wieder eine Art Identifizeireung, was einer Registrierung gleich kommt. Also kurzum : wer in die Highscore Liste will, der muss sich vorher registrieren ... . Hast du keine registrierten User auf deiner Website, so kannst du auch keine unterschiedlichen User in deine Highscore Liste eintragen ...  :wink:
Title: Re: [MOD] 4images Quiz
Post by: Gwydion on August 23, 2006, 07:43:38 PM
Gott nein, das war keine Kritik! Der Mod ist klasse und der Installer hat perrfekt funktioniert.
Mich betreffen die 2 Punkte ja auch nicht mehr, dachte es eher als Anregung oder Feedback .. oder Kommentar.
Entschuldige, wenn das anders rüberkam, war nicht so gemeint.
Title: Re: [MOD] 4images Quiz
Post by: SAD on August 23, 2006, 09:27:26 PM
Hi, mawenzi !
My little update for limit count game is one user:

quiz_include.php
find
Code: [Select]
$variante = "English";
add after
Code: [Select]
$onegame = 1; // 1- limit is one game is one user, 0- no limit game


quiz.php
find
Code: [Select]
if ($user_info['user_level'] > GUEST )
{
$user_name_quiz = $user_info['user_name'];
}else{
$user_name_quiz = "Guest";
}

add after
Code: [Select]
if ($onegame == 1) {

if ($user_info['user_level'] > GUEST)
{
$user_id_quiz = $user_info['user_id'];
$user_quiz_level = $p;

$sql = "SELECT username, user_id, user_quiz_firstlevel
        FROM ".USERS_TABLE."
        WHERE user_id = $user_id_quiz";
$row = $site_db->query_firstrow($sql);
$user_quiz_firstlevel = $row['user_quiz_firstlevel'];

if ($user_quiz_firstlevel > "0.00"){

echo "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\"><meta http-equiv=\"pragma\" content=\"no-cache\">";
echo "<title>".$titel."</title>";
echo "<link rel=\"stylesheet\" href=\"quiz_style.css\" /></head>";
echo "<body oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\">";
echo "<center><br><div id=\"game\"><div id=\"titel\">You already took part in a quiz :)</div>";

// --- Highscore Liste  ---
$sql = "SELECT *
        FROM ".USERS_TABLE."
        WHERE user_quiz_level > 0
        ORDER BY user_quiz_level DESC, user_quiz_firstlevel DESC, username ASC
        LIMIT 10";
$result = $site_db->query($sql);

  echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr><td class=\"tableborder\">";
  echo "<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\"><tr>";
  echo "<td width=\"100%\" class=\"listhead\" valign=\"top\" align=\"center\" colspan=\"3\"><small>".$quiz_list_1."</small></td></tr>";
  echo "<td width=\"10%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_2."</small></td>";
  echo "<td width=\"60%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_3."</small></td>";
  echo "<td width=\"30%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_4."</small></td>";
  echo "</tr>\n";
  $count = 0;
  $bgcolor = 0;
  $counter = $count+1;
  while ($user_row = $site_db->fetch_array($result)) {
  $user_name = htmlspecialchars($user_row['user_name']);
  $user_quiz_level = ($user_row['user_quiz_level']);
  if ($count == 0) {
  $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
  echo "<tr class=\"listrow".$row_bg_number."\">\n";
  }
  echo "<td valign=\"bottom\" align=\"middle\"><small>".$counter."</small></td>\n";
  echo "<td valign=\"bottom\" align=\"left\"><small>".$user_name."</small></td>\n";
  echo "<td valign=\"bottom\" align=\"middle\"><small>".$user_quiz_level." %</small></td>\n";
  echo "\n</tr>\n";
  $counter++;
  } // end while : Ausgabe der Tabellenzeile
  echo "</table>\n";
  echo "</td>\n</tr>\n</table><br>\n";
// --- Highscore Liste  ---

echo "</div></center></body></html>";
exit;
}}
}

testing (http://www.krugozor.ru/test_quiz.html).
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on August 23, 2006, 10:13:36 PM
Hi SAD,

I have tested your quiz with my bad russian language knowledge ...  :mrgreen:
Has your quiz the "limit count" ? I don't see the restriction "You already took part in a quiz" ?
Title: Re: [MOD] 4images Quiz
Post by: tdkpaul on August 24, 2006, 08:55:00 AM
stimmt mein quiz link geht gerade nicht, da meine komplette Seite kurzfristig mit htaccess geschützt ist, sry

ist echt ein geiler Mod, ich habe auf meiner Seite das Quiz in ital., engl. und deutsch. Sprache
Title: Re: [MOD] 4images Quiz
Post by: SAD on August 24, 2006, 06:31:20 PM
Has your quiz the "limit count" ?

It has not been included.
Has now included, you can check up:)
Title: Re: [MOD] 4images Quiz
Post by: mawenzi on January 25, 2007, 01:48:13 AM
... da der MOD von diversen Usern erfolgreich getestet und installiert wurde, habe ich ihn verschoben nach ...
... Mods & Plugins (Releases & Support) ...
Title: Re: [MOD] 4images Quiz
Post by: Sunny C. on August 06, 2008, 02:51:39 PM
Hi, mawenzi !
My little update for limit count game is one user:

quiz_include.php
find
Code: [Select]
$variante = "English";
add after
Code: [Select]
$onegame = 1; // 1- limit is one game is one user, 0- no limit game


quiz.php
find
Code: [Select]
if ($user_info['user_level'] > GUEST )
{
$user_name_quiz = $user_info['user_name'];
}else{
$user_name_quiz = "Guest";
}

add after
Code: [Select]
if ($onegame == 1) {

if ($user_info['user_level'] > GUEST)
{
$user_id_quiz = $user_info['user_id'];
$user_quiz_level = $p;

$sql = "SELECT username, user_id, user_quiz_firstlevel
        FROM ".USERS_TABLE."
        WHERE user_id = $user_id_quiz";
$row = $site_db->query_firstrow($sql);
$user_quiz_firstlevel = $row['user_quiz_firstlevel'];

if ($user_quiz_firstlevel > "0.00"){

echo "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\"><meta http-equiv=\"pragma\" content=\"no-cache\">";
echo "<title>".$titel."</title>";
echo "<link rel=\"stylesheet\" href=\"quiz_style.css\" /></head>";
echo "<body oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\">";
echo "<center><br><div id=\"game\"><div id=\"titel\">You already took part in a quiz :)</div>";

// --- Highscore Liste  ---
$sql = "SELECT *
        FROM ".USERS_TABLE."
        WHERE user_quiz_level > 0
        ORDER BY user_quiz_level DESC, user_quiz_firstlevel DESC, username ASC
        LIMIT 10";
$result = $site_db->query($sql);

  echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr><td class=\"tableborder\">";
  echo "<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\"><tr>";
  echo "<td width=\"100%\" class=\"listhead\" valign=\"top\" align=\"center\" colspan=\"3\"><small>".$quiz_list_1."</small></td></tr>";
  echo "<td width=\"10%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_2."</small></td>";
  echo "<td width=\"60%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_3."</small></td>";
  echo "<td width=\"30%\" class=\"listhead\" valign=\"top\" align=\"center\"><small>".$quiz_list_4."</small></td>";
  echo "</tr>\n";
  $count = 0;
  $bgcolor = 0;
  $counter = $count+1;
  while ($user_row = $site_db->fetch_array($result)) {
  $user_name = htmlspecialchars($user_row['user_name']);
  $user_quiz_level = ($user_row['user_quiz_level']);
  if ($count == 0) {
  $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
  echo "<tr class=\"listrow".$row_bg_number."\">\n";
  }
  echo "<td valign=\"bottom\" align=\"middle\"><small>".$counter."</small></td>\n";
  echo "<td valign=\"bottom\" align=\"left\"><small>".$user_name."</small></td>\n";
  echo "<td valign=\"bottom\" align=\"middle\"><small>".$user_quiz_level." %</small></td>\n";
  echo "\n</tr>\n";
  $counter++;
  } // end while : Ausgabe der Tabellenzeile
  echo "</table>\n";
  echo "</td>\n</tr>\n</table><br>\n";
// --- Highscore Liste  ---

echo "</div></center></body></html>";
exit;
}}
}

testing (http://www.krugozor.ru/test_quiz.html).

Ist diese Erweiterung eine Begrenzung, dass z.B ein User nur einmal am Quiz teilnehmen kann?
Title: Re: [MOD] 4images Quiz V.1.0
Post by: mawenzi on August 06, 2008, 04:44:45 PM
@Phisker B

... ja, mit dieser Anpassung können nur User, und die auch nur einmal, am Quiz teilnehmen ...
... wenn das denn so gewollt ist ...
... im Normalfall wird jeweils der letzte Quiz-Level gespeichert und in der Highscore-Liste angezeigt ...
... und bei mir sieht man halt den Einstiegs- und den End-Level ... ;)
... wenn ich nicht das wiederholte Spielen zulassen würde ... wer weiß ... dann würden sicher keine Quiz-Downloads stattfinden ...  :mrgreen:

btw. ... viel Spaß mit dem Quiz ...
Title: Re: [MOD] 4images Quiz V.1.0
Post by: Sunny C. on August 06, 2008, 05:59:43 PM
Danke, klasse Teil!
Title: Re: [MOD] 4images Quiz V.1.0
Post by: mawenzi on October 31, 2008, 07:49:15 AM
@Phisker B

... danke für deinen Download* und dein Statement ...

*) und natürlich die vorherige Quizbewältigung ... ;)
Title: Re: [MOD] 4images Quiz V.1.0
Post by: bergblume on May 19, 2011, 09:42:09 AM
kurze frage - wie kann man eigentlich - wenn man schon ein quiz gemacht hat - und nun ein neues machen will, die aktuelle highscore-liste löschen?
danke, bergblume
Title: Re: [MOD] 4images Quiz V.1.0
Post by: mawenzi on May 19, 2011, 06:46:12 PM
kurze Antwort ... in phpMyAdmin die folgenden SQL-Befehle ausführen ...
1.
UPDATE TABLE `4images_users` SET `user_quiz_firstlevel`=`0.00`;
2.
UPDATE TABLE `4images_users` SET `user_quiz_level`=`0.00`;
Title: Re: [MOD] 4images Quiz V.1.0
Post by: bergblume on May 19, 2011, 06:53:09 PM
super, danke dir!

nachdem ich bei mir auch die "verschmelzung mit phpbb" verwende, musste ich dies anwenden:
Quote
1.
UPDATE `phpbb_users` SET `user_quiz_firstlevel`=`0.00`;
2.
UPDATE `phpbb_users` SET `user_quiz_level`=`0.00`;