Version Description
(September 13, 2013) = * Add The Ability To Require Contact Information * Add Email Validating To Email Field
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 0.4 |
Comparing to | |
See all releases |
Code changes from version 0.3.1 to 0.4
- includes/mlw_dashboard.php +1 -1
- includes/mlw_main_page.php +7 -4
- includes/mlw_quiz.php +60 -1
- includes/mlw_quiz_options.php +4 -4
- mlw_quizmaster2.php +1 -1
- readme.txt +5 -1
includes/mlw_dashboard.php
CHANGED
@@ -53,7 +53,7 @@ function mlw_generate_quiz_dashboard(){
|
|
53 |
<div class="wrap">
|
54 |
<h2>Quiz Master Next Dashboard<a id="opener" href="">(?)</a></h2>
|
55 |
|
56 |
-
<h3>Version 0.
|
57 |
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website.</p>
|
58 |
|
59 |
<div style="float:left; width:60%;" class="inner-sidebar1">
|
53 |
<div class="wrap">
|
54 |
<h2>Quiz Master Next Dashboard<a id="opener" href="">(?)</a></h2>
|
55 |
|
56 |
+
<h3>Version 0.4</h3>
|
57 |
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website.</p>
|
58 |
|
59 |
<div style="float:left; width:60%;" class="inner-sidebar1">
|
includes/mlw_main_page.php
CHANGED
@@ -83,7 +83,7 @@ function mlw_generate_main_page()
|
|
83 |
<div class="wrap">
|
84 |
<h2>Quiz Master Next Support <a id="opener" href="">(?)</a></h2>
|
85 |
|
86 |
-
<h3>Version 0.
|
87 |
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website.</p>
|
88 |
|
89 |
<div style="float:left; width:60%;" class="inner-sidebar1">
|
@@ -160,10 +160,13 @@ function quiz_wpss_mrt_meta_box2()
|
|
160 |
<div>
|
161 |
<table width='100%'>
|
162 |
<tr>
|
163 |
-
<td align='left'>0.
|
164 |
</tr>
|
165 |
<tr>
|
166 |
-
<td align='left'>*
|
|
|
|
|
|
|
167 |
</tr>
|
168 |
</table>
|
169 |
</div>
|
@@ -183,7 +186,7 @@ function quiz_wpss_mrt_meta_box3()
|
|
183 |
$quiz_master_email_message = "";
|
184 |
if ($quiz_master_email_success == update and $user_email != "" and $user_message != "")
|
185 |
{
|
186 |
-
wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin','Message from ' . $user_name . ' at ' . $user_email . " It says: " . "\n" . $user_message);
|
187 |
$quiz_master_email_message = "<h3>Message Sent</h3>";
|
188 |
}
|
189 |
else if ($quiz_master_email_success == update and $user_email == "")
|
83 |
<div class="wrap">
|
84 |
<h2>Quiz Master Next Support <a id="opener" href="">(?)</a></h2>
|
85 |
|
86 |
+
<h3>Version 0.4</h3>
|
87 |
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website.</p>
|
88 |
|
89 |
<div style="float:left; width:60%;" class="inner-sidebar1">
|
160 |
<div>
|
161 |
<table width='100%'>
|
162 |
<tr>
|
163 |
+
<td align='left'>0.4 (September 13, 2013)</td>
|
164 |
</tr>
|
165 |
<tr>
|
166 |
+
<td align='left'>* Add The Ability To Require Contact Information</td>
|
167 |
+
</tr>
|
168 |
+
<tr>
|
169 |
+
<td align='left'>* Add Email Validating To Email Field</td>
|
170 |
</tr>
|
171 |
</table>
|
172 |
</div>
|
186 |
$quiz_master_email_message = "";
|
187 |
if ($quiz_master_email_success == update and $user_email != "" and $user_message != "")
|
188 |
{
|
189 |
+
wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin','Message from ' . $user_name . ' at ' . $user_email . " It says: " . "\n" . $user_message . "\n" . "Version 0.4");
|
190 |
$quiz_master_email_message = "<h3>Message Sent</h3>";
|
191 |
}
|
192 |
else if ($quiz_master_email_success == update and $user_email == "")
|
includes/mlw_quiz.php
CHANGED
@@ -60,12 +60,71 @@ function mlw_quiz_shortcode($atts)
|
|
60 |
$update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET quiz_views='".$mlw_views."' WHERE quiz_id=".$mlw_quiz_id;
|
61 |
$results = $wpdb->query( $update );
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
//Begin the quiz
|
64 |
$mlw_message_before = $mlw_quiz_options->message_before;
|
65 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
66 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
67 |
$mlw_display .= "<br />";
|
68 |
-
$mlw_display .= "<form action='" . $PHP_SELF . "' method='post'>";
|
69 |
$mlw_display .= "<table>";
|
70 |
$mlw_display .= "<thead>";
|
71 |
|
60 |
$update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET quiz_views='".$mlw_views."' WHERE quiz_id=".$mlw_quiz_id;
|
61 |
$results = $wpdb->query( $update );
|
62 |
|
63 |
+
//Form validation script
|
64 |
+
$mlw_display .= "
|
65 |
+
<script>
|
66 |
+
function validateForm()
|
67 |
+
{
|
68 |
+
";
|
69 |
+
if ($mlw_quiz_options->user_name == 1)
|
70 |
+
{
|
71 |
+
$mlw_display .= "
|
72 |
+
var x=document.forms['quizForm']['mlwUserName'].value;
|
73 |
+
if (x==null || x=='')
|
74 |
+
{
|
75 |
+
alert('Name must be filled out');
|
76 |
+
return false;
|
77 |
+
}";
|
78 |
+
}
|
79 |
+
if ($mlw_quiz_options->user_comp == 1)
|
80 |
+
{
|
81 |
+
$mlw_display .= "
|
82 |
+
var x=document.forms['quizForm']['mlwUserComp'].value;
|
83 |
+
if (x==null || x=='')
|
84 |
+
{
|
85 |
+
alert('Business must be filled out');
|
86 |
+
return false;
|
87 |
+
}";
|
88 |
+
}
|
89 |
+
if ($mlw_quiz_options->user_email == 1)
|
90 |
+
{
|
91 |
+
$mlw_display .= "
|
92 |
+
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
93 |
+
if (x==null || x=='')
|
94 |
+
{
|
95 |
+
alert('Email must be filled out');
|
96 |
+
return false;
|
97 |
+
}";
|
98 |
+
}
|
99 |
+
if ($mlw_quiz_options->user_phone == 1)
|
100 |
+
{
|
101 |
+
$mlw_display .= "
|
102 |
+
var x=document.forms['quizForm']['mlwUserPhone'].value;
|
103 |
+
if (x==null || x=='')
|
104 |
+
{
|
105 |
+
alert('Phone number must be filled out');
|
106 |
+
return false;
|
107 |
+
}";
|
108 |
+
}
|
109 |
+
$mlw_display .= "
|
110 |
+
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
111 |
+
var atpos=x.indexOf('@');
|
112 |
+
var dotpos=x.lastIndexOf('.');
|
113 |
+
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
114 |
+
{
|
115 |
+
alert('Not a valid e-mail address');
|
116 |
+
return false;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
</script>";
|
120 |
+
|
121 |
+
|
122 |
//Begin the quiz
|
123 |
$mlw_message_before = $mlw_quiz_options->message_before;
|
124 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
125 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
126 |
$mlw_display .= "<br />";
|
127 |
+
$mlw_display .= "<form name='quizForm' action='" . $PHP_SELF . "' method='post' onsubmit='return validateForm()' >";
|
128 |
$mlw_display .= "<table>";
|
129 |
$mlw_display .= "<thead>";
|
130 |
|
includes/mlw_quiz_options.php
CHANGED
@@ -896,7 +896,7 @@ function mlw_generate_quiz_options()
|
|
896 |
<th scope="row"><label for="userName">Should we ask for user's name?</label></th>
|
897 |
<td><div id="userName">
|
898 |
<input type="radio" id="radio7" name="userName" <?php if ($mlw_quiz_options->user_name == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio7">Yes</label>
|
899 |
-
|
900 |
<input type="radio" id="radio9" name="userName" <?php if ($mlw_quiz_options->user_name == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio9">No</label>
|
901 |
</div></td>
|
902 |
</tr>
|
@@ -904,7 +904,7 @@ function mlw_generate_quiz_options()
|
|
904 |
<th scope="row"><label for="userComp">Should we ask for user's business?</label></th>
|
905 |
<td><div id="userComp">
|
906 |
<input type="radio" id="radio10" name="userComp" <?php if ($mlw_quiz_options->user_comp == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio10">Yes</label>
|
907 |
-
|
908 |
<input type="radio" id="radio12" name="userComp" <?php if ($mlw_quiz_options->user_comp == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio12">No</label>
|
909 |
</div></td>
|
910 |
</tr>
|
@@ -912,7 +912,7 @@ function mlw_generate_quiz_options()
|
|
912 |
<th scope="row"><label for="userEmail">Should we ask for user's email?</label></th>
|
913 |
<td><div id="userEmail">
|
914 |
<input type="radio" id="radio13" name="userEmail" <?php if ($mlw_quiz_options->user_email == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio13">Yes</label>
|
915 |
-
|
916 |
<input type="radio" id="radio15" name="userEmail" <?php if ($mlw_quiz_options->user_email == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio15">No</label>
|
917 |
</div></td>
|
918 |
</tr>
|
@@ -920,7 +920,7 @@ function mlw_generate_quiz_options()
|
|
920 |
<th scope="row"><label for="userPhone">Should we ask for user's phone number?</label></th>
|
921 |
<td><div id="userPhone">
|
922 |
<input type="radio" id="radio16" name="userPhone" <?php if ($mlw_quiz_options->user_phone == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio16">Yes</label>
|
923 |
-
|
924 |
<input type="radio" id="radio18" name="userPhone" <?php if ($mlw_quiz_options->user_phone == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio18">No</label>
|
925 |
</div></td>
|
926 |
</tr>
|
896 |
<th scope="row"><label for="userName">Should we ask for user's name?</label></th>
|
897 |
<td><div id="userName">
|
898 |
<input type="radio" id="radio7" name="userName" <?php if ($mlw_quiz_options->user_name == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio7">Yes</label>
|
899 |
+
<input type="radio" id="radio8" name="userName" <?php if ($mlw_quiz_options->user_name == 1) {echo 'checked="checked"';} ?> value='1' /><label for="radio8">Require</label>
|
900 |
<input type="radio" id="radio9" name="userName" <?php if ($mlw_quiz_options->user_name == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio9">No</label>
|
901 |
</div></td>
|
902 |
</tr>
|
904 |
<th scope="row"><label for="userComp">Should we ask for user's business?</label></th>
|
905 |
<td><div id="userComp">
|
906 |
<input type="radio" id="radio10" name="userComp" <?php if ($mlw_quiz_options->user_comp == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio10">Yes</label>
|
907 |
+
<input type="radio" id="radio11" name="userComp" <?php if ($mlw_quiz_options->user_comp == 1) {echo 'checked="checked"';} ?> value='1' /><label for="radio11">Require</label>
|
908 |
<input type="radio" id="radio12" name="userComp" <?php if ($mlw_quiz_options->user_comp == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio12">No</label>
|
909 |
</div></td>
|
910 |
</tr>
|
912 |
<th scope="row"><label for="userEmail">Should we ask for user's email?</label></th>
|
913 |
<td><div id="userEmail">
|
914 |
<input type="radio" id="radio13" name="userEmail" <?php if ($mlw_quiz_options->user_email == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio13">Yes</label>
|
915 |
+
<input type="radio" id="radio14" name="userEmail" <?php if ($mlw_quiz_options->user_email == 1) {echo 'checked="checked"';} ?> value='1'/><label for="radio14">Require</label>
|
916 |
<input type="radio" id="radio15" name="userEmail" <?php if ($mlw_quiz_options->user_email == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio15">No</label>
|
917 |
</div></td>
|
918 |
</tr>
|
920 |
<th scope="row"><label for="userPhone">Should we ask for user's phone number?</label></th>
|
921 |
<td><div id="userPhone">
|
922 |
<input type="radio" id="radio16" name="userPhone" <?php if ($mlw_quiz_options->user_phone == 0) {echo 'checked="checked"';} ?> value='0' /><label for="radio16">Yes</label>
|
923 |
+
<input type="radio" id="radio17" name="userPhone" <?php if ($mlw_quiz_options->user_phone == 1) {echo 'checked="checked"';} ?> value='1' /><label for="radio17">Require</label>
|
924 |
<input type="radio" id="radio18" name="userPhone" <?php if ($mlw_quiz_options->user_phone == 2) {echo 'checked="checked"';} ?> value='2' /><label for="radio18">No</label>
|
925 |
</div></td>
|
926 |
</tr>
|
mlw_quizmaster2.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
Description: This adds a quiz function to your website. This is the new version of the wildly popular Quiz Master.
|
6 |
-
Version: 0.
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
Description: This adds a quiz function to your website. This is the new version of the wildly popular Quiz Master.
|
6 |
+
Version: 0.4
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: fpcorso
|
|
3 |
Tags: quiz, test, score, survey
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.6.1
|
6 |
-
Stable tag: 0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -45,6 +45,10 @@ Feel free to use the support option on the main page of the plugin.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
48 |
= 0.3.1 (September 13, 2013) =
|
49 |
* Bug Fixes
|
50 |
|
3 |
Tags: quiz, test, score, survey
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.6.1
|
6 |
+
Stable tag: 0.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 0.4 (September 13, 2013) =
|
49 |
+
* Add The Ability To Require Contact Information
|
50 |
+
* Add Email Validating To Email Field
|
51 |
+
|
52 |
= 0.3.1 (September 13, 2013) =
|
53 |
* Bug Fixes
|
54 |
|