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 1.0 (https://vborg.vbsupport.ru/showthread.php?t=39719)

Velocd 06-12-2002 02:54 AM

Very very impressive, this is such a cool hack. I think we know who wins this months "hack of the month." Now I wont have to post polls for quizzes anymore ^_^

Great job!

Here are some pic's for those who are too lazy to register:

Velocd 06-12-2002 02:54 AM

And another of the taking-quiz interface:

Lionel 06-12-2002 02:55 AM

Quote:

Originally posted by TWTCommish

Lionel: I'm not sure what you mean. The templates are all built to use your header template contents automatically.

in some templates I replaced $header with a different $header, or I simply paste the full html code instead of $header. Like that I am able to make use of different banners in different sections.

Recluse 06-12-2002 05:56 AM

ok i used the first install script, default templates, no other styles, the quiz templates are there, Linux / PHP v4.1.2, MySQL v3.23.45, 2.2.6 vb and the quiz.php is a blank page :(

BigJohnson 06-12-2002 07:57 AM

I am also getting the

Fatal error: Unsupported operand types in /usr/local/psa/home/vhosts/new-dimensionz.com/httpdocs/messageboard/quiz.php on line 350

error when i click the take this quiz button as well. I read through this thread and saw that the issue is trying to be fixed. These are my server settings

Server Type
Linux / PHP v4.1.0

MySQL
v3.23.46

bandersen 06-12-2002 08:06 AM

Quote:


bandersen: I'm not sure if this is exactly compatible with a version of PHP that early or not. You might have to ditch all instances of the $HTTP_POST_VARS[] array. [/B]
Hi - I was using PHP 4.0!
I also had the image error - but included the code below in the quiz description and the image showed.

<img border="0" valign="center" src="images/quizzes/linktous.jpg">

SteelFrog 06-12-2002 09:16 AM

Great hack!!! After 5 minutes it was up and running! Thanks!

Dark_Wizard 06-12-2002 10:43 AM

Quote:

Originally posted by Lionel
TWT, can a moderator add a quiz?
Yes he can if you copy the admin_quiz file into the mod directory and make changes to the index.php also in that directory...I have it working that way. Now if we can only solve the operand error. Maybe FireFly has some ideas?

Boofo 06-12-2002 12:17 PM

Sorry to say, sir, I just got through adding a quiz and all works great until I try to take it..and guess what. :)

Code:

Fatal error: Unsupported operand types in /home/virtual/site3/fst/var/www/html/forum/quiz.php on line 350
I'm using Linux / PHP v4.0.6 Safe Mode and MySQL v3.23.36
if that helps at all. :)

Quote:

Originally posted by TWTCommish
I don't understand that last part...the 350 error is seperate. The Admin CP submission doesn't fix that.

To see what version of PHP you're running, create a file with this inside, and run it:

PHP Code:

<?php
  phpinfo
();
?>

As for the images: you probably forget to create the dir and chmod it properly. Again, it's in the instructions.txt file. If you've chmoded it 777 and it STILL doesn't work, then it's likely a server issue.


TWTCommish 06-12-2002 12:22 PM

Alright, I'll see if I can fix this line 350 stuff.

Lionel: I don't understand what you're asking. The quiz templates, by default, use your header template. I'm not sure what else you're asking for.

Boofo 06-12-2002 12:28 PM

I have no doubt in my mind that you'll find a fix for it. :) I saw those errors reported before I even installed it and installed it anyway knowing you would find a fix if I needed it. :)

(That's enough sucking up now, back to work!) :)

Quote:

Originally posted by TWTCommish
Alright, I'll see if I can fix this line 350 stuff.

Lionel: I don't understand what you're asking. The quiz templates, by default, use your header template. I'm not sure what else you're asking for.


TWTCommish 06-12-2002 02:02 PM

Okay. This should help those of you with the line 350 error. Upload the attached quiz.php file over your current quiz.php file, and change your quiz_question template so that it contains the same text as the attached file in the next post.

I have NOT tested this (I can't duplicate the problem)...but it's worth a try.

TWTCommish 06-12-2002 02:04 PM

Here ya' go...

Boofo 06-12-2002 02:18 PM

That worked, partially. Do we need to re-eneter the quiz and questions? If not, then the first question in my quiz was actually the second question and there was no second question showinh up, just the answers. :)

But it DID make the nasty error go away! :)

TWTCommish 06-12-2002 02:18 PM

Ok, I was partially expecting that. Hang on, I'll re-post a fixed quiz.php file...my bad. :)

TalkHardRandy 06-12-2002 02:21 PM

So far so good... I'm taking a quiz right now to see if it goes through all the way.

You rock TWT!!!!

Boofo 06-12-2002 02:23 PM

TalkHardRandy,

Where did you get that avatar? I'm looking for a one with Jay in it like that. :)

Quote:

Originally posted by TalkHardRandy
So far so good... I'm taking a quiz right now to see if it goes through all the way.

You rock TWT!!!!


TalkHardRandy 06-12-2002 02:28 PM

Quote:

Originally posted by Boofo
Where did you get that avatar? I'm looking for a one with Jay in it like that. :)
http://www.viewaskew.com and my copy of Paint Shop.

If you poke around the site, there is a lot of animated pics of Jay, SB, and some of the other View Askew people.

Boofo 06-12-2002 02:36 PM

Great site! But that leaves me out. I'm no good with the graphics programs. :)

Quote:

Originally posted by TalkHardRandy


http://www.viewaskew.com and my copy of Paint Shop.

If you poke around the site, there is a lot of animated pics of Jay, SB, and some of the other View Askew people.


bandersen 06-12-2002 03:21 PM

hey -it's working here too!!! ...except the quiz question only shows as the number, and the bar does not show anything.
I am so glad the PHP version turned out OK :) Puh...

TalkHardRandy 06-12-2002 03:30 PM

Quiz is working, sorta...

I have three quizes created thus far, and it's putting the answers from the first quiz on all the quizes... unless all the Monty Python characters were actually American astronauts...

Lionel 06-12-2002 03:32 PM

Quote:

Lionel: no, not with this setup, but I'm sure it could be modified to do so. Perhaps just by uploading the file to the /mod dir too and making the changes to that index.php file...but I'm not sure. [/B]
That worked! That hack is a major addition to vbulletin. Great work.

Boofo 06-12-2002 03:37 PM

They weren't? I failed the quiz before I even took it, how bad is that? :)

Quote:

Originally posted by TalkHardRandy
Quiz is working, sorta...

I have three quizes created thus far, and it's putting the answers from the first quiz on all the quizes... unless all the Monty Python characters were actually American astronauts...


dawl 06-12-2002 04:26 PM

Installed this and all works just peachy ...UNTIL LOL

you go to take the quiz, I suppose if you're shooting for blind guesses it's ok, but the users would really like to see the questions LOL

all I get is the question # - no question I've attached a Screen shot - any ideas ??

Dark_Wizard 06-12-2002 04:46 PM

Quote:

Originally posted by dawl
Installed this and all works just peachy ...UNTIL LOL

you go to take the quiz, I suppose if you're shooting for blind guesses it's ok, but the users would really like to see the questions LOL


all I get is the question # - no question I've attached a Screen shot - any ideas ??

Getting same thing...also when you go back into the category of the quiz you just took it says "Taken: Never" even though I took the quiz. When you click on the link the popup says "No matching results found" under the username...

dawl 06-12-2002 04:50 PM

Now my answer radio buttons aren't showing up either

dawl 06-12-2002 04:55 PM

ROFL Ok, got the above problems fixed, now what do I do about this one ---> Your Score: 3 of 3 (99%)

TWTCommish 06-12-2002 05:00 PM

Hang on guys, I can only fix 2,543 bugs at once. :D The fix posted above for the 350 error is NOT perfect...I'm still working on it...I had to post it to see if I was making progress, though. And you answers SHOULD be there no matter what, unless you went in and messed with something, or added a question without answers.

dawl 06-12-2002 05:09 PM

LOL I got it, i'm happy now :-) the 99% i can live with, I'm sure it was my mistake that caused the other problems !

Thanks for an EXCELLENT hack ! My members are going to LOVE this one !

Dean C 06-12-2002 06:12 PM

i have found a bug (i think)

when you go to edit a quiz category when you get to the screen where u change the category name and description the boxes where the current data should be in are blank....

TWTCommish 06-12-2002 06:18 PM

I don't understand how...that doesn't happen to me. Is anyone else having trouble editing their categories?

Dean C 06-12-2002 06:56 PM

well it isn't a problem as i wouldn't often need to edit a category...

also i have found a problem with the actualy quiz.php when it is run in your forums... but this is a template problem...

the recently added quizzes is on the left and the quiz categories and the rest is on the right... however the quiz categories and the easiest quiz etc etc, scrolls a long way to the right meaning you have a horizontal scrollbar....
ideally i would like the quiz categories above the recently added quizzes bit... i tried editing the "quiz" template and it i have a loose tag somewhere now... so if you could do this new template edit i would be most grateful

Thanks in Advance

TWTCommish 06-12-2002 06:58 PM

I honestly don't understand what it is you're asking. There is no horizontal scrollbar if you use the defaults...I tried it myself. If you're getting a horizontal scrollbar, either you've changed the templates in some way, or your header is causing a conflict...which wouldn't surprise me, because they often do.

Dean C 06-12-2002 07:00 PM

well i have edited my quiz template because of the quiz categories and easiest quiz scrolling to the right...

Ill attach a screenshot in my next post:

Dean C 06-12-2002 07:05 PM

Screenshot:

ceo_tfw 06-12-2002 07:13 PM

on my last post TWTCommish, I was meant to say that I did do the vbulletin options and the sql error went, and now the blank screen due to no templates and now uploaded the two new files quiz.php and install_quiz.php. I executed the install with my template set at 2 and templates did install with no problems. The only problem now is that the questions and tick boxes do not show,

Hard_one 06-12-2002 07:26 PM

can anyone post the quiz_question template please ?

ceo_tfw 06-12-2002 07:30 PM

here it the quiz_question template

PHP Code:


<html>
<
head>
<
title>$bbtitle Quizzes $quiz[quiztitle] - $quiz_header</title>
$headinclude

  
<script language="JavaScript">
    function 
checkanswer(answerform) {
    var 
temp;

      for (var 
0$answer_counti++) {
        
temp answerform.user_answer[i];
          if (
temp.checked == true) {
            return 
true;
          }
        }

      
alert("You must select an answer.");
      return 
false;
    }
  </
script>
</
head>

<
body>
$header

<!-- breadcrumb -->
<
table cellpadding="2" cellspacing="0" border="0" width="95%"  align="center">
  <
tr>
    <
td width="100%"><normalfont color="white"><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &nbsp;$joiner&nbsp; <a href="quiz.php?s=$session[sessionhash]">Quizzes</a$joiner <a href="quiz.php?s=$session[sessionhash]&quizid=$quiz[quizid]">$quiz[quiztitle]</a$joiner Question $question_number</b></normalfont></td>
  </
tr>
</
table>
<!-- /
breadcrumb -->

<
form action="$bburl/quiz.php?quizid=$quiz[quizid]&taking=1" method="post" onsubmit="return checkanswer(this);">
<
input type="hidden" name="question" value="$num">
<
input type="hidden" name="timecheck" value="$timecheck">

<
table cellpadding="4" cellspacing="0" border="0" width="95%"  align="center">
  <
tr>
    <
td width="100%" bgcolor="#1D6AA0" valign="middle" colspan="4"><normalfont color="#EEEEFF"><b>Quizzes $quiz[quiztitle] - Question $question_number</b></normalfont></td>
  </
tr>
</
table>


<
table cellpadding="8" cellspacing="2" border="0" width="95%"  align="center">
  <
tr>
    <
td width="100%" bgcolor="#1C5780" valign="top"><normalfont>$question[questiontext]</normalfont><hr/>

<
table cellpadding="0 cellspacing="0" border="0" width="95%"  align="center" bgcolor="#13486D"><tr><td width="100%">
  
<table cellpadding="2" cellspacing="1 border="0" width="100%"  align="center">
    
$answerbits
  </table>
</td></tr></table>
</td></tr></table>

<br/>

<table cellpadding="
2" cellspacing="0" border="0" width="95%"  align="center">
  <tr>
    <td width="
100%" valign="middle" align="center"><input type="submit" name="questionsubmit" value="$button_text" class="black"></td>
  </tr>
</table>
</form>

$footer
</body>
</html> 


Hard_one 06-12-2002 07:33 PM

thx dude :)

bandersen 06-12-2002 08:32 PM

Can someone tell me where I modify the email that is sent out - the "from" and "subject" part? The rest I see.


All times are GMT. The time now is 09:15 PM.

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.01561 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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