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
  #22  
Old 08-12-2002, 06:21 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Tim Wheatley


The approval or delete is already a part of the script. You even have to do that when YOU make a quiz now... If a member submits a bad quiz you edit it or delete it.

IMO it would save bundles of time because you don't have to type everything. Even a quiz riddled with spelling mistakes is easier to edit than to type all over again.
Hehe, I didn't think of that.

However, if so, the normal members should only be able to add quizzes, and only be able to manage their own quizzes. That makes this a completely different hack and is not easy to do.
Reply With Quote
  #23  
Old 08-12-2002, 07:32 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Apok2002
I've always ran the board myself, w/ the help of another Sr. Administrator. I use individual forum mods, but they are not in ther UserGroup Mods...their names were added to a specific forum as a Moderator from the Forum Modify menu.

So if I were to designate a few mods to take care of quizzes, and ONLY quizzes (no other access)...how exactly would I do this? What link would I give them? Where would I put this link for them to access the Mod CP so they can edit quizzes ONLY?

----
Side note...as far as rewarding quiz takers...those w/ the top 3 scores w/i a given period of time, I award points manually. It would be nice if it did it automatically, but I'm not counting on that happening any time soon.
---
They don't have to be in the moderator usergroup, they just need to be assigned as moderators and be able to access the Mod CP to be able to add quizzes (since authorization is based on "ismoderator", not "usergroup").

Want to make a Quizzes CP? Note that they will still be able to access the Mod CP since they're moderators. But if you don't tell them about the Mod CP they might not be avare of its existance.

I believe we could create a new table in your database, create a new usergroup and give that usergroup the ability to view the quizzes cp, modify the global.php located in your /quizzes directory to authorize this usergroup to be able to view the quizzes cp but I have no idea to do that correctly. At least it would take some time for me to figure out

Anyway, follow these instructions to create a Quizzes CP:

1. Create a new directory under your forum home called "quizzes" (http://www.yoursite.com/forum/quizzes). CHMOD it to 755.

2. Download the following files from your /mod directory to a temporary folder: admin_quiz.php, cp_logo.gif, index.php, global.php.

3. Open the index.php file you just downloaded and FIND:

Code:
vBulletin Moderator's Control Panel
REPLACE this with:

Code:
vBulletin Quizzes Control Panel
FIND and DELETE:

Code:
<form action="user.php" method="get">
<input type="hidden" name="action" value="findnames">
<input type="hidden" name="s" value="<?php echo $session[sessionhash]; ?>">
<tr class="firstalt">
	<td>Quick User Finder</td>
	<td><input type="text" name="findname" size="30"> <span id="submitrow"><input type="submit" value="Find Now"></span></td>
</tr>
</form>
<form action="http://www.php.net/manual-lookup.php" method="get" target="_blank">
<tr class="secondalt">
	<td>PHP Function Lookup</td>
	<td><input type="text" name="function" size="30"> <span id="submitrow"><input type="submit" value="Find Now"></span></td>
</tr>
</form>
<form action="http://www.mysql.com/doc/manual.php" method="get" target="_blank">
<input type="hidden" name="depth" value="2">
<tr class="firstalt">
	<td>MySQL Language Lookup</td>
	<td><input type="text" name="search_query" size="30"> <span id="submitrow"><input type="submit" value="Find Now"></span></td>
</tr>
<tr class="secondalt">
	<td>Useful Links</td>
	<td><select onchange="jumpto(this.options[this.selectedIndex].value)">
		<option>&raquo; Useful Links &laquo;</option>
		<option value="http://www.vbulletin.com/">vBulletin Home Page</option>
		<option value="http://www.vbulletin.com/members/">vBulletin Members' Area</option>
		<option value="http://www.vbulletin.com/forum/">vBulletin Support Forums</option>
		<option value="http://www.vbulletin.com/manual/">vBulletin Online Manual</option>
		<option value="http://www.php.net/">PHP Home Page</option>
		<option value="http://www.php.net/manual/">PHP Online Manual</option>
		<option value="http://www.mysql.com/">MySQL Home Page</option>
		<option value="http://www.mysql.com/documentation/">MySQL Documentation</option>
	</select></td>
</tr>
</form>
</table>
</td></tr></table>
</form>
FIND:

Code:
Moderators' Control Panel
REPLACE this with:

Code:
Quizzes Control Panel
FIND:

Code:
Welcome to the vBulletin Moderators' Control Panel
REPLACE this with:

Code:
Welcome to the vBulletin Quizzes Control Panel
FIND and DELETE:

Code:
<?php

doformheader("user","find");
maketableheader("Useful Admin Stuff");

if ($stats = @exec("uptime")) {
	$datecut=time()-$cookietimeout;
	$guestsarry = $DB_site->query_first("SELECT COUNT(host) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut");
	$membersarry = $DB_site->query("SELECT DISTINCT userid FROM session WHERE userid<>0 AND lastactivity>$datecut");

	$guests = number_format($guestsarry['sessions']);
	$members = number_format($DB_site->num_rows($membersarry));

	$onlineusers = number_format($guests + $members) . " users online ($members members &amp; $guests guests).";

	preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",$stats,$regs);
	echo "<tr class=\"secondalt\"><td>Server Load Averages</td><td><b>$regs[1], $regs[2], $regs[3]</b> $onlineusers</td></tr>\n";
}
?>
FIND:

Code:
Control Panel Home
REPLACE it with:

Code:
Quizzes CP Home
FIND (note that this requires that you have previously installed my Add-on.):

Code:
// *************************************************
makenavoption("Add","announcement.php?action=add","|");
makenavoption("Edit","announcement.php?action=modify");
makenavselect("Announcements");
// *************************************************
makenavoption("New Posts","moderate.php?action=posts","<br>");
makenavoption("New Attachments","moderate.php?action=attachments");
makenavselect("Moderation Lists");
// *************************************************
makenavoption("Ban","user.php?action=find","|");
makenavoption("View","user.php?action=find");
makenavselect("User Actions");
// *************************************************
makenavoption("Mass Move","thread.php?action=move","<br>");
makenavoption("Mass Prune","thread.php?action=prune");
makenavselect("Thread Control","<hr>");
// ************************************************
REPLACE this with:

Code:
// *************************************************
makenavoption("Add","announcement.php?action=add","|");
makenavoption("Edit","announcement.php?action=modify");
makenavselect("Announcements");
// *************************************************
makenavoption("New Posts","moderate.php?action=posts","<br>");
makenavoption("New Attachments","moderate.php?action=attachments");
makenavselect("Moderation Lists");
// *************************************************
makenavoption("Ban","user.php?action=find","|");
makenavoption("View","user.php?action=find");
makenavselect("User Actions");
// *************************************************
makenavoption("Mass Move","thread.php?action=move","<br>");
makenavoption("Mass Prune","thread.php?action=prune");
makenavselect("Thread Control","<hr>");
// *************************************************
Upload the files I asked you to download earlier (and the modified index.php too, of course) to your /quizzes directory.

Ask your new quizz moderators to point their browsers at http://www.yoursite/forum/quizzes.index.php

All done.

Hmm...maybe I should include this in v1.1 of my add-on
Reply With Quote
  #24  
Old 08-12-2002, 07:52 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So if I wanted to user usergroup - can I simply switch that command and set it as my normal members usergroup?
Reply With Quote
  #25  
Old 08-12-2002, 07:57 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Tim Wheatley
So if I wanted to user usergroup - can I simply switch that command and set it as my normal members usergroup?
In short, yes. But then everyone would be able to edit eachothers quizzes, and they would have all the quiz answers handy.
Reply With Quote
  #26  
Old 08-12-2002, 08:32 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh yeah, I forgot: here's a screenshot that shows what the instructions above creates.
Reply With Quote
  #27  
Old 08-12-2002, 09:06 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I remove the 'edit' and 'approve' and 'dissaprove'?? Surely it's possible - pleeeeeeeeeeeeeeeeeeeeeeeeeease? :banana:
Reply With Quote
  #28  
Old 08-13-2002, 12:48 AM
Apok2002 Apok2002 is offline
 
Join Date: Feb 2002
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tim, if you do that, then you would have to aprove the quizzes yourself (or someone you designate)...but that doesn't solve the problem that now ALL members can see the correct answers. Being curious by nature, I'm sure you'll have a lot of people who want to check out this new little feature...and of course, they'll probably want their name to appear as a top quiz taker...and use the answers they've just obtained to do so.

I offer Forum Points to my top scorers...so it's not a good way to handle this on my personal forum. But if it's just something for fun (which it all is for each of us of course), then you'd be able to do that...but it may create more problems that you haven't thought of.

And Martin, thanks! I'm going to try that out tonight. I'll let ya know how it works. And you should definately include that "option" in the new version.

I like it like this, because my mods are busy, I'm busy, and the quizzes is just something "extra" I'm giving my community. We don't always have time to keep up w/ all the submitted quizzes. And I like to have my community actually participate in a lot of the stuff we do. This is just another great opportunity for them to do that.
Reply With Quote
  #29  
Old 08-13-2002, 04:29 AM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Martin. Many thanks for a great add-on! Of course, I do have a little request, because no good deed goes unpunished! I was wondering, is it possible to tweak this so that we'd see a link to the most recently added quiz, rather than the easiest/hardest quizzes? Sorry for being a nag!
Reply With Quote
  #30  
Old 08-14-2002, 08:43 AM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by kira
Hi Martin. Many thanks for a great add-on! Of course, I do have a little request, because no good deed goes unpunished! I was wondering, is it possible to tweak this so that we'd see a link to the most recently added quiz, rather than the easiest/hardest quizzes? Sorry for being a nag!
lol @ edit note

Yes, that's possible. I might have time to look at it later today/tonight.
Reply With Quote
  #31  
Old 08-14-2002, 07:42 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks, Martin, that would be excellent! It'd be an easy way to let people know when there's a new quiz.
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:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08147 seconds
  • Memory Usage 2,336KB
  • 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
  • (12)bbcode_code
  • (4)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