vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBa CMPS - Random Quiz (https://vborg.vbsupport.ru/showthread.php?t=82268)

brianstevz 05-29-2005 10:00 PM

vBa CMPS - Random Quiz
 
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/showthrea...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:


Quote:

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

Please keep any bug reports in this thread.

hello 05-30-2005 08:37 PM

Have you got any screen shots of it?

Lionel 05-30-2005 09:18 PM

Give him a random screenshot.

DR?@M W?@V?R 05-31-2005 12:23 PM

thx nice idea.. I changed

<br> to <br />
Take&id to Take&amp;id
border=0> to border="0" />

To make it XHTML valid.

Templates Used: adv_portal_quiz

To prevent a unnecessary querie.

Gemma 05-31-2005 06:58 PM

Nice hack!

I changed some things so it didn't clash with amykhar's vba newest quiz module

I changed the template name from adv_portal_quiz to adv_portal_randquiz and in random_quiz.php

Code:

eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_quiz') . '";');
to this:
Code:

eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_randquiz') . '";');
Thank You for this hack :)

Vevina 06-01-2005 01:50 PM

Sweet installed ThankYou :)


All times are GMT. The time now is 06:07 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.01171 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete