PDA

View Full Version : vBQuiz 1.0


Pages : 1 [2] 3 4 5

Shokkka
06-16-2002, 10:29 PM
how do u "un install" it???

in my vb options theres the "vbquiz" thing 6 times wtf...

TWTCommish
06-16-2002, 11:09 PM
Shokkka: sounds like you ran one of the steps of the installation script way too many times. :)

Roxie
06-16-2002, 11:13 PM
Everything installed successfully, but when I go to the quiz.php page I get this error:

Database error in vBulletin 2.2.5:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Date: Sunday 16th of June 2002 08:07:33 PM
Script: http://odb.dayum.net/quiz.php
Referer: http://209.51.131.194:2086/scripts/command

josh929
06-16-2002, 11:15 PM
Fatal error: Call to undefined function: cpheader() in /home/somegood/public_html/forums/install_quiz.php on line 4

Can anybody at all tell me what's wrong????

TWTCommish
06-16-2002, 11:18 PM
Roxie: please read the instructions.txt file. It tells you how to deal with that, specifically.

Josh: upload the install_quiz.php file to your /admin folder, not your root folder. :)

Shokkka
06-16-2002, 11:33 PM
so twt how do i get rid of the 6 things in my vb options and how do i find out he tablesetid number???

i really wanna get this installed but... i need to know that number is :/

so if u could help maybe lol thats be great

TWTCommish
06-16-2002, 11:41 PM
You find out the templatesetid number by looking at your template sets and holding your mouse over the one you're using as your default. Around the end of the URL, you should see something like this:

templatesetid= -- after this, there should be a number. That's the one you want.

As for getting rid of the vB options groups: I'd start from scratch. Delete any templates you have and run this query on your DB:

DELETE FROM settinggroup WHERE title ='Quiz Options'

Then run this query (beware: this may not work proerly if you have certain other hacks installed):

DELETE FROM setting WHERE settinggroupid = 99;

Roxie
06-16-2002, 11:55 PM
doi! Thanks.

josh929
06-17-2002, 12:15 AM
TWTCommish: has the 350 error been fully resolved yet?

should I even try this (see below link), or wait for a further update?
https://vborg.vbsupport.ru/showthread.php?postid=261155#post261155

Thanks.

josh929
06-17-2002, 01:11 AM
also:

Your Score: 3 of 3 (99%)

Has this been resolved? Seems like it would be a quick fix.
:)

zootsuit
06-17-2002, 04:56 AM
Unfortunately, we uninstalled it too... still having the problem with the questions either not showing up or showing up on the wrong page or both.

Robert Basil
06-17-2002, 07:22 AM
I agree, this hack should have stayed in the Beta faze a while longer. Unfortunatly we are going to remove this from our community. :(

But thanks for all your hard work TWT, we hope to be able to get back to using your hack once some of the issues are resolved. :)

Shokkka
06-17-2002, 10:57 AM
I got mine working just i got 6 vbquiz things in my vb options lol

and the tables are all screwy and theres so many of em

RobAC
06-17-2002, 01:45 PM
This is an AWESOME hack and I've been looking for something like this for a long time.

The only suggestion I have is to allow a space where you can add in an explanation to an answer. In other words, offer a small explanation to the correct answer. Basically, this would just be another text field in the admin quiz panel.

-Rob

Roxie
06-17-2002, 01:54 PM
I get this nasty error when clicking the take the test button:

Fatal error: Unsupported operand types in /home/dayum/public_html/odb/quiz.php on line 350


I apologize if this has been posted by someone else. This thread is long!

Roxie
http://odb.dayum.net

TWTCommish
06-17-2002, 02:03 PM
Roxie: it has indeed. I'll be posting a fix just as soon as I can climb out from under my other obligations. Hopefully today or tomorrow.

Rob: excellent idea for the next version. 2.0 should be pretty flippin' cool if I can find time to implement all the ideas being bandied about in this thread!

Dean C
06-17-2002, 03:29 PM
can we have the templates in a zip file please cuz i need to revert to my original templates for the quiz... ?? :D

Shokkka
06-17-2002, 09:02 PM
how the hell do i get ridof the 6 things in my VB options :/

TWTCommish
06-17-2002, 09:04 PM
I already replied to that, I think.

josh929
06-17-2002, 09:07 PM
anyone know how to fix the 3 of 3 = 99% error?

TWTCommish
06-17-2002, 09:09 PM
Replace this...
$base = round(100 / $question_count);
$pct = $totalcorrect * $base;
...with this...
$base = 100 / $question_count;
$pct = ceil($totalcorrect * $base);

josh929
06-17-2002, 09:21 PM
will that make the percentage too high for other quizzes?

TWTCommish
06-17-2002, 09:22 PM
All it does is round up to the nearest percentage.

Joeri Blunt
06-17-2002, 09:29 PM
Great, now I hope you only fix the go to question 2 bug... ;)

Shokkka
06-17-2002, 10:38 PM
Originally posted by TWTCommish
I already replied to that, I think.

yea u did but could u explain in english? is all this stored in a mySQL table? or is it stored in a PHP file?

TWTCommish
06-18-2002, 01:41 AM
It's in a MySQL table.

Everyone: if you're having problems with the 350 line error, or were before, try the attached quiz.php file and please let me know if it works.

Boofo
06-18-2002, 01:58 AM
ok, I re-installed to try this one more time. :) It shows the answers to the questions but still does not show the questions when taking the quiz. No more errors though.

Originally posted by TWTCommish
It's in a MySQL table.

Everyone: if you're having problems with the 350 line error, or were before, try the attached quiz.php file and please let me know if it works.

TWTCommish
06-18-2002, 02:02 AM
Are you still using the modified quiz_question template from where I tried to fix the bug before? :) If so, that'd explain why the question isn't showing.

Boofo
06-18-2002, 02:05 AM
Ok, now you have me totally lost. What modified template? What post did you change that in? I thought I had been watching the thread pretty close, but it must have slipped by me. Hit me with it again and I will try it. :)

Originally posted by TWTCommish
Are you still using the modified quiz_question template from where I tried to fix the bug before? :) If so, that'd explain why the question isn't showing.

TWTCommish
06-18-2002, 02:08 AM
Open the quiz_question template, and replace this:

$questiondata[questiontext]

...with this...

$question[questiontext]

Boofo
06-18-2002, 02:16 AM
And we have a winner!!!

It works and it works well. :) Now, how do we get the border around it like we have in the other tables? Then we are all set for go! Good work! :)

Originally posted by TWTCommish
Open the quiz_question template, and replace this:

$questiondata[questiontext]

...with this...

$question[questiontext]

TWTCommish
06-18-2002, 02:18 AM
Well, which template you talkin' bout? :)

Boofo
06-18-2002, 02:21 AM
It's the one where you first come into the quiz. Check it out. :)

Quiz (http://www.bearfacts2.com/forum/quiz.php)

Originally posted by TWTCommish
Well, which template you talkin' bout? :)

TWTCommish
06-18-2002, 02:28 AM
In the quiz template replace this...


<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>

...with this...


<table cellpadding="{ tableouterborderwidth }" cellspacing="0" border="0" bgcolor="{ tablebordercolor }" { tableouterextra } width="{ contenttablewidth }" align="center"><tr><td>
<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>

Then replace this...


<table cellpadding="4" cellspacing="0" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>
$quizbits
</table>
...with this...

<table cellpadding="4" cellspacing="0" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>
$quizbits
</table>
</td></tr></table>
REMOVE the spaces...I had to add them to avoid parsing. :)

Boofo
06-18-2002, 02:36 AM
Are you sure it is the QUIZ template? I don't find anything like the first code in there at all. And I haven't changed anything in it.

TWTCommish
06-18-2002, 02:37 AM
Sorry, I edited my post about 20 times. :D Try it now.

Boofo
06-18-2002, 02:40 AM
I don't find it still. There is no width=95% in there at all.

TWTCommish
06-18-2002, 02:47 AM
Sorry, THIS forum was parsing those bb Code replacements. Try it now...but remove the spaces.

Boofo
06-18-2002, 02:56 AM
This is my quiz template. Something is definately different in mine for some reason. I added the extra spaces.

<html>
<head>
<title>$bbtitle - Quizzes</title>
$headinclude
</head>

<body>
$header

<!-- breadcrumb -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
<tr>
<td width="100%"><normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> $joiner Quizzes</b></normalfont></td>
</tr>
</table>
<!-- /breadcrumb -->

<br/>

<table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
<tr>
<td width="55%" valign="top">
<table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra }>
<tr>
<td width="100%" valign="middle" bgcolor="{tableheadbgcolor }"><normalfont color="{tableheadtextcolor }"><b>Recently Added Quizzes</b></normalfont></td>
</tr>
</table>

<table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra }>
$quizbits
</table>
</td>

<td width="1%">&nbsp;</td>

<td width="44%" valign="top">
<table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
<tr>
<td width="100%" valign="middle" bgcolor="{tableheadbgcolor }"><normalfont color="{tableheadtextcolor }"><b>Quiz Categories</b></normalfont></td>
</tr>

$categorybits
</table>

$easiest_hardest
</td>
</tr>
</table>


$footer
</body>
</html>

Originally posted by TWTCommish
Sorry, THIS forum was parsing those bb Code replacements. Try it now...but remove the spaces.

TWTCommish
06-18-2002, 02:59 AM
It looks the same to me, man. :)

Boofo
06-18-2002, 03:05 AM
Then show me where the first line of code you wanted me to change is at in my original code. :)

Originally posted by TWTCommish
It looks the same to me, man. :)

bandersen
06-18-2002, 03:19 AM
I still have the 2 x question.. then "you may not resubmit"....error.

X-Fan
06-18-2002, 06:12 AM
Same with me, bandersen, and have tried adding a new quiz, deleting that, then adding another one to no avail.

Any ideas to fix that bug, TWT? ASAP would be appreciated, as I really want to get this up and running at my forums!

And I'm not finding...


cellspacing="{ tableinnerborderwidth }"


(minus the extra spaces) in the quiz template, either.

Boofo
06-18-2002, 07:06 AM
Thank you! I knew I wasn't the only one who didn't have that in the quiz template. :)

Originally posted by X-Fan
And I'm not finding...


cellspacing="{ tableinnerborderwidth }"


(minus the extra spaces) in the quiz template, either.

cdcopyworld
06-18-2002, 09:15 AM
My quiz questions wont save:( dis anyone else have this problem? how did you fix it?

Thankyou

TWTCommish
06-18-2002, 12:26 PM
cdcopyworld: are you trying to add questions instead of the NUMBER of questions you want? The page that comes up on the Add Questions page first requires that you add the number of questions you want to add, then the number of answers for each, and THEN you're presented with a page where you can add the actual questions.

X-Fan: I don't understand the quiz problem. Can you give me a more detailed example?

bandersen
06-18-2002, 12:34 PM
Good morning, X-Fan and I seem to have this happening:

you go to take a quiz - things look normal - you mark a radio button and click "next question" - and you get the same question up again. You mark a radio button again and click "next question"... and you get "you may not resubmit".

TWTCommish
06-18-2002, 12:37 PM
Are you using the newly uploaded quiz.php file?

bandersen
06-18-2002, 12:48 PM
Originally posted by TWTCommish
Are you using the newly uploaded quiz.php file?

I uploaded the one in post#278... and it's working now! Thanks TWT... :)

bandersen
06-18-2002, 12:59 PM
One more question... the Email that is sent out... comes from "nobody@myhost.com" / with text "unprivileged user"... where do I change that?

The email address / text showing in the body of the email is ok tho.... Seem like the from / subject info shows up in the body of the email rather than where they should be.
The subject line with me looks like this: <!-- BEGIN TEMPLATE: email_quizresults -->

X-Fan
06-18-2002, 01:31 PM
The modified quiz.php worked for me, too. I hadn't tried it as you said it was for the 350 error, which I wasn't getting!

What was changed in the modified quiz.php that got it working, I wonder?

Anyway, now to start making some quizzes. Thanks, TWT!!!!

pgowder
06-18-2002, 01:33 PM
Great hack! Had it installed and working withing 10 minutes. I already have people taking them!

Is there a way to let users submit quizes? How about moderators? Can they submit them from the mod cp?

I'd like to let others submit them, so that I could take them without having seen the answers.

X-Fan
06-18-2002, 01:38 PM
I'd also like to know if it would be possible to randomize the question order, rather than having them come up in the order that they are entered?

If you allow a quiz to be taken more than once, it will be that bit more difficult if the questions are randomized rather than the same order as they were the first time you take a quiz.

TWTCommish
06-18-2002, 04:42 PM
bandersen: you'll want to turn off the template comments to fix that. As for the email problem...I think it might be an issue with your host, as the script, I believe, uses your contact email straight out of the vB Options table.

pgowder: I think it might work okay if you upload it to /mod dir, but I haven't tried it personally. The ability for users to submit quizzes is something I'm thinking of for version 2.0

X-Fan: randomizing would be a little bit of a pain, but it could be done. I see your point, and it's a good one. I'll give it some thought. I think, in version 2.0, it'd be good if you could very easily change the display order of the questions, and perhaps check a box to have them randomized each time. That'd be cool. :D

bandersen
06-18-2002, 05:19 PM
Originally posted by TWTCommish
[b]bandersen: you'll want to turn off the template comments to fix that. As for the email problem...I think it might be an issue with your host, as the script, I believe, uses your contact email straight out of the vB Options table.

Hi... where do I turn the template comments off.....?

New edit: Found it!! :glasses: Admin Panel..
Also the errors in From / Subject went away too.

pgowder
06-18-2002, 05:52 PM
I did upload it to the mod directory, and it appears to be working.

Thanks!

bandersen
06-18-2002, 07:11 PM
This is the restult I get when having 100% correct answers:

Congratulations, you have successfully passed this quiz. You correctly answered 11 of 11 total questions - a grade of 101%.

- Date: 06-18-2002
- Total: 11 out of 11
- Percentage: 99 percent

The template shows 99% on the top - next to the bars
The template shows 101% at the bottom.

This is what I have in the quiz.php:

$base = 100 / $question_count;
$pct = ceil($totalcorrect * $base);

Lionel
06-19-2002, 03:31 AM
this hack works well for me since day one. Is there a way to create subcategories?

X-Fan
06-19-2002, 07:16 AM
I've just changed my quiz options to allow a user to take a quiz once only. Problem is there's already been a few people take it multiple times.

How would it be possible to have the system remove all their recorded attempts except for their first one?

EDIT:

Well I manually removed the entries from the database via phpMyAdmin, but it would still be a lot easier to have an option to automatically remove multiple attempts except the initial one.

Also, is there any way to completely reset a quiz's stats without having to delete it?

cdcopyworld
06-19-2002, 08:20 AM
Originally posted by TWTCommish
cdcopyworld: are you trying to add questions instead of the NUMBER of questions you want? The page that comes up on the Add Questions page first requires that you add the number of questions you want to add, then the number of answers for each, and THEN you're presented with a page where you can add the actual questions.

X-Fan: I don't understand the quiz problem. Can you give me a more detailed example?

its not giving me the option on how many questions:( it goes strait to the add question and answer page.

thanks

TWTCommish
06-19-2002, 12:22 PM
What are you clicking on? You should be clicking on Add Questions, at which time you'll see three fields: a dropdown that allows you to select the quiz that the questions should be added to, and two text boxes...one for the number of questions, and one for the number of answers.

X-Fan: not automatically, no. But I'll consider that for a future release. And no, subcategories do not currently exist.

FleaBag
06-19-2002, 05:05 PM
Hell I was the beta tester for this and I didn't even realise it was released! Great work Chris! :)

TWTCommish
06-19-2002, 05:08 PM
Thats right, I'd forgotten! A HUGE thanks to GamerForums. His bug reports were completely invaluable to me.

FleaBag
06-19-2002, 06:09 PM
LOL...
* GamerForums takes a bow!
Just upgraded to 2.2.6 [a little late I know], with minimal intervention and no problems at all. Again, great work. :)

wolfe
06-19-2002, 09:43 PM
getting this error on my quiz.php file

Database error in vBulletin 2.2.0:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

TWTCommish
06-19-2002, 09:44 PM
Read the instructions. :p They tell you how to deal with that.

Boofo
06-19-2002, 10:05 PM
TWTCommish,

Any luck on the correct code for adding the lines to the tables for the quiz template? The code you gave me doesn't have the cellpadding part in it. :)

wolfe
06-19-2002, 10:10 PM
sorted now m8 but my quiz screen is now blank

TWTCommish
06-19-2002, 10:51 PM
wolfe: what do you mean? Are you sure the templates have been installed correctly.

wolfe
06-20-2002, 09:43 AM
well they said installed properly i am using VBB 2.2.0 does it work on that

TWTCommish
06-20-2002, 12:42 PM
I don't know, I haven't tested it there. Do you have multiple template sets?

RobAC
06-20-2002, 02:06 PM
Chris,

Are you still planning on coming out with a 2.0 version or are you just going to continue to add and/or correct this one? I've been holding off adding this till the 2.0.

-Rob

TWTCommish
06-20-2002, 02:07 PM
I'm definitely hoping to release a new version with several new features...but don't wait for it, as I can't guarantee it won't take awhile.

RobAC
06-20-2002, 02:09 PM
Ok,

Off hand, do you know if there's an easy way that I can add in the comment feature to 1.0 that I had mentioned a few posts back?

-Rob

TWTCommish
06-20-2002, 02:11 PM
I forget what you said exactly; could you go over it again?

RobAC
06-20-2002, 02:22 PM
Yep. When configuring a quiz, is it possible to add in a text field where the administrator would be able to add in some text (a comment) about the right answer. So when the user selects the right answer, the result is returned to them along with the comment.

This would be kind of educational if you wanted to expand a little more about the answer to the question. For example:

Are apples red?

Answer: Yes

Correct Answer - Yes.

Explanation: Apples come in many different colors, one of which is red.

Hope I didn't confuse your further. :)

-Rob

TWTCommish
06-20-2002, 02:27 PM
That'd be possible. Let me look into it and see if I can write up something quick. :)

wolfe
06-20-2002, 03:14 PM
i have 2 template sets but it installs on my defaule one don't it and it said Templates installed correctly :D

TWTCommish
06-20-2002, 03:35 PM
Yes. You'll need to run that portion of the script again and pass the proper templatesetid through the querystring.

Smoothie
06-20-2002, 03:38 PM
Originally posted by wolfe
well they said installed properly i am using VBB 2.2.0 does it work on that Works just dandy on 2.2.2 and I have multiple styles.

Pilot
06-20-2002, 05:48 PM
How do you edit the image for an existing quiz?

Pilot
06-20-2002, 05:49 PM
How can I stop the Email being sent - seems pointless - although a PM might be OK?

TWTCommish
06-20-2002, 05:56 PM
There is no way to edit the image yet...because I'm a moron. :D

As for the email (I don't think it's pointless, personally...it encourages them to take more quizzes, and, if you're resourceful, you can stick an ad in there).

To stop the email from being sent, find this (in quiz.php):

mail($userinfo[email], $subject, $body, "From: $bbtitle Mailer <$bbemail>");
...and replace it with this...
// mail($userinfo[email], $subject, $body, "From: $bbtitle Mailer <$bbemail>");

Lionel
06-20-2002, 05:58 PM
Originally posted by Pilot
How do you edit the image for an existing quiz?

the way that I am doing it is by uploading the new image into the directory, with the same name overwriting the existing one.

Boofo
06-20-2002, 06:00 PM
Did you get the border problem figured out (so it matches the rest of the site)?

Originally posted by Smoothie
Works just dandy on 2.2.2 and I have multiple styles.

TWTCommish
06-20-2002, 06:01 PM
Lionel: yep, that'll work. :)

Boofo: to be honest, I haven't been trying...I've been combing through the other problems so far...functionality over fashion, of course. :)

Pilot
06-20-2002, 06:03 PM
OK thanks - it looks promising - I will have my mods test it for a while. I do suggest an uninstall program to delete the database changes would be a good idea for those wanting to remove it or to re-install it.

Boofo
06-20-2002, 06:11 PM
The problems should pretty well be solved (at least the ones we had in the beginning). :) You have done a great job on fixing them. :) Once we get the display problems fixed, you should be all set for a much needed rest from this. :)

Originally posted by TWTCommish

Boofo: to be honest, I haven't been trying...I've been combing through the other problems so far...functionality over fashion, of course. :) [/B]

Lionel
06-21-2002, 03:47 AM
I do not know if this has been addressed before (there should be a hack to narrow a search within a thread). Looks like there is a pagination problem. I have 14 quizzes in one category and page 2 starts with the last quiz of page 1 and I am missing one quiz.

Whenever I try to disapprove, the last one of page 1 always duplicates itself at the top of page 2.

Lionel
06-21-2002, 04:05 AM
To solve my pagination problem, I went into the options. Since I have 14 quizzes, I changed my settings to display 14 quizzes. It says one of 14 but the actual count is 13.
I changed the display to 15 and they all showed up.

Harryli
06-21-2002, 02:31 PM
Hm, I now have 2 Quizzes, and one "Test" Quiz, but every Quiz always shows only the answers of the first Quiz without the Questions... I m using the new Quiz.php and changed the template to "$question[questiontext]"

You can try it at

www.schatzjagd.org/Forum/quiz.php

User tester PW tester

Dark_Wizard
06-22-2002, 11:30 AM
I am having major troubles as well and have no choice but to remove it from our site until all this is rectified. I have used the latest version and get db errors and quizzes that don't show or are out of order with the answers.

TWTCommish...I am sorry and this will be a great hack for my site once everything is fixed! Thanks for all your hard work!

TWTCommish
06-22-2002, 12:00 PM
You have to be more descriptive, Dark_Wizard. I'd guess that this "db error" is actually a very common problem that can be fixed easily and is described in the instructions.txt file. As for questions out of order: I haven't heard of anyone else having this problem with the new quiz.php file.

Martin64
06-22-2002, 12:28 PM
Very sweet hack, TWTCommish, and I admire your follow-up in this thread. Thumbs up! :)

An idea:

Is it possible to create a database of questions (lets say 100 questions), let the quiz select 10 or 15 of those randomly, and output them so that a user can take the quiz many times and get different questions every time?

Just a little idea, I think that would be excellent. Keep up the hard work. :cool:

TWTCommish
06-22-2002, 12:29 PM
Well, there's no super easy way to do that just yet, but I do think I'll have to write in a LOT more control over the questions for the admin in the next version.

Martin64
06-22-2002, 12:42 PM
Figured as much, I just wanted you to know that it might be a nice thing to implent in some future release if you've got the time. :)

I've installed v1.0 and will use several quizzes with users only being able to enter once instead. :)

Harryli
06-22-2002, 04:56 PM
OK, seems I loaded up the wrong Quiz.php, now it works, beside the 99 Percent "bug", I changed the php part as stated but still 99 Percent. One question: In which templates are the "View Quiz results" and "next Question" Buttons?

TWTCommish
06-22-2002, 04:57 PM
quiz_question -- but the text for the buttons is hardcoded into the file.

Harryli
06-22-2002, 05:03 PM
Got it and translated to german

Martin64
06-22-2002, 05:37 PM
TWTCommish: how about displaying the most recently added Quiz from the forum home, as well as high scores? Is that possible? Right now I just have a little text link and it's not very amusing. :)

I'd like to put it below Currently Active Users at my board. Cheers. :P

Lionel
06-22-2002, 06:31 PM
Originally posted by Martin64
TWTCommish: how about displaying the most recently added Quiz from the forum home, as well as high scores? Is that possible? Right now I just have a little text link and it's not very amusing. :)

I'd like to put it below Currently Active Users at my board. Cheers. :P

The way I did that was to copy quiz.php into quizhome.php and then I had quizhome.php called a renamed template of the main quiz template. I edited that one to my needs. :bunny:

Martin64
06-22-2002, 06:52 PM
Originally posted by Lionel


The way I did that was to copy quiz.php into quizhome.php and then I had quizhome.php called a renamed template of the main quiz template. I edited that one to my needs. :bunny:

It would be nice with some exact instructions, I'm not that great at this. :P

Pilot
06-22-2002, 08:21 PM
Can you fix it so the author user is entered as their username and not their user number?

How can I extract a list of high scores or a leader table for display on my home page (or forum index)?

What's the best way to integrate this into a VB site?

TWTCommish
06-22-2002, 08:24 PM
Can you fix it so the author user is entered as their username and not their user number?
I could...but I'd rather not bother unless some others are interested.

How can I extract a list of high scores or a leader table for display on my home page (or forum index)?
That depends on how you want it to display.

What's the best way to integrate this into a VB site?
I'm afraid that's far too subjective to answer. Personally I just link to the file right now.

bandersen
06-22-2002, 09:13 PM
I upgraded to 2.2.6 and lost the navbar / admin panel for quizzes. Is it the admin/index.php part of the installation I need to do again?
Anyone else found more missing after an upgrade?

TWTCommish
06-22-2002, 09:15 PM
/admin/index.php should be the only part you need to re-edit. :)

Boofo
06-22-2002, 09:15 PM
I think an option to use the username AND the id number would be a good addition. Also, a listing on the forum home like Total Quizzes going and maybe the best quiz score with the score and the username might be cool, too. Like they do with Total threads Today and such. :)

Originally posted by TWTCommish

I could...but I'd rather not bother unless some others are interested.


That depends on how you want it to display.

Rose
06-22-2002, 09:46 PM
I apologize if this problem has been posted, I tried sorting through twenty pages before giving up. *lol*


I seem to have everything okay, I haven't quite figured out the quizzes, but I haven't tried yet, either.

My problem is my templates. I have three styles. The 'quiz' templates were jsut added to the default. Around page 6 or so, a fix was made by TWT for this by running the first page of the script with the templatesetid number added to add the templates to the other styles.

Now that they are all added, my templates look....weird. When I go to temlpates, and click on "show all templates", instead of the normal list I get this -

(see attached)


Any suggestions? I'd really like to see my templates again, as this way is confusing. All the links that say "change original" next to a bullet are empty. :s :( However, nothing seems to be messed up on teh board, so that is good.

TWTCommish
06-22-2002, 09:48 PM
I've had similar problems, but long before the quiz hack...I think this may be due to the imcompatibility error pre 2.2.6 versions of vB have with recent versions of PHP. Did your host upgrade their PHP installation recently?

bandersen
06-22-2002, 10:11 PM
Originally posted by TWTCommish
/admin/index.php should be the only part you need to re-edit. :)



OK done and working just fine - for all hacks added ex. the query hack! Puh.... :cool:

amykhar
06-23-2002, 05:13 AM
This is a great hack. My users love it. I ended up making the quiz templates part of the built in set so that all styles can see it.

I have a couple of small issues. One being the rating of hardest/easiest quiz. I belive that should be based on percentage correct, not actual number correct.

Amy

Pilot
06-23-2002, 03:05 PM
Well, I don't know how to make this option available in the main site other than just having a static URL link in a template.

Really need something dynamic like XX quizes available or a high scores table for the most recent quiz - something like that.

A piece of PHP code that showed the number of quizzes available and a leader table (maybe over all quizes) would be the ideal way to create interest and attract members to the quiz area.

Just saying "quizzes here" is not going to do much. But I am not a coder so am looking for assistance here - depends whether you are interested in your excellent hack being really used or not.

TWTCommish
06-23-2002, 03:07 PM
Well, first off, I can't say I appreciate your tone. It IS being used...many people have told me so...the people on my site sure dig it. Fact of the matter is a lot of areas on vB are just linked to: the User CP, the Members List...why is this suddenly different?

However, yes, there are better ways to attract more attention to it...I'm just more concerned with sorting out all the bugs and templates and improving the more basic features and necessities for the next version first, though.

Martin64
06-23-2002, 03:11 PM
I absolutely agree with you, TWTCommish. I added this hack yesterday and submitted my own quizz which has been taken by 66 members already. :)

People love this new interaction feature so much that they have already submitted 5 new quizzes for me to add. Thank you. :)

Steve Machol
06-23-2002, 05:49 PM
TWTCommish, given some of the responses here I can understand why some people don't want to release hacks anymore. You are to be commended for your patience and perserverance. Good job!

TWTCommish
06-23-2002, 07:27 PM
Thanks. :) Most of it doesn't bother me...'cept for the folks who don't read instructions.txt, and post here instead. Grrr! :D

It comes with the territory, though. :)

Rose
06-23-2002, 09:21 PM
Originally posted by TWTCommish
I've had similar problems, but long before the quiz hack...I think this may be due to the imcompatibility error pre 2.2.6 versions of vB have with recent versions of PHP. Did your host upgrade their PHP installation recently?


Hmmm. I don't know if they did or not (assuming this is directed at me, of course). I didn't realize that it might not work on 2.2.5, I must have missed that in the instructions somewhere. :(


Is there a way to 'undo' it? Uninstall?

TWTCommish
06-23-2002, 09:24 PM
Well, if the problem is the one I described, then whatever you do with the Quiz hack is irrelevant. Could you ask your host if they've upgraded PHP recently? That might provide some insight...

Martin64
06-24-2002, 12:29 AM
In case someone wants to have their easiest and hardest quizzes on the forumhome, I did a little modification of this hack so that it displays them below online users (in my case). :)

Check out the attached screenshot, or view it at www.emutalk.net

If there's interest I can explain how I did it (probably not the smoothest way since I don't know much about php :p)

Boofo
06-24-2002, 06:41 AM
Looks great! I'd definately be interested in seeing how it was done. :)

Originally posted by Martin64
In case someone wants to have their easiest and hardest quizzes on the forumhome, I did a little modification of this hack so that it displays them below online users (in my case). :)

Check out the attached screenshot, or view it at www.emutalk.net

If there's interest I can explain how I did it (probably not the smoothest way since I don't know much about php :p)

X-Fan
06-24-2002, 07:24 AM
Me too, thanks Martin!

Martin64
06-24-2002, 09:50 AM
Here's the attached instructions, please backup your files before starting :classic:

X-Fan
06-24-2002, 10:38 AM
Works great, thanks Martin!

bandersen
06-24-2002, 11:27 AM
I am still having the % show with 99% and 101%, see quote.
Am I the only one?

Originally posted by bandersen
This is the restult I get when having 100% correct answers:

Congratulations, you have successfully passed this quiz. You correctly answered 11 of 11 total questions - a grade of 101%.

- Date: 06-18-2002
- Total: 11 out of 11
- Percentage: 99 percent

The template shows 99% on the top - next to the bars
The template shows 101% at the bottom.

This is what I have in the quiz.php:

$base = 100 / $question_count;
$pct = ceil($totalcorrect * $base);

wolfe
06-24-2002, 12:48 PM
right i have 2 styles and the Quiz only seems to e wroking on one style but i have installed Templates on both whats up with it :(

RobAC
06-24-2002, 04:35 PM
Chris,

Any luck with the comment feature. :D

-rob

Velocd
06-24-2002, 09:20 PM
I'm sure this has been asked, but I haven't read through the threads yet. Since there is a approval setting in the admincp, why not give members the permission to submit their own quizes, then the admin can approve of them? If this is already available, where can I find that option then?

Also, what is the image upload for on a quiz? I uploaded my image yet I don't seem to see it in the real quiz interface on my forums...

Velocd
06-25-2002, 08:56 AM
bump ^

TalkHardRandy
06-25-2002, 04:08 PM
It will be in version 2.0 according to TWT...

Link14716
06-26-2002, 09:31 PM
Hmmm......

Database error in vBulletin 2.2.6:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Date: Wednesday 26th of June 2002 11:29:30 PM
Script: http://mb.vggmn.com//quiz.php
Referer:


Does anyone know how to fix this?

TWTCommish
06-26-2002, 11:06 PM
Link: read the instructions.txt file, please. It explains that problem specifically. That's why I put it there, basically...so avoid posts like this.

afterlab
06-26-2002, 11:43 PM
Good job on the hack, TWTCommish. I installd it a few days ago, and my members love it! I rated this hack 5/5.

Sorry about not beta testing it earlier, we've had some hacker issues around my forums the last few weeks. I'll be ready for the next one! :rambo:

Rose
06-27-2002, 03:17 PM
Originally posted by TWTCommish
Well, if the problem is the one I described, then whatever you do with the Quiz hack is irrelevant. Could you ask your host if they've upgraded PHP recently? That might provide some insight...


It looks like they have upgraded to PHP 4.2.1 in the last week or so.

I have removed the quiz tables from the database and unedited the php files. My templates are still a mess. Is there a way to fix this?

Please? :(

TWTCommish
06-27-2002, 03:18 PM
The problem is not with the hack...the problem is with vB 2.2.5 (and other earlier versions, I think), which has a compatibility problem with newer versions of PHP. Upgrading to 2.2.6 should do the trick.

pgowder
06-27-2002, 07:41 PM
Is there a way to display scores on the main page and in high scores as a percentage.

Since I have quizes with different number of questions it is hard to judge which scores are great or poor.

Thanks

patvdv
06-27-2002, 09:19 PM
Hi TWT,

I am trying to setup the hack on my testboard (vb 2.2.4, php 4.1.2). I ran into the initial template problem but that is fixed now. However I cannot add any quizzes, submitting the 'Add Quiz' form just returns a blank page to me. Adding a category worked fine.

Any ideas?

TWTCommish
06-27-2002, 09:27 PM
A blank page? Hmm. Go to the "Approve" area...is the quiz waiting there for approval?

Smoothie
06-27-2002, 09:38 PM
TWTCommish-

any word on a new version?

patvdv
06-28-2002, 05:49 AM
Originally posted by TWTCommish
A blank page? Hmm. Go to the "Approve" area...is the quiz waiting there for approval?

Nope, no quizzes found. I checked the database tables and no info gets uploaded in there either. Very strange...

bonnmac
06-28-2002, 05:56 AM
This is an EXCELLENT hack! Thanks so much for sharing it with us. I've got the hack working fantastically but I have one small (prolly dumb) question. I'd like to add a link to it in my "forum jump" dropdown menu. How would I do that?

fixer
06-28-2002, 09:20 AM
many thanks for this hack.

it works great.

but how to include a picture within the question text?

for example
if the question is:

Identify the cell at the tip of the arrow:
the picture goes here

1. eosinophil.
2. platelet.
3. erythrocyte.
4. neutrophil.

---------------------------

could u please help me to do this

TWTCommish
06-28-2002, 12:04 PM
Try using the [img] vB Code tag there...the question's text IS parsed for it, I think.

fixer
06-28-2002, 12:30 PM
i did but it shows a picture url only.

and i changed it to be like this

<img border="0" valign="center" src="http://pictureurl.gif">

and the picture is shown only in the cp, not in the question page

AndyTSJ
06-29-2002, 01:39 PM
Any updates happening for this script ?

Velocd
06-30-2002, 08:27 PM
I only have one question, and that is what is the purpose of the image upload for the quiz? I'm not seeing where this image is actually displayed when you view the quizzes. Was this just put in here but not actually used?

Velocd
06-30-2002, 09:29 PM
Never mind, figured it out. I did not have the "quizzes" image directory..strangely though, all the other times I kept submitting the quiz with the image it never gave me a warning. Nevertheless, problem solved ^_^.

Erwin
07-01-2002, 02:53 AM
Thanks - it works great the first time I installed it, with no bugs! Good job!!! :D

Smoothie
07-01-2002, 03:16 AM
TWTCommish-

Do you think there will be an update to this fine hack to allow members to submit quizzes? :)

Hollenthon
07-01-2002, 05:41 AM
I saw the quiz powered by vBulletin and I have the following question.

It's possible for "the quiz" to track the score of a user in all the quiz that he participate ?

So, if a user take 3 differents quiz I will be able to see the overall score in this 3 quiz ?

I need that because I what to make many quiz within a month and the overall winner will receive a price.

Thanks.

JoshFink
07-01-2002, 05:02 PM
Ok.. I was looking at TriviaShock and then I saw this addon. Looks great..

Question though.. Does anyone have any quizzes already made up that they can share? I am absolutely horrible at that kind of thing, but I know my users would LOVE it...

Thanks

Josh

Chris M
07-02-2002, 06:19 PM
@Josh...

Ive made 2 Quizzes @ The Lyceum...

The Lyceum Quizzes (http://www.thelyceum.org/forum/quiz.php)

@TWTCommish - Great hack...Installed with no problems...

Just a suggestion for the next version...

Could you sort of add an extra bit, where it shows how many Quizzes you have made in your Profile? Or, better still, instead of linking to the Maker's name in the Quiz Profile, could you instead link to some sort of Quiz Profile page, where it shows how many Quizzes whoever has made, and put them in a Top 10 Ranking kinda thing?

Satan

JoshFink
07-02-2002, 06:22 PM
Now, how do we actually go about sending quizzes to each other? :D

Josh

Chris M
07-02-2002, 06:22 PM
Originally posted by Hollenthon
I saw the quiz powered by vBulletin and I have the following question.

It's possible for "the quiz" to track the score of a user in all the quiz that he participate ?

So, if a user take 3 differents quiz I will be able to see the overall score in this 3 quiz ?

I need that because I what to make many quiz within a month and the overall winner will receive a price.

Thanks.

Hollenthon - Just look at each Quiz, and find that Username...Then add up their scores and take an average...

Originally posted by Smoothie
TWTCommish-

Do you think there will be an update to this fine hack to allow members to submit quizzes? :)

Smoothie - Yes...This would be a great addition...I recommend this, but also make it so they have to be approved...

Satan

Chris M
07-02-2002, 06:23 PM
Hmmm...

How about I email it to you?

Satan

Chris M
07-02-2002, 06:32 PM
Emailed...

Satan

Rose
07-02-2002, 07:58 PM
Originally posted by TWTCommish
The problem is not with the hack...the problem is with vB 2.2.5 (and other earlier versions, I think), which has a compatibility problem with newer versions of PHP. Upgrading to 2.2.6 should do the trick.


Thanks, TWT! It worked like a charm. :)

Hollenthon
07-02-2002, 10:36 PM
Originally posted by hellsatan


Hollenthon - Just look at each Quiz, and find that Username...Then add up their scores and take an average...

Satan

Culculate the avrage of 300 users: hell of a job !

Gazer
07-03-2002, 08:09 PM
Hmmmm this is what i get trying to install this hack

Database error in vBulletin 2.2.5:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Date: Wednesday 03rd of July 2002 05:05:10 PM
Script: http://www.world-of-digital.com/forums/forums/quiz.php
Referer:

Does this mean anythink to anyone cheers
I have tried both quiz.php files
Plus i tried it on my test board 2.2.6 and its the same.

This is were it is: http://www.world-of-digital.com/forums/quiz.php

Regards Gazer.

TWTCommish
07-03-2002, 08:57 PM
I don't mean to be rude, but if you'd read the instructions.txt file you'd know exactly how to fix that error.

Chris M
07-03-2002, 08:59 PM
Lol...

Yes...The instructions do tell you how to correct some errors that might occur, but there should be no hassle on 2.2.6...

Satan

Gazer
07-03-2002, 09:10 PM
Right this is the text file i have.
but i can't find anythink about this error in there,

is this the right text your on about

Regards Gazer.

Chris M
07-04-2002, 10:24 AM
Have you ran the install_quiz.php file?

Satan

Chris M
07-04-2002, 10:26 AM
TWTCommish...

I have another Suggestion...

Could a custom failure/passing message be made?

I.e. - I have a Star Wars Quiz, and Id like the Star Wars failure message to be something like :

You have failed me for the last time, my young apprentice...

And the passing message to be something like :

Well done my young apprentice...May the force be with you always...

Possible?

Satan

Gazer
07-04-2002, 10:56 AM
Have you ran the install_quiz.php file?

How can i run it when iam getting: Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz :confused:

Regards Gazer.

Chris M
07-04-2002, 01:34 PM
Because the "install_quiz.php" file is the file that installs the "quiz" table...

You have to run it as part of your installation...Upload it to the admin folder, and then type the url to it...Follow the instructions, and then it should work:)

Satan

pgowder
07-04-2002, 02:00 PM
Repost:

Is there a way to have percentages and not scores show up in high scores?

xug
07-05-2002, 03:36 AM
TWTCommish, One Cool Hack!!

Would be cool to see in future release or addon for this release where we can edit the images in an easy way, I have to jump into my database.

Logician
07-06-2002, 11:22 AM
I have recently found time to check it out and I'm impressed. Very nice and valuable addition to vb and it's very obvious that many hours committed for coding and developing this major project.

Everything seems fine in my local test board installation and I also want to mention that installation is designed very nicely and it's very easy and smooth for such an advanced hack.

Congratulations.. :)

Logician

GrayFOX
07-07-2002, 09:48 AM
can somebody tell me how to make a quiz?
I have trie it but it's didn't runs.
If I create a Quizzes and now I want to make a question it fals.
can somebody help?

Smoothie
07-07-2002, 04:23 PM
Quick question. Can vBQuiz be used as a stand alone quiz file, independent of vBulletin? If so, how?

Itworx4me
07-08-2002, 12:42 AM
TWTCommish, How hard would it be to add a image to the quiz? I want to use an image of a person and have them guess who the picture is.

morrow
07-08-2002, 07:56 PM
I've installed this hack but when I try to run the admin, I get a blank page. Any suggestions?

Thanks in advance!

bitbender
07-09-2002, 12:03 AM
TWC - OUTSTANDING hack - I've been following along for a month. Installed yesterday - Functional today - VB 2.2.3 !!

Thank you very Much !!

There are oodles of free quizzes to be had, by just doing a "google" search on quizzes.. You will have to 'make' up incorrect answers for the questions, and that can take some research, but I know my members will love it !!

Demascus
07-09-2002, 08:10 PM
WOW TWT,

Good hack!!! I read the instructiobns properly, followed them to the letter, and it worked 1st time for me.

Only thing I had to do is link to the quiz from my header template, which is of coutrse basic.

I bet you don't write an update though, not after 29 pages of people asking the same questions, some that were explained in the instructions.

Infact, I'd be suprised if you ever post a hack again man!

Damn fine work!

bitbender
07-09-2002, 08:17 PM
Thats a Fact, I agree, Demascus !!

I do have one question, thou.. from analysis of the adm_index code, it seems fairly simple to open it up for mods...
Or am I exposing something bad by changing that first require statement ? I tried it on my test server, and it worked well from the forum/mod/ folder, and allowed my dummy mod username to perform all functions...

thanks, Bits

Smoothie
07-09-2002, 09:02 PM
I would interested in what code you have to change (if any) to allow mods, or even a certain user group to add quizzes.

Anyone?

bitbender
07-10-2002, 12:02 AM
well, if TWTcomish says what I did was ok, Is fine with me, but imo, I did it clumsy, and redundant. I read thru the admin_quiz.php code and saw how it was doing it's outside directory references. In my "limited" knowledge, that seemed to be the only problem it was going to have in it's execution, if it were copied to the /mod folder for access via MOD Cp .

My board uses PHPortal as a front end, so I was able to alter the copy of admin_quiz.php I put in the /mod folder, nd it seemed to work. I tested it using a username who is SUPERMODERATOR usergroup on my test server.

WHAT I changed was the require statement for the globals..

from: require("./global.php");

To: require("$nukeurl/BBF/admin/global.php");



Be kind...Career Programmer, but relative n00b to PHP..Just 9 months young...

RobAC
07-10-2002, 04:26 PM
Chris,

Any progress on adding a comment field in addition to the answers as I described previously?

-Rob

CFde
07-12-2002, 12:53 AM
The hack ist great and workes fine for me. But as said before I think the hardest and easiest quiz funktion says nothing without a percentage scoring. Is this addition to hard to do for version1 of the hack ? But again - its one of the best addition for vBB !

Originally posted by Martin64
Here's the attached instructions, please backup your files before starting :classic:

workes great - can you also make an addion witch display the latest new quiz below the easieast and hardest quiz on forumhome ?

bitbender
07-12-2002, 03:34 PM
For those wanting to use the quiz entry outside the admin range, wait for VBquiz 2.0. The method I used was unreliable, and unrepeatable on my live server.

The differences between my two environments are the PHP level, and Red Hat levels, but moreso the fact that the rack I lease uses Ensim as a domain manager, and it file system mapping is very different than my test server. The global includes are not processing the same as they do on my local server, so the script just flushes thru; none of it's IF statements are true.

I am still trying to find out why it works ok locally (test server), but I didnt want to mislead anyone by my earlier post (#428).

Rather than hack apart a manificent piece of work as this, I'll defer until the authors publish an upgrade.

I apologize if I have wasted anyones time, other than my own..

CFde
07-12-2002, 05:05 PM
Another question - is it possible to display on the frontpage of quiz.php (where the latest quizzes, Categorys, easyest und hardest quiz is) below easiest and hardest quiz the following:

"Last Quizzers"
Username - Quiz
User DRF did Testquiz
User ETF did The movie Quiz
User blabla did Star Wars Quiz
....

How can I do this ?

CFde
07-14-2002, 10:01 PM
Here are some other very usefull things fors the quiz witch came from my forum users.

1. Links on on Correct/Incorrect Page: It should be possible to name a link on the correct/incorrcet page. Where the Quizzers can find and prove the right answer.

2. Commentarys on Correct/Incorrect Page: same as above. Quizmakers should there can describe the correct answer. Maybe you can put 1 and 2 into 1 Field.

3. Question Statistik: so that quiz creators can see how often (in %) a question was solved correct or incorrect.

4. Quiz Rating: User should have the option to say how they liked the quiz. This could be done like thread rating or in a scale from A to F like in school

Thanx - the quiz is booming on my board.

TWTCommish
07-16-2002, 06:27 PM
I'd like to respectfully ask the people reading this to PLEASE keep all requests for support within this thread...I cannot offer support via email, PM, or IM. If I did, it wouldn't be long at all before I found myself spending more time troubleshooting with people than I I'd spent on the hack itself, by far.

Read the instructions included with the hack, and read through the thread if need be.

Thank you. :)

xug
07-17-2002, 10:11 AM
TWTCommish

Could you make a quick fix so that when I want to edit a quiz to change the image I can do it through the edit template instead of me going into the database??

Maybe a cool idea for a future release is to be able to set a limit for the image and/or a trick that uses image_magick which resize the image to the limit that is set.

bandersen
07-18-2002, 08:49 PM
can someone please let me know how guests can view the quiz page, but not go any further and take the quizzes? Now, the log in page shows right away.... I would want them to see some more and have them sign up to take the quiz.

Velocd
07-18-2002, 09:30 PM
I'm not sure if this will just remove it from the main quiz page, or all of them, so you'll have to try..

In quiz.php, remove the

if ($bbuserinfo[userid]==0) {
show_nopermission();
}


But if my assumptions are correct, it might remove it from all pages....

Dean C
07-19-2002, 02:29 PM
ive done a fresh intall of this...

and it ran fine... i have had no errors anywhere.... but none of my templates were added :(...

bandersen
07-19-2002, 04:22 PM
Originally posted by Velocd
I'm not sure if this will just remove it from the main quiz page, or all of them, so you'll have to try..

In quiz.php, remove the

if ($bbuserinfo[userid]==0) {
show_nopermission();
}


But if my assumptions are correct, it might remove it from all pages....


Yes, you are right..... it did. Anyone know where I should put it in again to remove the log in on the main quiz page, but keep it on the following pages?

I still get 99/101% when I score a 100%....

king sting
07-19-2002, 09:02 PM
i just have a simple question.. maybe yall think i'm stupid.. but i installed everything and its all there.. but i dont know where to go to add a quiz.. in the vbulletin options it allows me to change like the amount of questions and stuff.. but where do i add a quiz at? and it allow people to take the quiz do i somehow have to link www.mydomain/forums/quiz.php to a forum on the board? uhh.. damn my head hurts.. haha.. anyhelp would be great! :nervous:

dprice
07-20-2002, 04:15 AM
I re-ran the install_quiz.php to add quiz templates to my main default template.

I accidently hit Step 2 and now I have TWO [Quiz Options] in the VB Options. Where do I go to remove the second addition?

Thanks

Dean C
07-20-2002, 09:14 AM
^ i have the same problem

pool-werbung
07-20-2002, 09:44 AM
On my site - it works very fine.

king sting
07-22-2002, 12:01 AM
can someone tell me how to add a quiz?

TWTCommish
07-22-2002, 12:49 AM
Under "Quizzes" choose "Add." :D Make sure you approve it afterwards, too, and add questions to it.

king sting
07-22-2002, 03:11 AM
oh ok.. hahah.. thanx.. how do i link a quiz to a board tho?

Hubsi
07-22-2002, 10:06 AM
I have 4 templates and styles

when i run the quiz.php it´s always in the default-style

the templates was only write into the default template-set

what have i to do?

TWTCommish
07-22-2002, 10:23 AM
However you want...just create a link in your header somewhere, for example. There is no standard way. Whatever fits.

Hubsi: read through some posts a few pages into this thread, the template problem has already been discussed at great length.

Hubsi
07-22-2002, 08:48 PM
thx very much :)


is there a way to make it that supermods can add quizzes too?

Hubsi
07-23-2002, 09:46 AM
@ TWTCommish
i have make the quiz in german, is it ok to share it?


Edit: in the table "easyest quiz" and "hardest quiz" the quizzes are chosed by the avg points
but this is wrong i think
is there a way to make it witz the percents

Keith
07-24-2002, 01:16 AM
Followed the instructions, line by line, step by step, this hack installed and ran fine on my 2.2.5

Nice job.

I've read all 31 pages of the thread. I wanted to know how to simply delete myself from the database now since I took the first quiz myself as a test. I have access to the mySQL database, but don't know if I need to "Drop", "edit" or Delete from quiz_results to delete my entry? This may also come in handy if I need to take some other people out of the scores area so they're not too embarrassed. :D

BrAinZ
07-25-2002, 08:47 PM
Testing this hack on my test server at the moment.. Just a point.. I don't think you actually need the references to $bburl in the templates.

This caused my test server (on my laptop) running locally to try and connect to the "real" server on the internet.

I just deleted the $bburl in the templates and it works fine.

Ninth Dimension
07-26-2002, 01:21 AM
Help, i'm getting the following error message when going to quiz.phpDatabase error in vBulletin 2.2.6:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Date: Friday 26th of July 2002 03:17:55 AM
Script: http://gamevine.co.uk/forum/forum/quiz.php
Referer:
I followed all the instructions and have added a cat and a quiz, please help :)

The file is located at http://gamevine.co.uk/forum/quiz.php

EDIT, my bad, please feel free to ignore me, cool hack :)

dreamhost
07-26-2002, 09:50 AM
This rates up their with some of my favorite hacks, and I've installed close to a hundred. The instalation went without a hitch. I use 3 styles, unfortunatelly board style is 3. But it was np just going to default style, clicking edit and changing to new style set and saving. My bad, should have read the 23 pages first. This has installed perfectly. Thanks for such a huge hack.

BigJohnson
07-26-2002, 10:02 AM
There is a lot to read through this post. I have the newest version of the quiz but the only prob I am having is that I cannot see my questions when people go try to take the quiz. How can i fix this. All they see is the answers to choose from.

TWTCommish
07-26-2002, 10:57 AM
BigJohnson: I suspect you're using the template modification mid-way through the thread. Don't. :) Use everything from the first post.

Mr L
07-28-2002, 08:47 AM
TWTCommish,

I have installed this Quiz last night and my members absolutely love it. A great reponse by them, thank you!!!! It installed quickly, easilly and was trouble free.

I have a question tho and a suggetsion.

The question is, can you stop it displaying the answers once the quiz has been taken.

This is the suggestion, unfortunatly I don't the he PHP skills to do this tho.

How about a "Betting" option on it. For those people that have "Lesane's Store", a chance to bet points on if they are going to pass or fail the quiz. This would mean that only one quiz could be taken at once. However, they could double or lose all the points that they bet.

Cheers.

Harvey.

TWTCommish
07-28-2002, 10:32 AM
I wish I had the time to right a betting add-on like that to hook up with Lesane's hack, but I don't. Not by a long shot.

As for the results page: just edit the "quiz_results" template (I think that's the name of it)...no PHP skills required...just HTML. :)

Vile
07-30-2002, 08:07 AM
Ok, I got the quiz hack installed, and even added a quiz with all the questions. Question is, how do I post the quiz, or take it?
BTW, I did to to admin cp and approve it.

Thanks.

TWTCommish
07-30-2002, 09:57 AM
Go to this file:

http://www.yourboardurl.com/forums/quiz.php

tractor-beam
07-30-2002, 03:16 PM
Howdy,

I searched through the posts and couldn't find my answer. I have a sample quiz which has ten questions. I user got 9/10 correct and it shows a score 0f "9".

How can I get the quiz to show either "9 our of 10 correct" or "90%" correct?

Thanks!

- Gerry

Vile
07-30-2002, 05:47 PM
Originally posted by TWTCommish
Go to this file:

http://www.yourboardurl.com/forums/quiz.php
Just get a blank page:(

Tim Wheatley
07-31-2002, 08:04 PM
Originally posted by TWTCommish
Here's a new install_quiz.php file. Here's how it can help you (I hope :D): find out what the templatesetid is for your primary template set. Then, instead of going to this URL to insert the templates...

http://www.yoursite.com/forums/admin/install_quiz.php?step=1

...go to this one...

http://www.yoursite.com/forums/admin/install_quiz.php?step=1&setid=X

"X" of course should be replaced by the templatesetid number. Of course, you'll need the attached file in place of the old one, too. Let me know if it works. :)

Thanks. Works great.

Just one thing... can you add a link to this in the first post? I had to run through 6 pages. :)

mersey
08-03-2002, 09:38 PM
Thanks for a great hack, its work well :)

tractor-beam
08-04-2002, 01:02 AM
This hack DOES work great! But, my users are asking me if they can go back and look at their own quiz results to see what they got right or wrong. Is there any way to do this currently but I am missing it?

Thanks!

- Gerry

JGM007
08-04-2002, 03:43 AM
TWTCommish, just wanted to say the install went smoothly and great hack! thank you!!

king sting
08-04-2002, 04:56 AM
damnit.. where do the quizes go after you make em? how do i have em seen so people use em?

tractor-beam
08-04-2002, 10:44 AM
Originally posted by king sting
damnit.. where do the quizes go after you make em? how do i have em seen so people use em? You have to Approve the quiz after you make it.

Click on the Approve button on the left hand side, right below where you had to click the "Add" quiz.

- Gerry

ryancooper
08-04-2002, 08:50 PM
OK i followed the instructions exactly. Installed quite easily i must say But I go to my quizz page

http://www.talkdisney.com/forums/quiz.php

and I get


Database error in vBulletin 2.2.6:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Date: Sunday 04th of August 2002 05:48:23 PM
Script: http://www.talkdisney.com/forums/forums/quiz.php
Referer:


Any ideas?

TWTCommish
08-04-2002, 08:52 PM
No, you did not follow the instructions file exactly. Try again. :) Methinks you missed the step about "confirming" the new options on the vBulletin Options page after installation.

ryancooper
08-04-2002, 09:48 PM
Now All i get is a blank page? But you were correct I did miss that part (Opps)

TWTCommish
08-04-2002, 09:52 PM
Do you have multiple template sets?

ryancooper
08-04-2002, 09:53 PM
yepper

TWTCommish
08-04-2002, 09:55 PM
I think, a few pages into this thread, you'll find an updates installation file that you can run along with some instructions on how to have the templates installed into the correct template set.

ryancooper
08-04-2002, 09:56 PM
OK great thank you. I will look now

ryancooper
08-04-2002, 10:04 PM
Beautifull, Works like a charm!

5 stars!

ryancooper
08-05-2002, 01:48 PM
Got it working Beautifully the only problem now is after adding the templates to each style I have 5 quizz options in my admin C.P

How can I get rid of 4 of them?

Chris M
08-05-2002, 01:58 PM
Goto PhpMyAdmin, and open the "settings" part of your board...

Just drop 4 of the 5 there...

Satan

ryancooper
08-05-2002, 02:26 PM
Great thank you.

ryancooper
08-06-2002, 12:57 PM
One more question, is it possable to have the most recently added quizzes apear in a block using VBPortal?

Tim Wheatley
08-06-2002, 08:26 PM
Just want to tell you I installed this and the members on the board love it. It's being heavily used and with the fixes I've read through this thread and found it works perfectly - thanks. :)

http://forum.racesimcentral.com/quiz.php

Hollenthon
08-08-2002, 01:03 AM
It's possible to make a add-on that will do the compilation all the results of a user ? Will it be easy ?

Exemple, a user make 3 quiz and the script can give the overall result for that 3 quiz, by doing this we will be able to see the "best" user...

The quiz will be updated for vBulletin v3.0 ?

memobug
08-08-2002, 06:51 AM
Greetings,

After reading through 33 pages of this and visiting some of the sites, I have to say GREAT HACK, but even better support.

I am wondering though: I saw two questions from users who wanted to insert images as part of the questions. One tried and couldn't (post 392-394) and another (post422) that asked the same question but no reply as yet.

Is embedding images (and having them show) in the Quiz question or answer possible, and has anyone done it successfully?

Regards,

Matt

Martin64
08-08-2002, 11:32 AM
Originally posted by memobug
Greetings,

After reading through 33 pages of this and visiting some of the sites, I have to say GREAT HACK, but even better support.

I am wondering though: I saw two questions from users who wanted to insert images as part of the questions. One tried and couldn't (post 392-394) and another (post422) that asked the same question but no reply as yet.

Is embedding images (and having them show) in the Quiz question or answer possible, and has anyone done it successfully?

Regards,

Matt

Yes, you can use images. Just use regular HTML in the quiz question. Example:

<img src="http://www.yoursite.com/images/quizzes/image.jpg">

kira
08-08-2002, 10:12 PM
This is an amazing hack. Many, many thanks for creating such an inventive and fun add-on for our community!

I agree that it'd be great if scores could be totalled in percentages, rather than points alone. It makes the hardest/easiest quiz section a little quirky. But that's not a huge deal. All in all, I can't wait to bring this live on my forums! :D Thanks again!

zootsuit
08-11-2002, 08:17 AM
Just wanted to say...a little late...that I love this hack. It didn't work too well in the beginning for us, but it turned out awesome...and I just wanted to say thanks! You're an awesome hacker! :)

sub
08-11-2002, 12:35 PM
Cool hack!

One problem though, installed sweet but only thing that dont work correctly is adding questions, I add a question it seems to go though but when I try to view them its not there also when viewing the questions on quiz.php it does not appears there also. I went and looked at the database table its not there, it’s like I never added it to the game.

I reinstalled it three times, still same thing. All templates installed, and tables installed. Followed directions 100%

Any thoughts?

Vb: 2.2.5
PHP: 4.0.6
MySQL: 3.23.36

Tim Wheatley
08-11-2002, 07:39 PM
You have to make a quiz. The questions section is for editing quiz questions. Without a quiz there is nowhere for the questions to go.

Warlord
08-11-2002, 07:44 PM
Is there a way to add this hack to your homepage instead of the forums?

I'm using vbulletin 2.2.6 and a portal from phpPortals and would love to install this hack on my homepage.

(I'm trying to attract more visitors to my homepage instead of the board itself).

sub
08-11-2002, 08:03 PM
Originally posted by Tim Wheatley
You have to make a quiz. The questions section is for editing quiz questions. Without a quiz there is nowhere for the questions to go.

Yes, I know and that?s the weird part because I've made the quiz and even approved it, I did many different combinations. The quiz questions never added no matter what I try.

Thanks! Anyone got ideas?

sub
08-11-2002, 08:09 PM
Originally posted by Warlord
Is there a way to add this hack to your homepage instead of the forums?

I'm using vbulletin 2.2.6 and a portal from phpPortals and would love to install this hack on my homepage.

(I'm trying to attract more visitors to my homepage instead of the board itself).

I belive there is an addon for this hack located here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=42000

Not sure if thats what you wanted, but seems to be.

Warlord
08-11-2002, 08:25 PM
I don't think that's really what I'm looking for, I want the actual quiz to be outside the vb folder.

The Movie Forums have it on their main page, but that's because they simply installed vbulletin on the main page, instead of http://domain.com/vb/quiz.php they have http://domain.com/quiz.php . So their vBulletin is actually on http://domain.com/index.php

Most every other board I've seen has a homepage at domain.com and the bulletin board itself is domain.com/vb (or domain.com/forums)

*Hopes this isn't too confusing*

sub
08-11-2002, 09:44 PM
Originally posted by Warlord
I don't think that's really what I'm looking for, I want the actual quiz to be outside the vb folder.

The Movie Forums have it on their main page, but that's because they simply installed vbulletin on the main page, instead of http://domain.com/vb/quiz.php they have http://domain.com/quiz.php . So their vBulletin is actually on http://domain.com/index.php

Most every other board I've seen has a homepage at domain.com and the bulletin board itself is domain.com/vb (or domain.com/forums)

*Hopes this isn't too confusing*

Edit the quiz.php to find the following:
require("./global.php");

Replace that with:
require("./forum/admin/global.php");

The /forum/ is your forums directory that the quiz.php is suppose to be at. I think that would allow that quiz to function in the root directory of your domain. You probably have to copy your logo to the root as well. That?s much info I can provide on how to access the hack from the root directory, if I'm wrong please correct me someone. :beard:

danrak
08-12-2002, 03:17 AM
First of all, great hack. My members have really enjoyed it so far.

I've taken a quick look through the posts, but couldn't find the answer I was looking for. I was wondering if there was a where you can have a custom message at the end of the quiz. For example, say I have a quiz on networking. Say they fail the quiz. The end message would be something like:
Sorry, you have not passed the test. Your score was xx. If you would like to read more more on networking, visit url.

And kinda have it so whatever the subject is replace networking, have have a unique url for each quiz. Would this be possible?

Thanks.

Ryangel
08-12-2002, 11:26 PM
Hi TWTCommish,

Could i edit your install script to suit my own needs for my hack?
I'll leave a note saying it was yours.

Ryan

TWTCommish
08-13-2002, 01:42 PM
Sure. :)

UltimaKing
08-13-2002, 02:31 PM
Hey, I'm installing this hack for someone and I followed the directions exactly and when I try to access the quiz page I get this error.

Database error in vBulletin 2.2.6:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

Is there something wrong with the quiz.php file?

TWTCommish
08-13-2002, 03:13 PM
No, there's nothing wrong with the file: you didn't read all of the instructions.txt file. :)

UltimaKing
08-13-2002, 03:56 PM
haha, now I feel stupid.

Thanks a lot, and happy birthday!

Ryangel
08-13-2002, 10:49 PM
Originally posted by TWTCommish
Sure. :)

Thanks :)


Yeah, Happy Birthday!

TWTCommish
08-14-2002, 01:32 PM
Thanks guys. :D