• Resolved mirgcire

    (@mirgcire)


    I am writing dozens of short quizzes for my mandarin course. To be more precise I am writing 3 quizzes for each of the 10 lessons. So I had the bright idea that it would be convenient for the students to find the quizzes in a table that shows which quizzes they have taken, the highest score and a link to popup the quiz in a lightbox.

    I have the quiz-in-a-lightbox-thing working, and I am able to build the table with necessary information. The trouble is that I am my own shortcode to build the table (so that I can use it for multiple courses), but I am not successful at preprocessing the slickquiz shortcode in PHP.

    When I use do_shortcode(“[slickquiz id=’123′]”) to process the code, I do not get the quiz markup. What I get is three lines of text:

    Get Started!
    Your Score:
    Your Ranking:

    Is there a better way to preprocess the shortcode?
    Any suggestions for how to make this work?

    Thanks!

    https://www.ads-software.com/plugins/slickquiz/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter mirgcire

    (@mirgcire)

    It turns out the slickquiz.js was not being loaded.

    As a hack, I added a hidden quiz at the bottom of the page.

    and it WORKED! ??

    I am still curious if there is any more graceful way of doing this

    Plugin Author jewlofthelotus

    (@jewlofthelotus)

    @mirgcire I’ve seen this happening for a few people lately – where the scripts don’t load on the page for some reason. I’ve yet to figure out why, so force loading them on the page is probably your best bet for now.

    If I can ask (and high-jack your post), how did you successfully implement the quiz-in-a-lightbox thing? I’ve been searching all over and have not been successful in setting it up.

    Thanks!

    Yes, I’d love to know how you implemented the lightbox as well.

    The theme I use has great support and they had answered the same question for someone else. Here’s the post:

    https://www.kriesi.at/support/topic/contact-form-in-pop-up-prettyphoto-issue/

    Hope it helps! It worked great for me.

    I should have added: I just replaced the <p>PLACE CONTENT HERE</p> with the slickquiz shortcode and customized the CSS to fit our site.

    Thanks for the link!

    I have been searching for a way to implement slickquiz in a modal as well. I am using Responsive Lightbox plugin, which I believe is based on prettyphoto. Will see if I can get this to work.

    Thread Starter mirgcire

    (@mirgcire)

    @impro300, @understandchristianity, I wasn’t ignoring your questions. I had no idea you asked. WordPress isn’t sending me notifications.

    Anyway, I used “IW Magnific Popup” which is brilliant piece of work, like slickquiz, that is cleanly written, easy to use, and free of extraneous, useless features that seem to accompany other plugins.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to preprocess Slickquiz shortcodes?’ is closed to new replies.