jewlofthelotus / SlickQuiz-WordPress

SlickQuiz is a plugin for displaying and managing pretty, dynamic quizzes. It uses the SlickQuiz jQuery plugin.
http://wordpress.org/extend/plugins/slickquiz
Other
18 stars 19 forks source link

=== SlickQuiz === Contributors: jewlofthelotus Donate link: http://www.gofundme.com/slickquiz Tags: quiz, test, jquery, javascript, education, elearning, generator, manager, question, answer, score, rank Requires at least: 3.0 Tested up to: 4.1 Stable tag: 1.3.7.1 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl.html

SlickQuiz is a plugin for displaying and managing pretty, dynamic quizzes. It uses the SlickQuiz jQuery plugin.

== Description ==

Create and manage pretty, dynamic quizzes using the SlickQuiz jQuery plugin.

Managing and creating new quizzes is simple and intuitive.

More Features:

Created by Julie Cameron. Based off the SlickQuiz jQuery plugin.

The SlickQuiz WordPress Plugin is now open source - contribute on Github

== Installation ==

  1. Install the SlickQuiz plugin directly from the WordPress plugin directory. Or upload the SlickQuiz plugin to your /wp-content/plugins/ directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Create / publish quizzes via the "SlickQuizzes" option in the WordPress sidebar.
  4. To add a quiz to a post or page, place [slickquiz id=X] the content area, where X is the ID of the quiz you created. The ID can be found in the main SlickQuiz listing.

= Dynamic URL Shortcode Setup =

You may also dynamically render a quiz by setting the shortcode to [slickquiz id=url]. This will tell the plugin to look for an ID at the end of the page URL and select the quiz with that ID. Note: additional query string parameters will not interfere.

= Text Widget Setup =

To use the [slickquiz id=X] shortcode in the sidebar Text widget, add the following to yours theme's functions.php file.

add_filter( 'widget_text', 'do_shortcode' )

= Developer Hooks =

There are currently three filter actions that you may hook into:

slickquiz_admin_options This allows you to add custom admin options.

slickquiz_after_options This allows you to add custom markup to the bottom of SlickQuiz Options form (you would likely add data to your custom slickquiz_admin_options here).

slickquiz_after_result This allows you to add custom markup to the bottom of the quiz results area at the end of the quiz (you would likely output data from your custom slickquiz_admin_options here).

For an example of how to utilize these hooks, see this gist.

= Saving Additional Quiz Data =

It is possible to store extra data along with the main quiz JSON object. This would be useful if you're extending the quiz or integrating it with another plugin.

There is currently one JavaScript callback that you may use to add data when a quiz is saved to a draft or published. It will save extra data to an attribute named "extra" in the quiz JSON object. You would call it like below:

jQuery(document).ready(function($) { $.fn.setPreSaveQuiz(function () { // Append some "extra" data to the SlickQuiz POST. return { some: 'data', another: 'piece of data' }; }); });

There is also a slickquiz_save_quiz WordPress action you can use to grab the quiz and extract the "extra" data when the quiz is saved to a draft or published. You might set up something like this:

`class YourCustomClass { function __construct() { add_action('slickquiz_save_quiz', array( &$this, 'custom_quiz_data_action' )); }

function custom_quiz_data_action( $quiz, $mode = 'create_draft' ) { $data = json_decode( $_POST['json'] ); $extra = $data->extra; // Do custom stuff } }`

Note, the $mode option will return one of the following values: 'create_draft', 'create_published', 'update_draft', 'update_published'

== Frequently Asked Questions ==

= Why can't I see the quiz Preview? =

The quiz Preview opens in a popup window. You may need to allow popups for the domain in your browser. Check the URL bar for a popup-blocked indicator and click it for more information.

= Why isn't the quiz showing up on my page? OR why is the quiz broken? =

There are a lot of reasons this could be happening - usually there is an issue with the theme or a conflict with another plugin. Here are a few things to look for:

<?php wp_footer(); ?>

= Why does my quiz have weird spacing or strange colors? =

You may have pasted the shortcode into the "Visual" mode of the page / post text editor, which may have wrapped the shortcode in extra, unnecessary code tags.

To check for this, go to the edit view of the post or page where you entered the shortcode and toggle the editor to "Text" mode (this option is the 2nd tab in the upper right of the text editor). Now, look for your shortcode and remove any <code> tags that may be surrounding it.

If you do not find any code tags, there may be other CSS conflicts with your theme to address. Please create a new support ticket with the details of your issue.

= Can I add pictures / videos / media / HTML to my questions / answers / responses? =

Yes, you can place any HTML tags that you like within any of the content fields. For images, get the URL of the image you want to add, and use something like the following to add the image to a content area:

<img src="https://github.com/jewlofthelotus/SlickQuiz-WordPress/raw/master/uploads/2014/02/my_photo.jpg">

= Is there a way to email user scores and answers? =

Yes, if you "Enable sharing buttons" from the SlickQuiz Options page, your users will have a button to email their results at the end of the quiz. Currently, this feature does not capture all answers - only the user's overall score and ranking.

= How do I make sure Facebook share includes my quiz image? =

To customize Facebook share content, it's best to use a plugin like: Add Meta Tags to set Facebook's Open Graph meta data on a page by page basis.

Each Facebook Open Graph meta data tag that you enter should look something like this:

<meta property="og:image" content="http://www.xxx.com/images/xxx.jpg" />

= Can I put the same quiz on the same page multiple times? =

Nope, things will break. This might happen if you place the same quiz within multiple blog posts and more than one of those posts is displayed on the page.

= I've got an idea for a feature or have a bug to report, what should I do? =

Checkout the SlickQuiz WordPress Support forum to see if someone else has experienced your issue, the answer might already be there; if not - please create a new support ticket!

Also, see the SlickQuiz Issues page on Github for a complete list of upcoming features and bug fixes, and feel free to add your own ideas!

== Screenshots ==

  1. The quiz management / listing interface.
  2. Creating a quiz.
  3. Adding quiz questions.
  4. A quiz embedded in a post - your styles will vary depending on your theme and preferences.
  5. The plugin options allow you to alter messages and quiz features.
  6. When user score saving is enabled, the user will be prompted for their name before starting the quiz, unless they're already logged in.
  7. The listing of user scores when saving is enabled.

== Changelog ==

= 1.3.7.1 =

= 1.3.7 =

= 1.3.6.1 =

= 1.3.6 =

= 1.3.5 =

= 1.3.4 =

= 1.3.3 =

= 1.3.2 =

= 1.3.1 =

= 1.3 =

= 1.2.373 =

= 1.2.372 =

= 1.2.371 =

= 1.2.37 =

= 1.2.36 =

= 1.2.35 =

= 1.2.34 =

= 1.2.33 =

= 1.2.32 =

= 1.2.21 =

= 1.2.2 =

= 1.2.1 =

= 1.2.0 =

= 1.1.8 =

= 1.1.7 =

= 1.1.6 =

= 1.1.5 =

= 1.1.4 =

= 1.1.3 =

= 1.1.2 =

= 1.1.1 =

= 1.1.0 =

= 1.0.19 =

= 1.0.18 =

= 1.0.17 =

= 1.0.16 =

= 1.0.15 =

= 1.0.14 =

= 1.0.13 =

= 1.0.12 =

= 1.0.1 =

= 1.0 = This is the initial setup of the plugin.

== Upgrade Notice ==

= 1.3.7.1 =

= 1.3.7 =

= 1.3.6.1 =

= 1.3.6 =

= 1.3.5 =

= 1.3.4 =

= 1.3.3 =

= 1.3.2 =

= 1.3.1 =

= 1.3 =

= 1.2.373 =

= 1.2.372 =

= 1.2.371 =

= 1.2.37 =

= 1.2.36 =

= 1.2.35 =

= 1.2.34 =

= 1.2.33 =

= 1.2.32 =

= 1.2.21 =

= 1.2.2 =

= 1.2.1 =

= 1.2.0 =

= 1.1.8 =

= 1.1.7 =

= 1.1.6 =

= 1.1.5 =

= 1.1.4 =

= 1.1.3 =

= 1.1.2 =

= 1.1.1 =

= 1.1.0 =

= 1.0.19 =

= 1.0.18 =

= 1.0.17 =

= 1.0.16 =

= 1.0.15 =

= 1.0.14 =

= 1.0.13 =

= 1.0.12 =

= 1.0.1 = Updating the SlickQuiz jQuery plugin. New back button and random sorting options. Bug fixes!

= 1.0 = This is the first version of the plugin