PDA

View Full Version : LeSane's Store Add-on for VB Quiz


xxxsaint
10-03-2002, 10:00 PM
***** LESANE's STORE ADD-ON FOR VBQUIZ *****

Tested and Running smooth on VB 2.2.6

*****Integrate LeSane's Store with TWT Commish's VBQUIZ*****

ALL CREDIT for the code in this hack goes to LeSane who is one of the most helpful people I've had the pleasure to work with. I am releasing this Add-on with his permission and only because he's busy working on other goodies right now. Also a big thank you goes out to TWT Commish for creating VBQuiz and adding a lot of enjoyment to our sites. :D

Q.What does this do ?
A.This awards users of a 10 question quiz 10 points for every correct answer.
If they get all 10 questions right, then it awards them 1000 points as a bonus.
Instructions include both the standard 10 points per correct answer installation
AND installation if you want it to have the 1000 points bonus.

************************************************** **

Files to modify : 1
quiz.php

Installation time : 2 minutes or less
************************************************** **

I will do my best to provide support for this add on - but just so you know , I'm a total noob , this is my first hack release and I was basically the testor for it, Lesane did all the coding from ideas that I had.

Enjoy and click on INSTALL if you use and like this add-on!!

Installation instructions included in the attached file:

Vile
10-04-2002, 02:45 PM
Cool. Thanks for the hack, installed :)

Dean C
10-04-2002, 06:20 PM
hmmm didn't lesane post this lil addon in the requests forum (or am i mistake :)?)

:D

- miSt

xxxsaint
10-05-2002, 01:35 AM
you're mistaken



I am releasing this Add-on with his permission and only because he's busy working on other goodies right now.

Dean C
10-05-2002, 12:43 PM
oh lol... sorry didn't see that first time round ;)

- miSt

DarkDraco07
10-05-2002, 02:00 PM
is there a way to add this to the vBindex?

xxxsaint
10-05-2002, 02:29 PM
I'm not sure , I don't have vBindex :D

Lesane
10-16-2002, 12:53 PM
Great work 'xxxsaint'. Glad you released it.

NTLDR
10-16-2002, 02:00 PM
Originally posted by DarkDraco07
is there a way to add this to the vBindex?

I don't see how this hack can be integrated at all into vBindex, if I'm right in thinking it gives you points for the Store Hack when you answer questions correctly in vBquiz.

MPM.com
11-17-2002, 10:33 PM
Fatal error: Call to a member function on a non-object in E:\webspace\resadmin\markquayle\mobilephonemadness .com\www\forums\quiz.php on line 673

(line 673 is:

$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");

)

Can ANYONE help please?

ethics
11-18-2002, 04:41 AM
Uhm, call me crazy but I don't see the quiz.php? Where do I download it from?

Keyser S?ze
12-15-2002, 03:18 AM
Originally posted by ethics
Uhm, call me crazy but I don't see the quiz.php? Where do I download it from?

same, and i dont see instructions on how to like, put up a link so members can access it, how to change questions and answers, nothings here, what gives :(

xxxsaint
12-15-2002, 05:26 AM
*****Integrate LeSane's Store with TWT Commish's VBQUIZ*****


This is just an auto-pay add on to TWT Commish's VBQUIZ through Lesane's Store. You have to have both of those hacks installed before making use of this hack.

Search for :
LeSane's Store
and
VB QUIZ

xxxsaint
12-15-2002, 05:30 AM
Fatal error: Call to a member function on a non-object in E:\webspace\resadmin\markquayle\mobilephonemadness .com\www\forums\quiz.php on line 673

(line 673 is:

$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");

)

Can ANYONE help please?


hmm , I don't know about that one but I'm sure someone around here does , sorry , I would help if I knew :(:(:(

Keyser S?ze
12-15-2002, 02:49 PM
ahh, thanks man

Zelda-King
04-22-2003, 03:49 PM
I thought a link to the vB Quiz hack would be handy here.

http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=418

Hmm, how about an option to make people have to pay to take the quiz?

Cloudrunner
05-20-2003, 11:07 PM
Just for the record, to make it so that it will give the big $$$ on 100% on any size quiz (not just those with 10 questions), modify the code slightly to look thusly:

Instead of this:

//Points = $$$
if ($totalcorrect=='10') {
$storeamount = 100 * $totalcorrect;
} else {
$storeamount = 10 * $totalcorrect;
}
$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");
//END Points = $$$

Use this:

//Points = $$$
if ($totalcorrect==$question_count) {
$storeamount = 100 * $totalcorrect;
} else {
$storeamount = 10 * $totalcorrect;
}
$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");
//END Points = $$$

This uses the already assigned variable: $question_count, which is the total numbers of questions assigned to the quiz. Thus if the two variables are equal, then the score is obviously 100%, and thus it will give the big $$$.

Enjoy!

)O( Cloudrunner )O(

mx3
06-16-2003, 02:34 AM
Looks cool, i'll install. :D

Warlord
03-06-2004, 11:01 PM
Great hack, just installed it.

Thanks XXXSaint and Lesane! :)