The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBQuiz Add-on v1.2 Details »» | |||||||||||||||||||||||||
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
|
Comments |
#22
|
||||
|
||||
Quote:
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. |
#23
|
||||
|
||||
Quote:
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 Code:
vBulletin Quizzes Control Panel 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>» Useful Links «</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> Code:
Moderators' Control Panel Code:
Quizzes Control Panel Code:
Welcome to the vBulletin Moderators' Control Panel Code:
Welcome to the vBulletin Quizzes Control Panel 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 & $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"; } ?> Code:
Control Panel Home Code:
Quizzes CP Home 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>"); // ************************************************ 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>"); // ************************************************* 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 |
#24
|
||||
|
||||
So if I wanted to user usergroup - can I simply switch that command and set it as my normal members usergroup?
|
#25
|
||||
|
||||
Quote:
|
#26
|
||||
|
||||
Oh yeah, I forgot: here's a screenshot that shows what the instructions above creates.
|
#27
|
||||
|
||||
If I remove the 'edit' and 'approve' and 'dissaprove'?? Surely it's possible - pleeeeeeeeeeeeeeeeeeeeeeeeeease? :banana:
|
#28
|
|||
|
|||
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. |
#29
|
|||
|
|||
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!
|
#30
|
||||
|
||||
Quote:
Yes, that's possible. I might have time to look at it later today/tonight. |
#31
|
|||
|
|||
Many thanks, Martin, that would be excellent! It'd be an easy way to let people know when there's a new quiz.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|