brianstevz
05-29-2005, 10:00 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
https://vborg.vbsupport.ru/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>-> <a href="$vboptions[bburl]/quiz.php?$session[sessionurl]do=Take&id=$randquiz[qid]"><b>$randquiz[q_name]</b></a> <-
</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.
Please keep any bug reports in this thread.
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
https://vborg.vbsupport.ru/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>-> <a href="$vboptions[bburl]/quiz.php?$session[sessionurl]do=Take&id=$randquiz[qid]"><b>$randquiz[q_name]</b></a> <-
</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.
Please keep any bug reports in this thread.