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 Add-on v1.2 (https://vborg.vbsupport.ru/showthread.php?t=42000)

Martin64 08-05-2002 10:00 PM

vBQuiz Add-on v1.2
 
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:

Martin64 08-06-2002 10:04 PM

Here's the screenshot as promised:

Tim Wheatley 08-06-2002 10:21 PM

Great stuff - thanks.

Modified the templates for my board though. :)

Tim

[D]Vincent 08-06-2002 10:23 PM

Looks great but I don't really want my mods to be able to edit it and the stuff on the main page doesn't really make me jump for joy either, nice hack though.

Tim Wheatley 08-06-2002 10:24 PM

1thing.

You say to find:
//today online hack end
etc etc....

Well not all people have that installed. ;)

Martin64 08-06-2002 11:30 PM

Thanks Tim, I'll update that. :)
Didn't mean to include that line: :p

TWTCommish 08-07-2002 01:10 AM

Excellent hack, Martin. Very cool. :) You can afford to ditch this part of the code, though, I think:

Code:

    $easiest[description] = (strlen($easiest[description]) == $quiz_characters) ? bbcodeparse(substr($easiest[description], 0, $quizcharacters).'...') : bbcodeparse(substr($easiest[description], 0, $quizcharacters));
    $hardest[description] = (strlen($hardest[description]) == $quiz_characters) ? bbcodeparse(substr($hardest[description], 0, $quizcharacters).'...') : bbcodeparse(substr($hardest[description], 0, $quizcharacters));


Regit 08-07-2002 01:49 AM

i really want if the register user can post their own quiz ,
( need the admin approve to display ) , it's great for the member who want to submit their own quiz ..

anyone can do this addon ??

Link14716 08-07-2002 03:33 AM

it'd probably be easy to make a store addon or sopmething, I'll try ;)

Tim Wheatley 08-07-2002 04:23 AM

Is it not possible to put the admin_quiz.php file into the main forum dir and modify the permissions then just sort the template?

(Sorry - clueless). :D:D

Martin64 08-07-2002 07:57 AM

TWTCommish: Yeah, that makes sense, thanks. :p. Updated.

Ninth Dimension 08-07-2002 01:13 PM

/me clicks install button

Mr_P 08-07-2002 09:10 PM

installed and works fine

Id let me members use if i could as end of day its them who are gonna be using it and we all know that mods are lazy to even make a quiz up.

Anyway this and the quiz hack is well neat and intergrate well together but im going ov the beaten track here a bit but would anyone who reads this know how to add it so points are given to the user upon completiton of the quiz (if they got all right etc and passed the quiz) as this makes it more beneficial and each user can only take the quiz once so surely this would avoid cheats who would do the same quiz over again.And the points system i refer to is ov course Lesannes Store Hack as it is the best i have seen.

Like i say i know im ov track here but excellant addon anyway m8

Tim Wheatley 08-07-2002 09:37 PM

Hm. Thinking about it I'd love it if I could show in postbit and/or profile all the quiz scores added together. I have all my quizzes formatted with 10 questions with 3 possible answers. So all scores and x out of 10. I'd like it if I could add up the number of quizzes then the total score they have. :)

Erwin 08-07-2002 10:18 PM

Quote:

Originally posted by Tim Wheatley
Is it not possible to put the admin_quiz.php file into the main forum dir and modify the permissions then just sort the template?

(Sorry - clueless). :D:D

It's not as easy as that. Remember, you need to set it up so that members can only edit or delete the quizzes they made - at the moment, people with access to admin_quiz.php can edit or delete anyone else's quiz.

Martin64 08-08-2002 12:59 PM

Quote:

Originally posted by Erwin


It's not as easy as that. Remember, you need to set it up so that members can only edit or delete the quizzes they made - at the moment, people with access to admin_quiz.php can edit or delete anyone else's quiz.

Indeed.

Besides, I don't really see the use of this, since this could cause the quizzes to become very inaccurate since you don't have someone to approve them. For instance, the last quiz someone submitted to me was full of bad questions and answers, and it took me 15 minutes just to correct the spelling and grammar errors. I rather have someone trusted to correct the quizzes than for a regular member to just throw it up there. :classic:

Admins and/or moderators do have a sense of responsibility for the board to work flawlessly and without problems, while regular members (generally) don't have to act like grown ups.

It's a good thought, however, but for members to add quizzes themselves without them approved by admins/mods first? Not in my board, at least. But I must say, a system where anyone can add a quiz, which has to wait for moderation, would be sweet.

Mr_P 08-10-2002 03:41 PM

yeah but i know this is quiz section but what about giving users something in return if they manage to complete the quiz say 80%

a lot of us now use a points system so how hard would it be to incorporate some code into this so if the user did get over the percentage they would be rewarded with a set amount of points.
Or even charge em to take quiz or make em lose a certain amount if they fail to get over half right - ideas are endless but putting it into practise is even harder.

Store hack points system is best and is widely used

Apok2002 08-11-2002 06:23 PM

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.
---

assassingod 08-11-2002 07:15 PM

Thanks alot for this hack Martin64. I really needed this since I am a lazy git and cant think of questions for my quizzes. So Ill let the mods do them from now on:D

[high]* assassingod clicks install[/high]

Tim Wheatley 08-11-2002 07:43 PM

Quote:

Originally posted by Martin64


Indeed.

Besides, I don't really see the use of this, since this could cause the quizzes to become very inaccurate since you don't have someone to approve them. For instance, the last quiz someone submitted to me was full of bad questions and answers, and it took me 15 minutes just to correct the spelling and grammar errors. I rather have someone trusted to correct the quizzes than for a regular member to just throw it up there. :classic:

Admins and/or moderators do have a sense of responsibility for the board to work flawlessly and without problems, while regular members (generally) don't have to act like grown ups.

It's a good thought, however, but for members to add quizzes themselves without them approved by admins/mods first? Not in my board, at least. But I must say, a system where anyone can add a quiz, which has to wait for moderation, would be sweet.

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.

Martin64 08-12-2002 06:21 PM

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. :p

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.

Martin64 08-12-2002 07:32 PM

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 :p

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 ;)

Tim Wheatley 08-12-2002 07:52 PM

So if I wanted to user usergroup - can I simply switch that command and set it as my normal members usergroup?

Martin64 08-12-2002 07:57 PM

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.

Martin64 08-12-2002 08:32 PM

Oh yeah, I forgot: here's a screenshot that shows what the instructions above creates. :)

Tim Wheatley 08-12-2002 09:06 PM

If I remove the 'edit' and 'approve' and 'dissaprove'?? Surely it's possible - pleeeeeeeeeeeeeeeeeeeeeeeeeease? :D:D:D :banana:

Apok2002 08-13-2002 12:48 AM

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. :)

kira 08-13-2002 04:29 AM

Hi Martin. Many thanks for a great add-on! Of course, I do have a little request, because no good deed goes unpunished! :D 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!

Martin64 08-14-2002 08:43 AM

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! :D 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 :p

Yes, that's possible. I might have time to look at it later today/tonight. :)

kira 08-14-2002 07:42 PM

Many thanks, Martin, that would be excellent! It'd be an easy way to let people know when there's a new quiz. :)

Tim Wheatley 08-14-2002 09:48 PM

Yeah I think you're right actually...

Thanks for your help and views - I really do appreciate it, I'll keep it as-is. :)

xxxsaint 08-25-2002 01:16 PM

has anyone been able to integrate this with lesane's store ?

Martin64 08-26-2002 07:11 PM

xxxsaint: I suppose you are referring to the original hack and not this add-on, and as far as I know, it hasn't.

kira 08-27-2002 12:37 AM

Hi, Martin! Sorry to be a nudge, but do you think you might have a "lightbulb moment" (as Oprah calls 'em) regarding whether it's possible to add a "most recent quiz" update to a forum's homepage? (See my post earlier in this thread) This would be soooo useful to my forum! Thanks. :)

Martin64 08-27-2002 04:19 PM

Oh yeah, I completely forgot about that! I'm awfully busy with College work at the moment though, but maybe I'll have some spare time to work on it. It shouldn't be that hard at all, maybe someone with a little more time on their hands could give it a try. :)

FASherman 08-29-2002 11:37 AM

I think Martin64 will have a new version with this feature it in. If you want a head start on what it will look like...

You can see the demo at http://www.fasherman.com/forums/

Martin64 08-29-2002 02:54 PM

vBQuiz Add-on v1.2 released! Check the first post of this thread.

This version includes 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. Below that, the easiest and hardest quizzes will show up. Demo is availabe at http://www.fasherman.com/forums/, just like FASherman pointed out in the post above.

Enjoy! :D

Mr_P 08-29-2002 10:50 PM

Quote:

Originally posted by Martin64
DEMO: View the easiest and hardest quizzes online at my boards: http://www.emutalk.net.

Enjoy! :knockedout:


excellant hack by the way but clicking on the above link launches a Java virus which is JS exploit.

Did`nt get it second time i clicked it but first time i had 2 pop up ads off that site as well.

Martin64 08-30-2002 12:09 PM

Yeah, those are popup ads, but a Java virus? I've never heard anyone report about that before. I will report to my advertising company.

Mr_P 08-30-2002 01:43 PM

No worries m8 just wante du to know but norton and Macafee picked em up but like i say they just JS exploits - think they were trying to set my home page or something.


All times are GMT. The time now is 02:45 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.01473 seconds
  • Memory Usage 1,863KB
  • 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
  • (13)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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