PDA

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


xxxsaint
04 Oct 2002, 12:43
***** 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
04 Oct 2002, 15:45
Cool. Thanks for the hack, installed :)

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

:D

- miSt

xxxsaint
05 Oct 2002, 02:35
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
05 Oct 2002, 13:43
oh lol... sorry didn't see that first time round ;)

- miSt

DarkDraco07
05 Oct 2002, 15:00
is there a way to add this to the vBindex?

xxxsaint
05 Oct 2002, 15:29
I'm not sure , I don't have vBindex :D

Lesane
16 Oct 2002, 13:53
Great work 'xxxsaint'. Glad you released it.

NTLDR
16 Oct 2002, 15:00
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
17 Nov 2002, 23:33
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
18 Nov 2002, 05:41
Uhm, call me crazy but I don't see the quiz.php? Where do I download it from?

Keyser Söze
15 Dec 2002, 04:18
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
15 Dec 2002, 06:26
*****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
15 Dec 2002, 06:30
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
15 Dec 2002, 15:49
ahh, thanks man

Zelda-King
22 Apr 2003, 16:49
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
21 May 2003, 00:07
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
16 Jun 2003, 03:34
Looks cool, i'll install. :D

Warlord
07 Mar 2004, 00:01
Great hack, just installed it.

Thanks XXXSaint and Lesane! :)