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 Add-on v1.2 Details »»
vBQuiz Add-on v1.2
Version: 1.00, by Martin64 Martin64 is offline
Developer Last Online: Jul 2020 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-05-2002 Last Update: Never Installs: 26
 
No support by the author.

vBQuiz Add-on v1.3 (for vBQuiz 1.0)
(https://vborg.vbsupport.ru/showthrea...threadid=42000)
(by Martin64, martin64@vbhackers.com. Additional functions by FASherman)

ABOUT: Since vBQuiz is such a great hack, I decided to make this add-on to pay my respect to TWTCommish Don't forget to visit his great board at http://www.movieforums.com. :P

NOTE: Of course, you must have installed vBQuiz 1.0 before you start.

DESCRIPTION: Let's describe this add-on as having 3 functions, all optional and independant of eachother:

Step 1: This part of the add-on displays a "Forum Quiz Center", which has a link to the main quizzes page and also, it shows how many of X available quizzes you have taken. This part of the add-on was made by FASherman so a big thank you to him . Check out this version online at http://www.fasherman.com/forums

Below the Forum Quiz Center, it will display the easiest and hardest quizzes.

Step 2: As you know if you have vBQuiz 1.0 installed, only Admins are able to add, edit and remove quizzes. This add-on enables the ability for Moderators to manage quizzes as well.

Step 3. Finally, these instructions will create a Quizzes CP. This could come handy if you plan to assign certain members to manage quizzes only. Please note that still need to be assigned as moderator of a board in order to be able to reach the Quizzes Control Panel.

Enjoy! :knockedout:

Show Your Support

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

Comments
  #52  
Old 11-24-2002, 12:03 AM
werwer werwer is offline
 
Join Date: Apr 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi
A nice hack, I'll install it...
Is it possible to dysplay 5 quesions per page befor the nest questions button?!
Any1 can help with this?!

I think it would be more modular if quiz admins could choose how many questions to dysplay per page befor spliting the next page!!

thanx
Reply With Quote
  #53  
Old 11-24-2002, 10:45 PM
TheEDIGuy TheEDIGuy is offline
 
Join Date: Jul 2002
Location: Buffalo, NY
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by GamerForums
This has turned my forums/index.php into a clone of my quiz.php?
My users are reporting a problem similar, and I've tested and located the problem...Now I'm looking for a solution short of uninstalling the hack.

This hack works wonderfully on Internet Explorer. However, Netscape (all versions have been tested, through 7.0) redirects the main forums index page to the quiz.php page.

As an example, I have users who have my Forum Index page (at /forums/index.php) bookmarked, but when they either click on the bookmark or type in our web address, instead they get /forums/quiz.php. They've even double-checked their bookmarks, and they are correct. It's definitely this hack that's causing the problem, but as I said, only for Netscape users.

Someone please come through with a fix? I don't know enough about PHP to go through it, but I love the hack, and don't want to have to uninstall it.
Reply With Quote
  #54  
Old 11-24-2002, 10:49 PM
TheEDIGuy TheEDIGuy is offline
 
Join Date: Jul 2002
Location: Buffalo, NY
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By the way, I'm running 2.2.8, if that helps.
Reply With Quote
  #55  
Old 11-25-2002, 08:05 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right, that's odd. I don't know what in the code that could possibly cause that, but evidently something is.

Quick solution: don't use Netscape! Seriously though, someone with a bit more experience in PHP than I maybe can help us with this as I'm clueless. Sorry :/
Reply With Quote
  #56  
Old 11-25-2002, 08:22 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't use Netscape... I use IE6.
Reply With Quote
  #57  
Old 12-05-2002, 07:11 PM
snout snout is offline
 
Join Date: Nov 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you m8 for the wonderful hack..... damn wot an xcellent addon boy

[high]* snout likes very much.
[/high]

vbb 229, installed no prob
Reply With Quote
  #58  
Old 12-05-2002, 08:35 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm glad you like it.
Reply With Quote
  #59  
Old 12-11-2002, 06:20 AM
snout snout is offline
 
Join Date: Nov 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got a Q for ya.... Is there any way that the results of the quiz could be CC or mailed to another address, im a bit of a n00b when it comes to PHP?

Thanks in advance
Reply With Quote
  #60  
Old 02-01-2003, 02:56 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice add-on Martin64 .

I've got one question - can you just ermove the other CP options that appear (announcements, moderation lists, user actions, thread controls)? And on the same lines for the Quizzes CP, can you stop moderators deleting quizzes that they didn't create?
Reply With Quote
  #61  
Old 02-01-2003, 03:55 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually a problem has just arisen and I notice its been mentioned here already.

After installing the hack it looked fine, the relevent stuff at the bottom of the homepage (index.php) showed the quiz icon and the other info. But then later on after I came back to the forum, the homepage had been taken over by Quizzes page only. All the other forum information had disappeared.

The problem is cause by the instructions in Step 1, namely:

Quote:
++++++++++++++++++++++++++++++++++++++++++++++++++ +++

Still in index.php, find this:

eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\"; ");
}

BELOW this add the following:

// see if anyone's taken any of the quizzes yet
$resultcheck = $DB_site->query("SELECT r.resultid FROM quiz q, quiz_results r$resultclause");

if (!$DB_site->num_rows($resultcheck)) {
eval("dooutput(\"".gettemplate("quiz")."\");");
exit();
}

$quiz_characters = $quizcharacters + 1;

// get the easiest quiz
$easiest = $DB_site->query_first("SELECT q.quizid, q.quiztitle, LEFT(q.description, $quiz_characters) AS description,
AVG(r.totalcorrect) AS average
FROM quiz q, quiz_results r
WHERE r.quizid = q.quizid
AND r.complete = 1
AND q.approve = 1
$authorclause
GROUP BY q.quizid
ORDER BY average DESC
LIMIT 1");

// get the hardest quiz
$hardest = $DB_site->query_first("SELECT q.quizid, q.quiztitle, LEFT(q.description, $quiz_characters) AS description,
AVG(r.totalcorrect) AS average
FROM quiz q, quiz_results r
WHERE r.quizid = q.quizid
AND r.complete = 1
AND q.approve = 1
$authorclause
GROUP BY q.quizid
ORDER BY average ASC
LIMIT 1");

$easiest[average] = number_format($easiest[average], 2);
$hardest[average] = number_format($hardest[average], 2);

// vbQuiz QuizCenter
$quiztaken=$DB_site->query_first("SELECT COUNT(*) AS results FROM quiz_results where userid=$bbuserinfo[userid]");
$quiztotal=$DB_site->query_first("SELECT COUNT(*) AS results FROM quiz");
$newquiz=$DB_site->query_first("SELECT COUNT(*) AS results FROM quiz where timestamp >$bbuserinfo[lastvisit]");
if ($newquiz[results]!=0) {
$onoff="on.gif";
} else {
$onoff="off.gif";
}
if ($newquiz[results]==1) {
$isare="is";
$quiz="quiz";
} else {
$isare="are";
$quiz="quizzes";
}

eval("\$quiz_center = \"".gettemplate("quiz_center")."\";");
// End vbQuiz QuizCenter

Save and close index.php
I'm not sure why, but its this that is causing the problem, even though it worked the first time I went to the homepage as I described above. But if I remove that code from index.php, then my forum goes back to how it should do.

I looked at the html page source with and without the code and clearly you can see that the page is taken over with Quiz template (see below):


1. HTML Source without the step 1 html code within index.php

Code:
<!-- BEGIN TEMPLATE: forumhome -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<!-- no cache headers -->
etc.


2. HTML Source with the step 1 html code within index.php

Code:
<!-- BEGIN TEMPLATE: quiz -->
<html>
<head>
<title>Skynet Forums - Quizzes</title>
<!-- BEGIN TEMPLATE: headinclude -->
the end of this source is:

Code:
</font></p>
<!-- END TEMPLATE: footer -->
</body>
</html>
<!-- END TEMPLATE: quiz -->
So its definitely taking over the homepage as there is no sign of the forum home template being used.

Like I say it was all working, the only thing I did do was to remove all of the test quizzes that I made, then everything went like above. Wouldn't have thought it would have cause that.

I really like this hack so any help would be appreciated.
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 09:51 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.04632 seconds
  • Memory Usage 2,314KB
  • 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
  • (3)bbcode_code
  • (2)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
  • (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