Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I do this?

  • Is it possible that users are required to take a quiz of 10 questions, and answer 9 of them right to gain posting privileges? This also includes users integrated from WP.

Viewing 7 replies - 1 through 7 (of 7 total)

  • kevinjohngallagher
    Member

    @kevinjohngallagher

    Yes, it’s possible, but you’d have to entirely code it yourself.

    It’s not a plugin thing or something we could write for you.

    Also, unless its very particular and of interest to the people taking the quiz, it’s a horrible thing to do.


    _ck_
    Participant

    @_ck_

    Probably some kind of specialty forum.

    Just use sessions to do it.

    I guess I might take a shot at coding a bbPress plugin. Here’s what I was thinking of:

    Adding an additional role that doesn’t allow posting, but is set as the default role. If that is detected, a message will appear telling the user about that, they can click on a link that will open a fancybox and show the quiz. If 9/10 or 10/10 of the questions were right, set some kind of cookie that changes the role to a member that can post. Just double-checking if my idea seems valid.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    Seems valid mate, or you could not bother with the role chaning bit, and just test for a meta_key/meta_value pair in the database.

    How would I set a meta_key/meta_value pair? Is there an API for it or do I have to run a direct SQL query? A meta_key/meta_value pair is per user, right? Sorry for all the dumb questions, I’ve never programmed a bbPress or WordPress plugin.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    No question is dumb mate, though the idea of testing your users to get 9/10 questions right before allowing them to talk on a forum might be very close to it ;-)

    It’s just a SQL call.

    You can store the information you need in the “_meta” table.

    Basically don’t think about it as a bbPress plugin, just code the PHP as you would if it was a website you’d built yourself.

    OK, thanks, I will give it a shot. I might not use the concept on the live site, but more as a way for a user to gain special privileges, like editing the wiki

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar