vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Test Your Members' Knowledge Before Allowing Them to Post in Certain Forums (https://vborg.vbsupport.ru/showthread.php?t=93388)

TFEX 06-08-2008 04:38 AM

It seems to be working fine for me in 3.7, no importing errors, but I am still configuring the adminCP options. They are there, however.

My questions are silly ones:

1. Where do I find the quiz id I need to enter?

2. What do I enter for a score? A percentage, or 10/10, etc.?

3. If a user fails, are they able to try again? Would be kind of silly if they were not.

4. Once the quiz is completed for a user, does it go away, or will they have to do it every time they enter the forum?

Thanks.

Alfa1 06-10-2008 12:18 AM

Yes, they are there, but there is no blockade for users. I can still access the forum, without entering any quiz. In fact I do not get anything that alerts to the existence of a quiz.

1. You can go to quiz.php and browse quizzes. quiz.php?do=Take&id=X where X is quizID.
2. Yes, a percentage.
3. I have no idea. I have not seen a function to stop retries. So I guess members cn try again and again. So multiple choice is not adviced.
4. So far they do not have to enter anything.

TFEX 06-10-2008 12:12 PM

Hey thanks for answering Alfa!

Great info, thanks for your help. I'm just not too clear on #4...

What I am looking for is for members to be able to enter the forum after they pass the quiz, without having to take it every time. Is there a flag that is set or something so that the forum remembers they have passed?

Ahh I'll test it out myself tonight and let you know. :) I'm ready to give it a go. My forum isn't live yet so I'll be sure to keep you updated on any issues I might have in 3.7, and maybe we can work them out together. I'm setting it up to quiz members on the specific rules for that particular forum, so I consider this hack ESSENTIAL, and I intend to make it work any way I can with my limited knowledge, haha.

TFEX 06-12-2008 11:52 PM

I apologize profusely, but I looked through the quiz.php and I do not find any mention of specific quiz id's. Shouldn't the quiz I import have the id somewhere in plain sight? This is getting frustrating now, I've been working on this hack for three days. I think I'll just scrap it and redesign my rules. Coders have great minds and come up with the most interesting things, but they're not very good at relating those things to regular people. This, for instance:

Quote:

p.s. If you want your users to have to pass the quiz before they can even read in your forum, copy the plugin code from newthread_start and create new plugins using forumdisplay_start and showthread_start as the hooks with the same source code.
Sure, no problem. Right after I design a better space shuttle for NASA, give me a few minutes.

Sadly, this could have been a great hack if it just had more user-friendly install and configuration options. I am bitterly disappointed, because I feel it's something my forum won't be able to do without.

Alfa1 06-13-2008 09:56 AM

You can find the quizID, by looking at the url. I know it is stupid to have to do it this way, but once you see it, it will be simple. For example:
- Browse to www.yoursite.com/forum/quiz.php
- Then select the category the quiz that you need the quizID from, is in. That url should look like this www.yoursite.com/forum/quiz.php?do=Cat&id=1
- Then select the quiz that you need the quizID from.
- This url should look like:
www.yoursite.com/forum/quiz.php?do=Take&id=1
In my example above '1' is the quizID. Please take a look at your url and note down your quizID.

TFEX 06-13-2008 08:03 PM

Ok so I knocked that one off, thanks again, now I am getting (what appears to be standard from reading the other posts) the "cannot find phrase 'quiz_not_taken'" error.

I created the phrase and assigned it to the product "Must pass quiz to start", but no results. I saw others were having this problem, but there was no solution offered by the coder. Have you managed to figure this one out?

I altered the plugin code from this:

Code:

eval(standard_error(fetch_error('quiz_not_taken',
to this:

Code:

eval(standard_error(fetch_error($vbphrase[quiz_not_taken],
which changed the error message to this:

Quote:

Could not find phrase 'You have not yet taken the quiz to enter this forum. You must do so in order to access it.'.
which is the phrase I assigned to the variable.

I am not very proficient at this so I can only assume I am doing something wrong here. I am so close I can taste it though. Any other suggestions?

Alfa1 06-13-2008 09:20 PM

People will be able to enter the forum, even if they do not pass the quiz.
They will not be able to post if they do not pass.

It seems that there is only a reference to the phrase, but not the phrase itself. The only phrase that this mod seems to add, is quizID prase.

quiz_failed is also not there.
Maybe these phrases once where in Inferno Quiz.

TFEX 06-14-2008 12:25 AM

Quote:

People will be able to enter the forum, even if they do not pass the quiz.
They will not be able to post if they do not pass.
Yeah I gathered that already from this:

Quote:

p.s. If you want your users to have to pass the quiz before they can even read in your forum, copy the plugin code from newthread_start and create new plugins using forumdisplay_start and showthread_start as the hooks with the same source code.

I haven't tested that, but it should work.
Although I have no idea how to go about implementing it... it will be the hurdle I undertake after I get it working.

Quote:

It seems that there is only a reference to the phrase, but not the phrase itself. The only phrase that this mod seems to add, is quizID prase.

quiz_failed is also not there.
Maybe these phrases once where in Inferno Quiz.
Interesting, so what you are saying is you've never solved the issue then? I'll have a look for those references in the plugin code and see what removing them altogether accomplishes, or possibly changing the reference to whatever similar phrase is currently used in Inferno. Would seem like the next logical step to take...

TFEX 06-14-2008 01:09 AM

Ok there seems to be a problem with this code in Amy's plugin:

Code:

else
                {

                        eval(standard_error(fetch_error('quiz_failed', $foruminfo['score'], "<a href='quiz.php?do=Take&id=".$foruminfo[quizid]."'>$quizinfo[q_name]</a>"))); 
                }
        }
        else
        {
         
    eval(standard_error(fetch_error('quiz_not_taken', $foruminfo['score'], "<a href='quiz.php?do=Take&id=".$foruminfo[quizid]."'>$quizinfo[q_name]</a>"))); 
        }
}

Now I am not sure if it's her code or Inferno's yet, so I am going to remove everything and re-install inferno from the ground up using the xml import and making all the necessary mods to the code for 3.7, essentially make sure it works beyond a doubt, and then I'll throw the plugin back in to see what happens. Shouldn't take long, I'll get back to ya.

TFEX 06-14-2008 03:23 AM

OK, well I have managed to get it to work, as in I can set a quiz id to the forum and I get denied posting access, and after I take that particular quiz I can post no problem. What I am having difficulty with is getting the plugin to find the phrases we've been talking about. Once it finds them ok, I can edit them to say whatever I like, even point directly to the quiz if I want.

I edited the xml file for the plugin and added the phrases in there, uninstalled and re-imported, and it puts the phrases into the phrase manager, but the code in the plugin is still not pointing to them correctly. So basically I have confirmed what I said above, that there is a problem with those lines in the code. In particular, these parts of the lines:

Code:

eval(standard_error(fetch_error('quiz_not_taken',
same goes for the "quiz_failed" line.

Here is where my limited knowledge comes into play, as I do not know how to alter those lines to point to the proper phrase, ie "$vbphrase[quiz_not_taken]" So far my attempts have produced mixed results from the standard error:
Quote:

test, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
to the one I mentioned before:
Quote:

Could not find phrase 'You have not yet taken the quiz to enter this forum. You must do so in order to access it.'.
Which is actually pretty close to what I want, minus the "Could not find phrase" of course...

I do not really need the plugin to jump right to the quiz, just to the phrase, and I can direct users to the quiz from there. Any suggestions? I was thinking the entire lines need to be reworked and the error references taken right out, replaced with something that simply directs users to that particular phrase. I will keep going, at least I am making some progress here. :)


All times are GMT. The time now is 07:43 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.01462 seconds
  • Memory Usage 1,757KB
  • 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
  • (4)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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