close

Plugin Directory

Changeset 884765


Ignore:
Timestamp:
03/30/2014 07:47:46 PM (12 years ago)
Author:
13llama
Message:

Using the WordPress permalink function instead of creating the URL structure for redirects.

Location:
quizz
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • quizz/tags/1.02/quizz.php

    r881384 r884765  
    44 * Plugin URI: http://www.13llama.com/quizz
    55 * Description: A plugin that helps you create a simple sequential quiz on WordPress.
    6  * Version: 1.01
    7  * Author: Amit Sharma
     6 * Version: 1.02
     7 * Author: 13 Llama Studio
    88 * Author URI: http://www.13llama.com/
    99 * License: GNU GPL
     
    9595        if ( $correct == "yes" ) {
    9696
    97             if ($last_bool == "last") {
     97            if ($last_bool != "last") {
    9898                // raise a hook for updating record
    9999                do_action( 'quizz_level_updated', $nextlevel[0] );
     
    104104                $goto = $lastpage[0];
    105105            }
    106                 // redirect to next question
    107                 echo "<meta http_equiv='refresh' content='0, " . site_url() . "?p=" . $goto . "' />";
    108                 echo "<script>window.location='" . site_url() . "?p=" . $goto . "';</script>";
     106
     107                // redirect to next question - or last page
     108                echo "<meta http_equiv='refresh' content='0, " . get_post_permalink($goto) . "' />";
     109                echo "<script>window.location='" . get_post_permalink($goto) . "';</script>";
    109110        } else {
    110111
  • quizz/tags/1.02/readme.txt

    r881384 r884765  
    1 Quizz
     1=== Quizz ===
    22A simple quiz plugin
    3 Author: Amit Sharma
     3Contributors: 13llama
     4Tags: quiz, question
     5Author: 13 Llama Studio
    46Author URI: http://www.13llama.com/
    5 Version: 1.01
    6 Date last updated: 25 March 2014
     7Version: 1.02
     8Stable tag: 1.02
     9License: GPLv2 or later
     10License URI: http://www.gnu.org/licenses/gpl-2.0.html
     11Date last updated: 31 March 2014
    712
    8 Description
    9 --
     13Create a sequential quiz on WordPress with the Quizz plugin.
     14
     15== Description ==
     16
    1017Create a sequential quiz on WordPress with the Quizz plugin.
    1118
     
    1724quizz_level_updated: raised when the user's answer is considered correct and they're pushed to the next question
    1825quizz_ended: raised when the list of questions comes to an end, and the user is sent to a designated page (eg. a congratulations page)
     26
     27
     28== Installation ==
     29
     30For an automatic installation through WordPress:
     311. Go to the 'Add New' plugins screen in your WordPress admin area
     321. Search for 'Quizz'
     331. Click 'Install Now' and activate the plugin
     34
     35For a manual installation via FTP:
     361. Upload the addthis folder to the `/wp-content/plugins/` directory
     371. Activate the plugin through the 'Plugins' screen in your WordPress admin area
     38
     39To upload the plugin through WordPress, instead of FTP:
     401. Upload the downloaded zip file on the 'Add New' plugins screen (see the 'Upload' tab) in your WordPress admin area and activate.
     41
     42
     43== Usage ==
     44
     451. Under Questions in the WordPress admin menu, click on Add New Question.
     462. Enter the question in the big post area. This can be plain text, images, or embedded multimedia.
     473. Enter the correct answer in the Answer field below the question field.
     484. Choose whether you will accept only exact matches, or a part answer (eg. you enter a series of answers delimited by commas) is valid.
     495. Select which question leads to the current question.
     506. Select whether this is the final question of the series, and if it is, choose the Page which will be displayed when the player is done with the quiz. Eg. a thank you page, or a success page.
     51
     52
     53== Uninstall ==
     54
     55In the Plugins screen of your WordPress admin area, navigate to Quizz, click on Deactivate. On the refreshed screen, click on Delete.
     56Note: You will lose all your questions if you uninstall the plugin. Take a backup of your data before you uninstall.
     57
     58
     59== Changelog ==
     60
     6131 March 2014:  Using the WordPress permalink function instead of creating the URL structure for redirects.
  • quizz/trunk/quizz.php

    r881384 r884765  
    44 * Plugin URI: http://www.13llama.com/quizz
    55 * Description: A plugin that helps you create a simple sequential quiz on WordPress.
    6  * Version: 1.01
    7  * Author: Amit Sharma
     6 * Version: 1.02
     7 * Author: 13 Llama Studio
    88 * Author URI: http://www.13llama.com/
    99 * License: GNU GPL
     
    9595        if ( $correct == "yes" ) {
    9696
    97             if ($last_bool == "last") {
     97            if ($last_bool != "last") {
    9898                // raise a hook for updating record
    9999                do_action( 'quizz_level_updated', $nextlevel[0] );
     
    104104                $goto = $lastpage[0];
    105105            }
    106                 // redirect to next question
    107                 echo "<meta http_equiv='refresh' content='0, " . site_url() . "?p=" . $goto . "' />";
    108                 echo "<script>window.location='" . site_url() . "?p=" . $goto . "';</script>";
     106
     107                // redirect to next question - or last page
     108                echo "<meta http_equiv='refresh' content='0, " . get_post_permalink($goto) . "' />";
     109                echo "<script>window.location='" . get_post_permalink($goto) . "';</script>";
    109110        } else {
    110111
  • quizz/trunk/readme.txt

    r881384 r884765  
    1 Quizz
     1=== Quizz ===
    22A simple quiz plugin
    3 Author: Amit Sharma
     3Contributors: 13llama
     4Tags: quiz, question
     5Author: 13 Llama Studio
    46Author URI: http://www.13llama.com/
    5 Version: 1.01
    6 Date last updated: 25 March 2014
     7Version: 1.02
     8Stable tag: 1.02
     9License: GPLv2 or later
     10License URI: http://www.gnu.org/licenses/gpl-2.0.html
     11Date last updated: 31 March 2014
    712
    8 Description
    9 --
     13Create a sequential quiz on WordPress with the Quizz plugin.
     14
     15== Description ==
     16
    1017Create a sequential quiz on WordPress with the Quizz plugin.
    1118
     
    1724quizz_level_updated: raised when the user's answer is considered correct and they're pushed to the next question
    1825quizz_ended: raised when the list of questions comes to an end, and the user is sent to a designated page (eg. a congratulations page)
     26
     27
     28== Installation ==
     29
     30For an automatic installation through WordPress:
     311. Go to the 'Add New' plugins screen in your WordPress admin area
     321. Search for 'Quizz'
     331. Click 'Install Now' and activate the plugin
     34
     35For a manual installation via FTP:
     361. Upload the addthis folder to the `/wp-content/plugins/` directory
     371. Activate the plugin through the 'Plugins' screen in your WordPress admin area
     38
     39To upload the plugin through WordPress, instead of FTP:
     401. Upload the downloaded zip file on the 'Add New' plugins screen (see the 'Upload' tab) in your WordPress admin area and activate.
     41
     42
     43== Usage ==
     44
     451. Under Questions in the WordPress admin menu, click on Add New Question.
     462. Enter the question in the big post area. This can be plain text, images, or embedded multimedia.
     473. Enter the correct answer in the Answer field below the question field.
     484. Choose whether you will accept only exact matches, or a part answer (eg. you enter a series of answers delimited by commas) is valid.
     495. Select which question leads to the current question.
     506. Select whether this is the final question of the series, and if it is, choose the Page which will be displayed when the player is done with the quiz. Eg. a thank you page, or a success page.
     51
     52
     53== Uninstall ==
     54
     55In the Plugins screen of your WordPress admin area, navigate to Quizz, click on Deactivate. On the refreshed screen, click on Delete.
     56Note: You will lose all your questions if you uninstall the plugin. Take a backup of your data before you uninstall.
     57
     58
     59== Changelog ==
     60
     6131 March 2014:  Using the WordPress permalink function instead of creating the URL structure for redirects.
Note: See TracChangeset for help on using the changeset viewer.