vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBQuiz 1.0 (https://vborg.vbsupport.ru/showthread.php?t=39719)

TWTCommish 06-10-2002 10:00 PM

vBQuiz 1.0
 
vBQuiz 1.0

NOTE: all functionality-impairing bugs have been fixed. The attached files should work well on just about any PHP installation.

What's it do?
It allows you to setup a quiz center on your boards quickly and easily. This quiz center is FULLY templated, integrated with vBulletin, and has an advanced Admin script for managing the quizzes, categories, and questions. Here's an example: Movie Forums - Quizzes

A few of its features...
  • Tracks all results and displays high scores.
  • Upon completion, users are given a total quiz breakdown of the quiz, showing them how they fared on each question, and, on the ones they missed, showing them the correct answer.
  • Upon completion, users are shown a graphical bar representing their score, and a graphical bar representing the average score for the quiz. They are also emailed their information.
  • Main quiz page calculates and displays the easiest and most difficult quizzes automatically.
  • Quizzes can be split up into categories.
  • Quizzes can be approved or disapproved easily to add/remove them from public view/use.
  • Full integration with the Who's Online? page...IE: "Viewing Quizzes" or "Viewing So and So Quiz" and even "Taking So and So Quiz"
Admin Abilities:
  • Disallow multiple quiz takings.
  • Toggle to disinclude quiz results coming from the author of the quiz.
  • Change the display order of the answers to each question.
  • Add multiple questions and answers at once (no limit).
Here are some screenshots:That's it! Don't forget, however, to read ALL of the instructions.txt file in the enclosed vbquiz.zip file. It'll help guard against some common bugs.

Files Enclosed (in vbquiz.zip)
- instructions.txt (read it!)
- quiz.php (upload to main forum dir)
- admin_quiz.php (upload to admin dir)
- install_quiz.php (upload to admin dir and then run)

Enjoy!

Also: a HUGE, HUGE, HUGE thanks to GamerForums for beta testing this hack for me. His help was completely invaluable and surely saved me a lot of work in the long run. Thanks! :)

firewars 06-11-2002 01:36 PM

Very cool hack :D

TWTCommish 06-11-2002 01:38 PM

Thanks. :) Took a LONG time to create. The quiz.php file is made up of almost 700 lines of code, the admin script is even longer, and the installation file was a pain, too. Whew!

Admin 06-11-2002 01:39 PM

Nice and impressive, good job. :)
Yoda fought... :p

But...
Quote:

Your Score: 3 of 3 (99%)
;)

TWTCommish 06-11-2002 01:41 PM

Yeah, I know, I noticed that this morning, but after a few weeks, over 40 templates, and 2,000+ lines of code (and TONS of debugging), I'm too tired to bother just now. LOL.

Floris 06-11-2002 01:42 PM

Your Score: 3 of 3 (99%)

I think 100% is 100% is my world :)

VERY COOL HACK

Admin 06-11-2002 01:47 PM

Just took a quick glance at the code, I think it's round() that's causing the problem (shouldn't use it; or at least use ceil()).

TWTCommish 06-11-2002 01:48 PM

I'll use ceil() then...when using nothing I often found myself greeted by, well, very, very large decimal numbers. :D

Admin 06-11-2002 02:04 PM

I can imagine.

dost 06-11-2002 02:39 PM

can't you add a timer? like the user must answer the question in 30 seconds

TWTCommish 06-11-2002 02:41 PM

Yeah, I can add a timer. But quite frankly this thing took so friggin' long to write that I just wanted it basically functional. I needed to get all the basics out of the way...easy administration and the like. Maybe in version 2.0.

Lesane 06-11-2002 03:04 PM

Great hack 'TWTCommish', well done. I will install this one later. :up:

CloudSlash 06-11-2002 03:22 PM

How can a user make a quiz?

zootsuit 06-11-2002 03:30 PM

Just installed it and it looks awesome!

Thanks so much!!!

What a wonderful addition...this should definitely be included in vB3...no doubt!!!

:D

Boofo 06-11-2002 03:55 PM

in my online.php, instead of this code:

Code:

global $thread, $post, $forum, $event, $gotforum, $hideprivateforums, $bbuserinfo, $timeformat, $enableemail, $enablepms, $bbtitle, $usergroupdef, $numberguests;
I have this code:

Code:

global $DB_site, $thread, $post, $forum, $event, $gotforum, $hideprivateforums, $bbuserinfo, $timeformat, $enableemail, $enablepms, $bbtitle, $usergroupdef, $numberguests, $onlineloc;
Since the only addition to that line that you said we should replace it with is the $DB_site, will what I have already work or will it intefere with it? Can $DB_site be used for more than one hack at a time? And will it work at the beginning of that line just fine with this hack :) I just want to be sure, is all. :)

TWTCommish 06-11-2002 04:12 PM

Cloud: they can't actually add it. Only Admins can add quizzes. If a user writes a quiz for you, however, you can enter their userid to specify them as the author.

zoot: that's not too likely, but I'm very glad you like it. :) I sure had fun writing it.

Boofo: that should work just fine. :)

Boofo 06-11-2002 04:14 PM

I just wanted to make sure nothing would interfere with anything else. I finally got things straightened out and I'd like to keep it that way. :) Thanks for the great hack and all of your hard work! :)

-=dm=- 06-11-2002 04:16 PM

Wow Nice hack :)
does this work with 2.2.4?

thanx

Recluse 06-11-2002 04:16 PM

im getting a blank page when going to the quiz.php

Boofo 06-11-2002 04:18 PM

Is there any way to maybe be able to have questions with 4 possible answers instead of just yes or no? Like a multiple choice type thing? :)

TWTCommish 06-11-2002 04:20 PM

dm: I've only tested it on 2.2.6 specifically, but I'll be shocked if it doesn't work well on earlier versions, seeing as how it's almost completely standalone.

Boofo: no, there's no support for multiple correct answers...again, maybe 2.0...it'd be tricky, but it's do-able. You can have more than two answers per question, though, of course. You can add as many as you want. Using it on my site, I have four answers for each question.

So, you can add as many possible answers as you like per question (you're not limited to true or false)...however, only one of them can be right.

Dark_Wizard 06-11-2002 04:41 PM

Nice script...you are missing this variable though $mainquizlimit and I had to add it to the top ( $mainquizlimit="10"; ) of quiz.php to get it to work...I searched the new tables and don't see a setting for it and its not in the admin cp either...

TWTCommish 06-11-2002 04:44 PM

It's near the bottom of the vBulletin Options page, just as the instructions.txt file details. :) You need to press the submit button once, I've found, to "confirm" that the data is there for it to work properly.

Dark_Wizard 06-11-2002 04:57 PM

Thx...didn't see it....

Recluse 06-11-2002 04:57 PM

i did that before :) still go the blank page

Smoothie 06-11-2002 04:59 PM

will this work on older versions, 2.2.2?

Dark_Wizard 06-11-2002 05:08 PM

Quote:

Originally posted by Smoothie
will this work on older versions, 2.2.2?
It should..

-=dm=- 06-11-2002 05:42 PM

ok just installed on 2.2.4 there wa no errors, it was very easy to install nice job :)

but now I only see blank page :( (I pressed the submit button )

TWTCommish 06-11-2002 05:45 PM

I don't understand. Where do you see a blank page?

MrLister 06-11-2002 05:59 PM

Very impressive. Great hack!!

-=dm=- 06-11-2002 06:05 PM

Quote:

Originally posted by TWTCommish
I don't understand. Where do you see a blank page?
www.mydomain.com/forums/quiz.php

hmm I dont know what Im doing wrong :(

TWTCommish 06-11-2002 06:06 PM

It sounds to me like your templates were not created properly.

Xelation 06-11-2002 06:13 PM

awsome hack, I will be installing this!

-=dm=- 06-11-2002 06:15 PM

yeah TWTCommish u r right, I cant see any quiz template :(

what can I do now?(sit in the corner and cry) :(

TWTCommish 06-11-2002 06:17 PM

Did you get any errors when you ran the install_quiz.php file? That's the file that inserts all the templates.

zachb 06-11-2002 06:20 PM

Great hack TWT!! I love it. *Install*

-=dm=- 06-11-2002 06:21 PM

No there was no errors, installed successfully.

TWTCommish 06-11-2002 06:22 PM

Upload the file again and this time ONLY run the first step...that should create the templates. I guess it went funky on you for no apparent reason.

sphinx 06-11-2002 06:26 PM

no errors installed very well done m8 very nice :up:

-=dm=- 06-11-2002 06:28 PM

done!
thats strange, I dont see those templates anywhere.

Quote:

"email_quizresults" template added sucessfully.
"email_quizresults_subject" template added sucessfully.
"error_quiz_alreadytaken" template added sucessfully.
"error_quiz_doubleanswer" template added sucessfully.
"error_quiz_doubleresult" template added sucessfully.
"error_quiz_invalid" template added sucessfully.
"quiz" template added sucessfully.
"quizbit" template added sucessfully.
"quiz_answerbit" template added sucessfully.
"quiz_author" template added sucessfully.
"quiz_category" template added sucessfully.
"quiz_categorybit" template added sucessfully.
"quiz_category_error" template added sucessfully.
"quiz_category_nav" template added sucessfully.
"quiz_category_nav_nextlink" template added sucessfully.
"quiz_category_nav_prevlink" template added sucessfully.
"quiz_display" template added sucessfully.
"quiz_display_allresultslink" template added sucessfully.
"quiz_display_bestresultbit" template added sucessfully.
"quiz_display_bestresults" template added sucessfully.
"quiz_display_bestresults_error" template added sucessfully.
"quiz_display_highscoreslink" template added sucessfully.
"quiz_display_latestresultbit" template added sucessfully.
"quiz_display_latestresults" template added sucessfully.
"quiz_display_latestresults_error" template added sucessfully.
"quiz_easiest_hardest" template added sucessfully.
"quiz_image" template added sucessfully.
"quiz_maincategorybit" template added sucessfully.
"quiz_menu" template added sucessfully.
"quiz_menubit" template added sucessfully.
"quiz_nav" template added sucessfully.
"quiz_nav_nextlink" template added sucessfully.
"quiz_nav_prevlink" template added sucessfully.
"quiz_none" template added sucessfully.
"quiz_others_error" template added sucessfully.
"quiz_others_resultbit" template added sucessfully.
"quiz_others_results" template added sucessfully.
"quiz_question" template added sucessfully.
"quiz_resultbit" template added sucessfully.
"quiz_results" template added sucessfully.
"quiz_scorebars" template added sucessfully.
"quiz_viewscorebit" template added sucessfully.
"quiz_viewscores" template added sucessfully.
"quiz_viewscores_error" template added sucessfully.
"quiz_viewscores_nav" template added sucessfully.
"quiz_viewscores_nextlink" template added sucessfully.
"quiz_viewscores_prevlink" template added sucessfully.
Im runing version 2.2.4


All times are GMT. The time now is 05:24 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01837 seconds
  • Memory Usage 1,825KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete