Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBQuiz 1.0 Details »»
vBQuiz 1.0
Version: 1.00, by TWTCommish TWTCommish is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-10-2002 Last Update: Never Installs: 213
 
No support by the author.

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #872  
Old 05-14-2004, 10:48 AM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL, you caught me off-guard! I'm still fiddling with my Quiz Center and have a lot of wonky display (haven't released it to my members yet) but give me a day or two and I'll set up a quiz and a test user account if anyone wants to have a look.
Reply With Quote
  #873  
Old 05-14-2004, 12:49 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

STOP THE PRESSES!!

There is another way to do this without using html!!!

I just kept thinking about the process....what the change in code was essentially doing was telling the system to parse the question text field just like it parses text in the forum specified (in my case forumid 13). So, because I enabled html in forum 13 it would parse any html I entered in the quiz question, and hence display my images.

BUT, I got to thinking......maybe the problem with using the vbcodes (in my case using vbcodes didn't work...I just got the image url as a link) was because it wasn't told what forum to mimic for parsing vbcodes. In other words.....if I have vbcode enabled in forum 13 and I tell it to mimic forum 13 (by replacing the X in the previous code) and then I USE vbcode in the quiz question will it work? The answer is YES!!!! I tried it! (so actually right now, I can use both html and vbcodes to insert images....unless I remove the html permissions for forum 13).

So for anyone who can't get images to show up in quiz questions using vbcode (ie. you get a link instead of an image) all you need to do is tell it to mimic one of your forums that has vbcode enabled (all of mine do, so any forum number will work) and then use VBCODE to insert your images!!!

I prefer this method as I'm always hesitant to enable html anywhere, even for other mods/admins.

Where's the happy dancing emoticon???
Reply With Quote
  #874  
Old 05-14-2004, 03:27 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, this is very very rough but I've put a quiz up on my site that uses images (the first image is posted using html, the second using vbcodes...so you can see both work with the modification). I've also created a test account for anyone who wants to log in to view the quiz.

I'm putting the information inside code tags so I only get vbulletin traffic....also, I will remove the test account after a bit so if you miss the trial period you'll have to register to the site.

PHP Code:
The test account is....

usernamevbulletin
password
vbtest

Address 
for a quiz using images....

[
url]http://bonanzaworld.net/forums/quiz.php?s=&quizid=6[/url] 
I'm sure I could do a lot more with the code and tags (like centering the image etc.) but this is just a rough mock-up.
Reply With Quote
  #875  
Old 05-14-2004, 03:36 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My brain is still working here.....

I wonder if it's possible to use images in the ANSWER fields. For example, the question is "Which of the pictures below is the winkey smiley?" and then the four choices are pictures ....

-
-
-
-

And respondents choose the right picture by clicking the radio button next to it. Seems doable, will check it out.
Reply With Quote
  #876  
Old 05-14-2004, 04:19 PM
lmongello lmongello is offline
 
Join Date: Jan 2004
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks great.. too bad it's not for vb3 :ermm:
Reply With Quote
  #877  
Old 05-14-2004, 11:56 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it is possible to put images in your answer text using a very similar modification to the script (although watch out for the replacement variable for correct_answer).
Reply With Quote
  #878  
Old 05-16-2004, 02:50 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to let you all know, I've fiddled with the old code a bit and so far things are going well. I've got a few new ideas that I'll be exploring. All in all it could be a few more weeks, at least, until I've got some kind of beta version out, but I'll keep at it and update you all before long.
Reply With Quote
  #879  
Old 05-16-2004, 03:21 PM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic Chris
Using the existing version, can't wait for what you have in store for us in the next
Reply With Quote
  #880  
Old 05-17-2004, 01:31 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really love this script and am having fun setting it up for my members to use.

Chris (or anyone if you can help) is it possible to display how many questions are in a quiz on the Recently Added Quizzes page (along with the title and description information), and on the quizid page (where it lists top scorers)? So instead of say, 9, it would say 9/10? I think I saw this on someone else's quiz page here. Right now the only place the number of questions shows up is on the Results page when it tells you you got 9 out of 10 (90%) correct. I tried a few things (just inserting the $question_count variable I found on the results page on those other pages but it didn't work....also tried $quiz[question_count] but that didn't work either....maybe cuz I'm just guessing here ).

Is there a way to do this? Any help much appreciated!
Reply With Quote
  #881  
Old 05-17-2004, 09:29 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got another question about vbquiz. I used the add-on below so my users can leave comments on quizzes....I have 2 questions though....one, the comments entered are displayed from oldest to newest....is there a way to have them display from newest to oldest? (essentially the opposite of what I have in the forums, but it would seem to work better for the quizzes to have the most recent comments at the top). Second, the comments just pile up infinitely...ie. they don't ever go onto a second page. Not that I'm expecting LOTS of comments on the quizzes but if over time I accumulated 40 or 50 comments that's a lot to display on one page. Anything that can be done for that?

Any help appreciated.

Quote:
Originally Posted by LangTuDaTinh
PHP Code:

//- Add a new table 

CREATE TABLE `quiz_comments` (
  `
cidint(10NOT NULL auto_increment,
  `
quizidint(10NOT NULL default '0',
  `
useridint(25NOT NULL default '0',
  `
dateint(11NOT NULL default '0',
  `
commentstext NOT NULL,
  
PRIMARY KEY  (`cid`),
  
KEY `cid` (`cid`),
  
KEY `userid` (`userid`),
  
KEY `id` (`quizid`)
TYPE=MyISAM;

//- find in quiz.php --------------

MORE WITH THIS SCORE

//- add above it-------------------


// ------------------------------------- DELETE COMMENTS START--------------------------------------------
if ($action=="delcomment"
{
    if (
$bbuserinfo['usergroupid']==6)
        {
            
$DB_site->query("DELETE FROM quiz_comments
                         WHERE cid = '
$cid'");
                           
        }
     eval(
"standardredirect(\"".gettemplate("quiz_comments_delete")."\",\"quiz.php?s=$session[sessionhash]&quizid=$quizid\");");

}

if (
$action=="savecomment")
    {
        
$time time();
         
$quiz $DB_site->query("INSERT INTO quiz_comments (cid, quizid, userid, date , comments) 
                            VALUES (NULL,"
.intval($quizid).", ".intval($userid).", ".time().", '".addslashes($comments)."')");
        eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"quiz.php?s=$session[sessionhash]&quizid=$quizid\");");
    }


// ------------------------------------- DELETE COMMENTS END --------------------------------------------


//- find in quiz.php --------------

    
$time time();
    eval(
"dooutput(\"".gettemplate("quiz_display")."\");");


//- add above it-------------------


//////////////////////////////////////////////////////////////////////////////////////////////////////////
    
$quizcommentr $DB_site->query("SELECT r.comments, r.date, r.cid,
                                             u.userid, u.username
                                      FROM quiz_comments r, user u
                                      WHERE r.quizid = "
.intval($quizid)."
                                        AND r.userid = u.userid
                                      ORDER BY r.cid ASC
                                      "
);

        while (
$quizcomment $DB_site->fetch_array($quizcommentr)) 
            {
                
$quizcomment[comments] = bbcodeparse(stripslashes($quizcomment[comments]));
                
$cid=$quizcomment[cid];
                  
$quizcomment[date] = vbdate("$dateformat$timeformat"$quizcomment[date]);
                  
                if (
$bbuserinfo[usergroupid]==6
                    {
                        
$quizcommentdel ="<smallfont color=\"#008080\">[<a href=\"quiz.php?s=$session[sessionhash]&quizid=$quizid&action=delcomment&cid=$cid\">Delete</a>]</smallfont>";
                    }  
                if(
$quizcomment[comments]!="")
                    {
                          eval(
"\$quizdisplaybit .= \"".gettemplate("quiz_comments_displaybit")."\";");
                    }
 
            }
                eval(
"\$quiz_display = \"".gettemplate("quiz_comments_display")."\";");

           

//////////////////////////////////////////////////////////////////////////////////////////////////////////


ADD NEW TEMPLATES


//------------ADD NEW "quiz_comments_delete 

Comment deleted successfullyyou will return to the quiz.



//------------ADD NEW "quiz_comments_display 

  
<table width="100%" cellpadding="4" cellspacing="0" border="0" bgcolor="#9999FF">
    <
tr bgcolor="#9999FF">
      <
td colspan="2" width="100%" valign="middle"><normalfont color="#000000"><b>Quiz Discussion</b></normalfont></td>
    </
tr>

    
$quizdisplaybit

  
</table>

//------------ADD NEW "quiz_comments_displaybit"

  
<tr bgcolor="#13486D" >
    <
td width="100%" valign="left"><smallfont color="#008080"Posted by: <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$quizcomment[userid]"><b>$quizcomment[username]</a></bon $quizcomment[date] </smallfont></td><td valign="right">$quizcommentdel</td>
  </
tr>

  <
tr width="90%" bgcolor="#1C5780">

    <
td colspan="2" width="100%" valign="left"><normalfont>$quizcomment[comments]</normalfont></td>
  </
tr
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:27 PM.


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.12711 seconds
  • Memory Usage 2,396KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete