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)

insanctus 04-20-2004 05:39 PM

Once I finish off a paid job I am working on , I will go thru and finish the quiz up (have a few little things to change but it is working fully as of now)

Mainly you just have to remember when doing these, is changing the calls in php, and then mass replacing in templates as well.

sabret00the 04-21-2004 07:41 AM

wow, light at the end of the tunnel :)

lmongello 04-22-2004 12:18 AM

insanctus,

Thanks for offering to make the modifications for all of us! If possible, can you include some relatively detailed instructions (e.g. eith regard to the templates, etc.) for amateurs like me? (rather than us bombarding you with requests and questions, etc.)

THANKS!!!

Areku 04-22-2004 08:27 PM

So cool insanctus!

Go ahead pppplllllzzzz! :P

Areku 04-26-2004 10:31 AM

Any update m8!?? ;)

lmongello 04-27-2004 02:49 PM

insantus... no pressuure here (just curious)... any sort of idea of how long it may be before you may have this ready to roll? Thanks!!! We appreciate it.

TWTCommish 04-27-2004 04:10 PM

Hi guys.

I'm still looking at updating this for vB 3 sometime soon. At least for the user side. It could be a month or two, though, as I can't yet justify putting so much free time into such a project. I do plan to rewrite it, though.

sabret00the 04-27-2004 04:55 PM

does that mean Insanctus won't be allowed to release his port of the code?

TWTCommish 04-27-2004 05:02 PM

Not necessarily. But I do think he's underestimating just what the port involves. He says it's just a matter of search-and-replace, but when I re-wrote vB Glossary to work with vB 3, it was more than that. Certain functions need to be renamed...others are flat-out gone. Navbars are constructed differently. Etc.

If he wants to release his own version, he can. If and when I do it, I'll do it by devoting the time to it that it deserves, to ensure that it meets the high standards of the first one.

sabret00the 04-27-2004 05:04 PM

Quote:

Originally Posted by TWTCommish
Not necessarily. But I do think he's underestimating just what the port involves. He says it's just a matter of search-and-replace, but when I re-wrote vB Glossary to work with vB 3, it was more than that. Certain functions need to be renamed...others are flat-out gone. Navbars are constructed differently. Etc.

If he wants to release his own version, he can. If and when I do it, I'll do it by devoting the time to it that it deserves, to ensure that it meets the high standards of the first one.

thank you, i can't wait to see it, as theirs a few quiz hacks in production at the moment and this has been such an integral part of my forums. :)

Areku 04-28-2004 07:49 PM

Definetly on my movie one too...

Insanctus hasn't reapeared on this thread anyway... he hasn't report any problems with his port also..

insanctus 04-28-2004 07:58 PM

I figure let the 'creator' release his.

Only trouble with mine is I switched the tags in templates.

I been playing with the two scripts in my sig, more fun :)

lmongello 04-28-2004 08:04 PM

I have been speaking with someone who may be interested in developing the quiz with vB integration like the original hack, but may be looking to sell the final product for a small fee for all of his work. Would anyone be interested in this? If so, what type of cost do you think is reasonable?

I have a quiz on my site, but want to get one like this up ASAP. Although I would like the original developer to do it, please understand that I am hesitatnt to wait a couple of months and not be sure it will ever be released.

Areku 04-28-2004 08:08 PM

I already said YES as long as we can import the old scores and results and so on...

TWTCommish 04-28-2004 09:11 PM

How much genuine interest is in there in purchasing an updated version for a small fee, assuming it works with the data from the original hack? If there's enough, I might be able to justify giving it a much higher priority.

Areku 04-28-2004 09:14 PM

You have at least 3 webmasters interested, you put the price... I definetly need it working on vb3 with the old data in it, of course ;)

lmongello 04-28-2004 10:06 PM

If you can get a working version quickly, I would be interested in paying a fee for it (assuming it works, of course) ;)

Areku 05-01-2004 03:21 PM

So? ;)

TWTCommish 05-01-2004 03:38 PM

Anyone else? Just gauging public opinion.

sabret00the 05-01-2004 04:14 PM

if it's anything like that? https://vborg.vbsupport.ru/showthread.php?t=63702

then put my name down.

bjornstrom 05-03-2004 09:22 PM

Quote:

Originally Posted by TWTCommish
How much genuine interest is in there in purchasing an updated version for a small fee, assuming it works with the data from the original hack? If there's enough, I might be able to justify giving it a much higher priority.

I would be willing to pay $100 to get it going again :)

(my icq: 78300353 - i use paypal)

insanctus 05-03-2004 09:27 PM

I should sell you mine that is just a port over ~ laughs lol

bjornstrom 05-04-2004 09:39 AM

My problem is that we used vB Quiz for several months and created serveral quizzez that thousands participated in. We even developed our own "top 100" list and more. I'd love to get it going again.

sabret00the 05-04-2004 11:04 AM

Quote:

Originally Posted by insanctus
I should sell you mine that is just a port over ~ laughs lol

you still aint released yours yet :ermm: :p

Areku 05-05-2004 11:32 AM

bjornstorm, which is your site? That is a must see to believe! ;)

$100 is way too much for me to pay, i hope no1 has read u and coders will release it cheaper, but PLEASE release it, any1!

lmongello 05-10-2004 04:21 PM

bumping and looking for an update...

TWTCommish 05-10-2004 05:38 PM

Sorry for the delays. I have a fair amount of "day job" work this week, but have already started a bit of preliminary work at making this a reality. I'll continue this weekend and update you all when I have time.

Thank you for your patience.

Emmy2 05-14-2004 04:14 AM

This is a really nice hack. I've added it but am trying to fine tune it. I've just spent about 3 hours reading through this thread and trying the different suggestions for getting the hack to do what I'd like.

I've figured out one thing that was not successfully answered in the thread and would like to share the information.

This is for how to add an image to a quiz question. The various fixes already suggested didn't work for me (ie. changing the View Images option in the control panel to "yes", using the img vbcodes to insert the image (just got a link when I did that), using html code (didn't work because my board doesn't accept html so I just got the code, no image) and then finally Chris's suggestion for making one forum on the board accept html and then using that forum number in the quiz.php code. That is actually the way I got it to work but the original information was incorrect. Post numbers 548, 549 and 551 outline the problem and suggested fix.

The suggestion was to change this code....

PHP Code:

$quiz[description] = bbcodeparse($quiz[description]); 

to this....

PHP Code:

$quiz[description] = bbcodeparse($quiz[description], X); 

(where X is the number of a forum on your board that accepts html...I set my managment forum (number 13) to accept html since only only admins have access to it)

anyway, the correct change should be to find this code in quiz.php....

PHP Code:

$question[questiontext] = bbcodeparse($question[questiontext]); 

and change it to this....

PHP Code:

$question[questiontext] = bbcodeparse($question[questiontext], X); 

Again, replacing X with the number of a forum on your board which accepts html. The reason this works and the other didn't....your image is in the text of the question, not the description of the quiz!

Anyway, this worked like a charm for me and I can now add images to quiz questions using html so I hope it helps others as well.

IMPORTANT EDIT: read on a few posts to see how to accomplish image insertion using VBCODE instead of html (even if your previous vbcode didn't work)!!!!!

Emmy2 05-14-2004 04:57 AM

One other important note...

If you also want the image to show up on the results page (instead of the html code showing) you need to also do the same fix on the $result[questiontext] line.

Areku 05-14-2004 08:53 AM

Where can we see this in action emmy2?

Emmy2 05-14-2004 10:48 AM

LOL, you caught me off-guard! I'm still fiddling with my Quiz Center and have a lot of wonky display (haven't released it to my members yet) but give me a day or two and I'll set up a quiz and a test user account if anyone wants to have a look.

Emmy2 05-14-2004 12:49 PM

STOP THE PRESSES!!

There is another way to do this without using html!!!

I just kept thinking about the process....what the change in code was essentially doing was telling the system to parse the question text field just like it parses text in the forum specified (in my case forumid 13). So, because I enabled html in forum 13 it would parse any html I entered in the quiz question, and hence display my images.

BUT, I got to thinking......maybe the problem with using the vbcodes (in my case using vbcodes didn't work...I just got the image url as a link) was because it wasn't told what forum to mimic for parsing vbcodes. In other words.....if I have vbcode enabled in forum 13 and I tell it to mimic forum 13 (by replacing the X in the previous code) and then I USE vbcode in the quiz question will it work? The answer is YES!!!! I tried it! (so actually right now, I can use both html and vbcodes to insert images....unless I remove the html permissions for forum 13).

So for anyone who can't get images to show up in quiz questions using vbcode (ie. you get a link instead of an image) all you need to do is tell it to mimic one of your forums that has vbcode enabled (all of mine do, so any forum number will work) and then use VBCODE to insert your images!!!

I prefer this method as I'm always hesitant to enable html anywhere, even for other mods/admins.

Where's the happy dancing emoticon??? :p

Emmy2 05-14-2004 03:27 PM

ok, this is very very rough but I've put a quiz up on my site that uses images (the first image is posted using html, the second using vbcodes...so you can see both work with the modification). I've also created a test account for anyone who wants to log in to view the quiz.

I'm putting the information inside code tags so I only get vbulletin traffic....also, I will remove the test account after a bit so if you miss the trial period you'll have to register to the site.

PHP Code:

The test account is....

usernamevbulletin
password
vbtest

Address 
for a quiz using images....

[
url]http://bonanzaworld.net/forums/quiz.php?s=&quizid=6[/url] 

I'm sure I could do a lot more with the code and tags (like centering the image etc.) but this is just a rough mock-up.

Emmy2 05-14-2004 03:36 PM

My brain is still working here.....

I wonder if it's possible to use images in the ANSWER fields. For example, the question is "Which of the pictures below is the winkey smiley?" and then the four choices are pictures ....

- :)
- :D
- ;)
- :(

And respondents choose the right picture by clicking the radio button next to it. Seems doable, will check it out.

lmongello 05-14-2004 04:19 PM

Looks great.. too bad it's not for vb3 :ermm:

Emmy2 05-14-2004 11:56 PM

Yes it is possible to put images in your answer text using a very similar modification to the script (although watch out for the replacement variable for correct_answer).

TWTCommish 05-16-2004 02:50 PM

Just to let you all know, I've fiddled with the old code a bit and so far things are going well. I've got a few new ideas that I'll be exploring. All in all it could be a few more weeks, at least, until I've got some kind of beta version out, but I'll keep at it and update you all before long.

cinq 05-16-2004 03:21 PM

Fantastic Chris :D
Using the existing version, can't wait for what you have in store for us in the next :)

Emmy2 05-17-2004 01:31 PM

I really love this script and am having fun setting it up for my members to use.

Chris (or anyone if you can help) is it possible to display how many questions are in a quiz on the Recently Added Quizzes page (along with the title and description information), and on the quizid page (where it lists top scorers)? So instead of say, 9, it would say 9/10? I think I saw this on someone else's quiz page here. Right now the only place the number of questions shows up is on the Results page when it tells you you got 9 out of 10 (90%) correct. I tried a few things (just inserting the $question_count variable I found on the results page on those other pages but it didn't work....also tried $quiz[question_count] but that didn't work either....maybe cuz I'm just guessing here :p).

Is there a way to do this? Any help much appreciated!

Emmy2 05-17-2004 09:29 PM

I've got another question about vbquiz. I used the add-on below so my users can leave comments on quizzes....I have 2 questions though....one, the comments entered are displayed from oldest to newest....is there a way to have them display from newest to oldest? (essentially the opposite of what I have in the forums, but it would seem to work better for the quizzes to have the most recent comments at the top). Second, the comments just pile up infinitely...ie. they don't ever go onto a second page. Not that I'm expecting LOTS of comments on the quizzes but if over time I accumulated 40 or 50 comments that's a lot to display on one page. Anything that can be done for that?

Any help appreciated.

Quote:

Originally Posted by LangTuDaTinh
PHP Code:


//- Add a new table 

CREATE TABLE `quiz_comments` (
  `
cidint(10NOT NULL auto_increment,
  `
quizidint(10NOT NULL default '0',
  `
useridint(25NOT NULL default '0',
  `
dateint(11NOT NULL default '0',
  `
commentstext NOT NULL,
  
PRIMARY KEY  (`cid`),
  
KEY `cid` (`cid`),
  
KEY `userid` (`userid`),
  
KEY `id` (`quizid`)
TYPE=MyISAM;

//- find in quiz.php --------------

MORE WITH THIS SCORE

//- add above it-------------------


// ------------------------------------- DELETE COMMENTS START--------------------------------------------
if ($action=="delcomment"
{
    if (
$bbuserinfo['usergroupid']==6)
        {
            
$DB_site->query("DELETE FROM quiz_comments
                         WHERE cid = '
$cid'");
                           
        }
     eval(
"standardredirect(\"".gettemplate("quiz_comments_delete")."\",\"quiz.php?s=$session[sessionhash]&quizid=$quizid\");");

}

if (
$action=="savecomment")
    {
        
$time time();
         
$quiz $DB_site->query("INSERT INTO quiz_comments (cid, quizid, userid, date , comments) 
                            VALUES (NULL,"
.intval($quizid).", ".intval($userid).", ".time().", '".addslashes($comments)."')");
        eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"quiz.php?s=$session[sessionhash]&quizid=$quizid\");");
    }


// ------------------------------------- DELETE COMMENTS END --------------------------------------------


//- find in quiz.php --------------

    
$time time();
    eval(
"dooutput(\"".gettemplate("quiz_display")."\");");


//- add above it-------------------


//////////////////////////////////////////////////////////////////////////////////////////////////////////
    
$quizcommentr $DB_site->query("SELECT r.comments, r.date, r.cid,
                                             u.userid, u.username
                                      FROM quiz_comments r, user u
                                      WHERE r.quizid = "
.intval($quizid)."
                                        AND r.userid = u.userid
                                      ORDER BY r.cid ASC
                                      "
);

        while (
$quizcomment $DB_site->fetch_array($quizcommentr)) 
            {
                
$quizcomment[comments] = bbcodeparse(stripslashes($quizcomment[comments]));
                
$cid=$quizcomment[cid];
                  
$quizcomment[date] = vbdate("$dateformat$timeformat"$quizcomment[date]);
                  
                if (
$bbuserinfo[usergroupid]==6
                    {
                        
$quizcommentdel ="<smallfont color=\"#008080\">[<a href=\"quiz.php?s=$session[sessionhash]&quizid=$quizid&action=delcomment&cid=$cid\">Delete</a>]</smallfont>";
                    }  
                if(
$quizcomment[comments]!="")
                    {
                          eval(
"\$quizdisplaybit .= \"".gettemplate("quiz_comments_displaybit")."\";");
                    }
 
            }
                eval(
"\$quiz_display = \"".gettemplate("quiz_comments_display")."\";");

           

//////////////////////////////////////////////////////////////////////////////////////////////////////////


ADD NEW TEMPLATES


//------------ADD NEW "quiz_comments_delete 

Comment deleted successfullyyou will return to the quiz.



//------------ADD NEW "quiz_comments_display 

  
<table width="100%" cellpadding="4" cellspacing="0" border="0" bgcolor="#9999FF">
    <
tr bgcolor="#9999FF">
      <
td colspan="2" width="100%" valign="middle"><normalfont color="#000000"><b>Quiz Discussion</b></normalfont></td>
    </
tr>

    
$quizdisplaybit

  
</table>

//------------ADD NEW "quiz_comments_displaybit"

  
<tr bgcolor="#13486D" >
    <
td width="100%" valign="left"><smallfont color="#008080"Posted by: <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$quizcomment[userid]"><b>$quizcomment[username]</a></bon $quizcomment[date] </smallfont></td><td valign="right">$quizcommentdel</td>
  </
tr>

  <
tr width="90%" bgcolor="#1C5780">

    <
td colspan="2" width="100%" valign="left"><normalfont>$quizcomment[comments]</normalfont></td>
  </
tr




All times are GMT. The time now is 08:14 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.01786 seconds
  • Memory Usage 1,919KB
  • 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
  • (6)bbcode_php_printable
  • (4)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