PDA


View Full Version : Random Zero Tolerance Quiz Addon


brianstevz
05-30-2005, 11:33 PM
Hack name: vBa CMPS: VBulletin Random Quiz addon
Version: 1.0
Author: brianstevz - I take NO credit for the orginal hack. That was scripted by Zero Tolerance. All I've done is port his hack to vBa CMPS. I also "borrowed" a lot from tcs hack of Random Arcade addon.

Steps:
1. Install Quiz Hack from Zero Tolerance
http://www.vbulletin.org/forum/showthread.php?t=80780&highlight=quiz

2. Add 1 new template

In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_quiz"

Insert this code into the template:


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_randomtopic')"><img id="collapseimg_forumhome_randomtopic" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0" /></a><span class="smallfont"><strong>$vba_options[portal_blockbullet] Random Quiz</strong></span>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomtopic" style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<tr>
<td class="alt1" align="center" colspan="2">
Have you taken the following quiz?<br><br><a href="$vboptions[bburl]/quiz.php?$session[sessionurl]do=Take&id=$randquiz[qid]"><img src="$vboptions[bburl]/images/quiz/$randquizimg" alt="$randquiz[q_name]" border=0></a><br><br>->&nbsp;&nbsp; <a href="$vboptions[bburl]/quiz.php?$session[sessionurl]do=Take&id=$randquiz[qid]"><b>$randquiz[q_name]</b></a>&nbsp;&nbsp;<-
</td>
</tr>
</tbody>
</table>
<br />

Save the template!

Make sure to repeat this step for each style(skin) that you use.

3. Upload random_quiz.php to your modules folder. Usually HOME/forum/modules

4. Add 1 new vBa CMPS Module

Still in your Admincp - vBa CMPS - Add Module

- Module Title - Random Quiz
- Module Identifier - Leave blank
- File to include - random_quiz.php
- Activate and select the column you want it in.
- Save and you are done.

Your done!

Hope you like it.

Brian

Demo here: http://www.pro-american.com

MAKE A BACKUP
I will not be held responsible for any damage this hack causes to your forum.
This hack is NOT supported since I know virtually nothing about coding.

Please keep any bug reports in this thread.

mholtum
05-31-2005, 01:34 AM
Sweet! Good Job!

Vevina
06-01-2005, 12:51 PM
sweet installed :)

borabora
10-12-2005, 06:31 PM
can someone send me the 2.1 version of inferno quiz..
i found 2.2 but it's for vb3.5 :(

moses
01-19-2006, 07:41 AM
awesome, thanks for the module.
can someone send me the 2.1 version of inferno quiz..
i found 2.2 but it's for vb3.5 :(
Here's the version for vBulletin 3.0.x (http://www.vbulletin.org/forum/showthread.php?t=80780)

Teepeg
01-21-2006, 06:05 PM
Is this actually compatable with 3.5??

Thx :)

Lance Carbuncle
02-10-2006, 12:27 AM
Well, I have installed this and just can't figure out what is going on.. here is my cmps page when I activate the module :( ... I have zero troubleshooting skills... I can only follow directions to install things, and considering all you do is click "upload module" on this one and activate the module, I am at a loss.... Anyone? I would REALLY love to get it running....

http://www.forums.repashy.com/cmps_index.php?page=homepage

my quiz is installed here:

http://www.forums.repashy.com/quiz

psilocybin
02-27-2006, 02:32 AM
Followed instructions and getting this error:

Fatal error: Call to a member function on a non-object in /home/usr/public_html/forums/modules/random_quiz.php on line 3

naeemakhtar
07-02-2006, 07:23 AM
so uhrrr.....does this work on VBadvanced 3.5.4 and VBCMS2.1 or not?:confused:

ryanC
08-02-2006, 09:07 AM
Followed instructions and getting this error:

Fatal error: Call to a member function on a non-object in /home/usr/public_html/forums/modules/random_quiz.php on line 3
got the same error? Did you figure out how to get this to work?