Version Description
Upgrade to fix some minor bug fixes.
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 0.5.3 |
Comparing to | |
See all releases |
Code changes from version 0.5.2 to 0.5.3
- includes/mlw_main_page.php +332 -321
- includes/mlw_quiz.php +12 -5
- includes/mlw_quiz_install.php +1 -1
- mlw_quizmaster2.php +1 -1
- readme.txt +11 -5
includes/mlw_main_page.php
CHANGED
@@ -1,322 +1,333 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Generates the support for Quiz Master Next
|
4 |
-
*/
|
5 |
-
/*
|
6 |
-
Copyright 2013, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
7 |
-
*/
|
8 |
-
|
9 |
-
|
10 |
-
function mlw_generate_main_page()
|
11 |
-
{
|
12 |
-
echo "
|
13 |
-
<script>
|
14 |
-
function mlw_validateForm()
|
15 |
-
{
|
16 |
-
var x=document.forms['emailForm']['email'].value;
|
17 |
-
if (x==null || x=='')
|
18 |
-
{
|
19 |
-
|
20 |
-
return false;
|
21 |
-
};
|
22 |
-
var x=document.forms['emailForm']['username'].value;
|
23 |
-
if (x==null || x=='')
|
24 |
-
{
|
25 |
-
|
26 |
-
return false;
|
27 |
-
};
|
28 |
-
var x=document.forms['emailForm']['message'].value;
|
29 |
-
if (x==null || x=='')
|
30 |
-
{
|
31 |
-
|
32 |
-
return false;
|
33 |
-
};
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
border-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
</
|
122 |
-
|
123 |
-
<div style="float:
|
124 |
-
<?php do_meta_boxes('
|
125 |
-
</div>
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
<
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
$sql = "SELECT SUM(
|
161 |
-
$
|
162 |
-
|
163 |
-
foreach($
|
164 |
-
$
|
165 |
-
break;
|
166 |
-
}
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
<
|
177 |
-
|
178 |
-
|
179 |
-
</
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
<
|
231 |
-
<
|
232 |
-
|
233 |
-
<
|
234 |
-
<
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
<
|
240 |
-
|
241 |
-
|
242 |
-
<
|
243 |
-
|
244 |
-
|
245 |
-
<
|
246 |
-
|
247 |
-
|
248 |
-
</
|
249 |
-
</
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
<
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
<
|
269 |
-
|
270 |
-
<tr>
|
271 |
-
<td
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
<
|
276 |
-
<
|
277 |
-
|
278 |
-
<
|
279 |
-
<
|
280 |
-
|
281 |
-
<
|
282 |
-
<
|
283 |
-
|
284 |
-
<
|
285 |
-
<
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
</
|
304 |
-
</
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
<
|
312 |
-
<
|
313 |
-
<
|
314 |
-
|
315 |
-
|
316 |
-
</
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Generates the support for Quiz Master Next
|
4 |
+
*/
|
5 |
+
/*
|
6 |
+
Copyright 2013, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
7 |
+
*/
|
8 |
+
|
9 |
+
|
10 |
+
function mlw_generate_main_page()
|
11 |
+
{
|
12 |
+
echo "
|
13 |
+
<script>
|
14 |
+
function mlw_validateForm()
|
15 |
+
{
|
16 |
+
var x=document.forms['emailForm']['email'].value;
|
17 |
+
if (x==null || x=='')
|
18 |
+
{
|
19 |
+
document.getElementById('mlw_support_message').innerHTML = '**Email must be filled out!**';
|
20 |
+
return false;
|
21 |
+
};
|
22 |
+
var x=document.forms['emailForm']['username'].value;
|
23 |
+
if (x==null || x=='')
|
24 |
+
{
|
25 |
+
document.getElementById('mlw_support_message').innerHTML = '**Name must be filled out!**';
|
26 |
+
return false;
|
27 |
+
};
|
28 |
+
var x=document.forms['emailForm']['message'].value;
|
29 |
+
if (x==null || x=='')
|
30 |
+
{
|
31 |
+
document.getElementById('mlw_support_message').innerHTML = '**There must be a message to send!**';
|
32 |
+
return false;
|
33 |
+
};
|
34 |
+
var x=document.forms['emailForm']['email'].value;
|
35 |
+
var atpos=x.indexOf('@');
|
36 |
+
var dotpos=x.lastIndexOf('.');
|
37 |
+
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
38 |
+
{
|
39 |
+
document.getElementById('mlw_support_message').innerHTML = '**Not a valid e-mail address!**';
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
</script>
|
44 |
+
";
|
45 |
+
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
46 |
+
add_meta_box("wpss_mrts", 'Quiz Master Next', "quiz_wpss_mrt_meta_box", "quiz_wpss");
|
47 |
+
add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
|
48 |
+
add_meta_box("wpss_mrts", 'Support', "quiz_wpss_mrt_meta_box3", "quiz_wpss3");
|
49 |
+
add_meta_box("wpss_mrts", 'Contribution', "quiz_wpss_mrt_meta_box4", "quiz_wpss4");
|
50 |
+
add_meta_box("wpss_mrts", 'News From My Local Webstop', "quiz_wpss_mrt_meta_box5", "quiz_wpss5");
|
51 |
+
add_meta_box("wpss_mrts", 'Brainstorm Idea', "quiz_wpss_mrt_meta_box6", "quiz_wpss6");
|
52 |
+
?>
|
53 |
+
<!-- css -->
|
54 |
+
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
55 |
+
<!-- jquery scripts -->
|
56 |
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
57 |
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
58 |
+
<script type="text/javascript">
|
59 |
+
var $j = jQuery.noConflict();
|
60 |
+
// increase the default animation speed to exaggerate the effect
|
61 |
+
$j.fx.speeds._default = 1000;
|
62 |
+
$j(function() {
|
63 |
+
$j('#dialog').dialog({
|
64 |
+
autoOpen: false,
|
65 |
+
show: 'blind',
|
66 |
+
hide: 'explode',
|
67 |
+
buttons: {
|
68 |
+
Ok: function() {
|
69 |
+
$j(this).dialog('close');
|
70 |
+
}
|
71 |
+
}
|
72 |
+
});
|
73 |
+
|
74 |
+
$j('#opener').click(function() {
|
75 |
+
$j('#dialog').dialog('open');
|
76 |
+
return false;
|
77 |
+
} );
|
78 |
+
});
|
79 |
+
</script>
|
80 |
+
<style type="text/css">
|
81 |
+
div.quiz_email_support {
|
82 |
+
text-align: left;
|
83 |
+
}
|
84 |
+
div.quiz_email_support input[type='text'] {
|
85 |
+
border-color:#000000;
|
86 |
+
color:#3300CC;
|
87 |
+
cursor:hand;
|
88 |
+
}
|
89 |
+
textarea{
|
90 |
+
border-color:#000000;
|
91 |
+
color:#3300CC;
|
92 |
+
cursor:hand;
|
93 |
+
}
|
94 |
+
div.donation {
|
95 |
+
border-width: 1px;
|
96 |
+
border-style: solid;
|
97 |
+
padding: 0 0.6em;
|
98 |
+
margin: 5px 0 15px;
|
99 |
+
-moz-border-radius: 3px;
|
100 |
+
-khtml-border-radius: 3px;
|
101 |
+
-webkit-border-radius: 3px;
|
102 |
+
border-radius: 3px;
|
103 |
+
background-color: #ffffe0;
|
104 |
+
border-color: #e6db55;
|
105 |
+
text-align: center;
|
106 |
+
}
|
107 |
+
donation.p { margin: 0.5em 0;
|
108 |
+
line-height: 1;
|
109 |
+
padding: 2px;
|
110 |
+
}
|
111 |
+
p em {
|
112 |
+
padding-left: 1em;
|
113 |
+
color: #555;
|
114 |
+
font-weight: bold;
|
115 |
+
}
|
116 |
+
</style>
|
117 |
+
<div class="wrap">
|
118 |
+
<h2>Quiz Master Next Support <a id="opener" href="">(?)</a></h2>
|
119 |
+
|
120 |
+
<h3>Version <?php echo $mlw_quiz_version; ?></h3>
|
121 |
+
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website. Please consider rating this plugin <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">here</a>.</p>
|
122 |
+
|
123 |
+
<div style="float:left; width:60%;" class="inner-sidebar1">
|
124 |
+
<?php do_meta_boxes('quiz_wpss3','advanced',''); ?>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<div style="float:right; width:36%; " class="inner-sidebar1">
|
128 |
+
<?php do_meta_boxes('quiz_wpss2','advanced',''); ?>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
<div style="float:right; width:36%; " class="inner-sidebar1">
|
132 |
+
<?php do_meta_boxes('quiz_wpss5','advanced',''); ?>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<!--<div style="clear:both"></div>-->
|
136 |
+
|
137 |
+
<div style="float:left; width:60%; " class="inner-sidebar1">
|
138 |
+
<?php do_meta_boxes('quiz_wpss4','advanced',''); ?>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
<div id="dialog" title="Help">
|
144 |
+
<h3><b>Help</b></h3>
|
145 |
+
<p>This page is the main admin page for the Quiz Master Next.</p>
|
146 |
+
<p>The first widget lists all the statistics collected so far.</p>
|
147 |
+
<p>The second widget lists all the new features added in this update.</p>
|
148 |
+
<p>The third widget contains a contact form for emailing the developer.</p>
|
149 |
+
<p>The fourth widget shows news from My Local Webstop regarding our plugins</p>
|
150 |
+
<p>The last widget is our donation widget.</p>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
</div>
|
154 |
+
<?php
|
155 |
+
}
|
156 |
+
|
157 |
+
function quiz_wpss_mrt_meta_box()
|
158 |
+
{
|
159 |
+
global $wpdb;
|
160 |
+
$sql = "SELECT SUM(quiz_views) AS QuizViews FROM " . $wpdb->prefix . "mlw_quizzes";
|
161 |
+
$mlw_quiz_views = $wpdb->get_results($sql);
|
162 |
+
|
163 |
+
foreach($mlw_quiz_views as $mlw_eaches) {
|
164 |
+
$mlw_quiz_views = $mlw_eaches->QuizViews;
|
165 |
+
break;
|
166 |
+
}
|
167 |
+
|
168 |
+
$sql = "SELECT SUM(quiz_taken) AS QuizTaken FROM " . $wpdb->prefix . "mlw_quizzes";
|
169 |
+
$mlw_quiz_taken = $wpdb->get_results($sql);
|
170 |
+
|
171 |
+
foreach($mlw_quiz_taken as $mlw_eaches) {
|
172 |
+
$mlw_quiz_taken = $mlw_eaches->QuizTaken;
|
173 |
+
break;
|
174 |
+
}
|
175 |
+
?>
|
176 |
+
<div>
|
177 |
+
<table width='100%'>
|
178 |
+
<tr>
|
179 |
+
<td align='left'>Total Times All Quizzes Have Been Viewed</td>
|
180 |
+
<td align='right'><?php echo $mlw_quiz_views; ?></td>
|
181 |
+
</tr>
|
182 |
+
<tr>
|
183 |
+
<td align='left'>Total Times All Quizzes Have Been Taken</td>
|
184 |
+
<td align='right'><?php echo $mlw_quiz_taken; ?></td>
|
185 |
+
</tr>
|
186 |
+
</table>
|
187 |
+
</div>
|
188 |
+
<?php
|
189 |
+
}
|
190 |
+
|
191 |
+
function quiz_wpss_mrt_meta_box2()
|
192 |
+
{
|
193 |
+
?>
|
194 |
+
<div>
|
195 |
+
<table width='100%'>
|
196 |
+
<tr>
|
197 |
+
<td align='left'>0.5.3 (October 11, 2013)</td>
|
198 |
+
</tr>
|
199 |
+
<tr>
|
200 |
+
<td align='left'>* Bug Fixes</td>
|
201 |
+
</tr>
|
202 |
+
<tr>
|
203 |
+
<td align='left'>* Started Redesigning Quiz Look</td>
|
204 |
+
</tr>
|
205 |
+
</table>
|
206 |
+
</div>
|
207 |
+
<?php
|
208 |
+
}
|
209 |
+
|
210 |
+
function quiz_wpss_mrt_meta_box3()
|
211 |
+
{
|
212 |
+
/*
|
213 |
+
Copyright 2013, My Local Webstop
|
214 |
+
Please do not re-use this email script without contacting me.
|
215 |
+
*/
|
216 |
+
$quiz_master_email_message = "";
|
217 |
+
if(isset($_POST["action"]))
|
218 |
+
{
|
219 |
+
$quiz_master_email_success = $_POST["action"];
|
220 |
+
$user_name = $_POST["username"];
|
221 |
+
$user_email = $_POST["email"];
|
222 |
+
$user_message = $_POST["message"];
|
223 |
+
if ($quiz_master_email_success == 'update' and $user_email != "" and $user_message != "")
|
224 |
+
{
|
225 |
+
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 ".$mlw_quiz_version);
|
226 |
+
$quiz_master_email_message = "**Message Sent**";
|
227 |
+
}
|
228 |
+
}
|
229 |
+
?>
|
230 |
+
<div class='quiz_email_support'>
|
231 |
+
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?page=mlw_quiz_support" method='post' name='emailForm' onsubmit='return mlw_validateForm()'>
|
232 |
+
<input type='hidden' name='action' value='update' />
|
233 |
+
<table width='100%'>
|
234 |
+
<tr>
|
235 |
+
<td>If there is something you would like to suggest to add or even if you just want
|
236 |
+
to let me know if you like the plugin or not, feel free to use the email form below.</td>
|
237 |
+
</tr>
|
238 |
+
<tr>
|
239 |
+
<td><span name='mlw_support_message' id='mlw_support_message' style="color: red;"><?php echo $quiz_master_email_message; ?></span></td>
|
240 |
+
</tr>
|
241 |
+
<tr>
|
242 |
+
<td align='left'><p>Name: <input type='text' name='username' value='' /></p></td>
|
243 |
+
</tr>
|
244 |
+
<tr>
|
245 |
+
<td align='left'><p>Email: <input type='text' name='email' value='' /></p></td>
|
246 |
+
</tr>
|
247 |
+
<tr>
|
248 |
+
<td align='left'><p>Message: </p></td>
|
249 |
+
</tr>
|
250 |
+
<tr>
|
251 |
+
<td align='left'><p><TEXTAREA NAME="message" COLS=40 ROWS=6></TEXTAREA></p></td>
|
252 |
+
</tr>
|
253 |
+
<tr>
|
254 |
+
<td align='left'><input type='submit' value='Send Email' /></td>
|
255 |
+
</tr>
|
256 |
+
<tr>
|
257 |
+
<td align='left'></td>
|
258 |
+
</tr>
|
259 |
+
</table>
|
260 |
+
</form>
|
261 |
+
</div>
|
262 |
+
<?php
|
263 |
+
}
|
264 |
+
|
265 |
+
function quiz_wpss_mrt_meta_box4()
|
266 |
+
{
|
267 |
+
?>
|
268 |
+
<div>
|
269 |
+
<table width='100%'>
|
270 |
+
<tr>
|
271 |
+
<td align='left'>
|
272 |
+
I have spent a lot of time in development for this plugin. If you like it, please help by donating today.
|
273 |
+
</td>
|
274 |
+
</tr>
|
275 |
+
<tr>
|
276 |
+
<td> </td>
|
277 |
+
</tr>
|
278 |
+
<tr>
|
279 |
+
<td></td>
|
280 |
+
</tr>
|
281 |
+
<tr>
|
282 |
+
<td> </td>
|
283 |
+
</tr>
|
284 |
+
<tr>
|
285 |
+
<td>
|
286 |
+
<div class="donation">
|
287 |
+
<p>
|
288 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
289 |
+
<input type="hidden" name="cmd" value="_donations">
|
290 |
+
<input type="hidden" name="business" value="fpcorso@gmail.com">
|
291 |
+
<input type="hidden" name="lc" value="US">
|
292 |
+
<input type="hidden" name="no_note" value="0">
|
293 |
+
<input type="hidden" name="currency_code" value="USD">
|
294 |
+
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
295 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
296 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
297 |
+
</form>
|
298 |
+
|
299 |
+
</p>
|
300 |
+
</div>
|
301 |
+
</td>
|
302 |
+
</tr>
|
303 |
+
</table>
|
304 |
+
</div>
|
305 |
+
<?php
|
306 |
+
}
|
307 |
+
function quiz_wpss_mrt_meta_box5()
|
308 |
+
{
|
309 |
+
?>
|
310 |
+
<div>
|
311 |
+
<table width='100%'>
|
312 |
+
<tr>
|
313 |
+
<td align='left'><iframe src="http://www.mylocalwebstop.com/mlw_news.html" seamless="seamless" style="width: 100%; height: 550px;"></iframe></td>
|
314 |
+
</tr>
|
315 |
+
</table>
|
316 |
+
</div>
|
317 |
+
<?php
|
318 |
+
}
|
319 |
+
function quiz_wpss_mrt_meta_box6()
|
320 |
+
{
|
321 |
+
?>
|
322 |
+
<div>
|
323 |
+
<table width='100%'>
|
324 |
+
<tr>
|
325 |
+
<td align='left'>
|
326 |
+
Box Six
|
327 |
+
</td>
|
328 |
+
</tr>
|
329 |
+
</table>
|
330 |
+
</div>
|
331 |
+
<?php
|
332 |
+
}
|
333 |
?>
|
includes/mlw_quiz.php
CHANGED
@@ -77,7 +77,8 @@ function mlw_quiz_shortcode($atts)
|
|
77 |
var x=document.forms['quizForm']['mlwUserName'].value;
|
78 |
if (x==null || x=='')
|
79 |
{
|
80 |
-
|
|
|
81 |
return false;
|
82 |
}";
|
83 |
}
|
@@ -87,7 +88,8 @@ function mlw_quiz_shortcode($atts)
|
|
87 |
var x=document.forms['quizForm']['mlwUserComp'].value;
|
88 |
if (x==null || x=='')
|
89 |
{
|
90 |
-
|
|
|
91 |
return false;
|
92 |
}";
|
93 |
}
|
@@ -97,7 +99,8 @@ function mlw_quiz_shortcode($atts)
|
|
97 |
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
98 |
if (x==null || x=='')
|
99 |
{
|
100 |
-
|
|
|
101 |
return false;
|
102 |
}";
|
103 |
}
|
@@ -107,7 +110,8 @@ function mlw_quiz_shortcode($atts)
|
|
107 |
var x=document.forms['quizForm']['mlwUserPhone'].value;
|
108 |
if (x==null || x=='')
|
109 |
{
|
110 |
-
|
|
|
111 |
return false;
|
112 |
}";
|
113 |
}
|
@@ -119,7 +123,8 @@ function mlw_quiz_shortcode($atts)
|
|
119 |
var dotpos=x.lastIndexOf('.');
|
120 |
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
121 |
{
|
122 |
-
|
|
|
123 |
return false;
|
124 |
}
|
125 |
}
|
@@ -132,6 +137,7 @@ function mlw_quiz_shortcode($atts)
|
|
132 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
133 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
134 |
$mlw_display .= "<br />";
|
|
|
135 |
$mlw_display .= "<form name='quizForm' action='" . $PHP_SELF . "' method='post' onsubmit='return mlw_validateForm()' >";
|
136 |
$mlw_display .= "<table>";
|
137 |
$mlw_display .= "<thead>";
|
@@ -228,6 +234,7 @@ function mlw_quiz_shortcode($atts)
|
|
228 |
}
|
229 |
$mlw_display .= "<input type='hidden' name='complete_quiz' value='confirmation' />";
|
230 |
$mlw_display .= "<input type='submit' value='".$mlw_quiz_options->submit_button_text."' />";
|
|
|
231 |
$mlw_display .= "</form>";
|
232 |
|
233 |
}
|
77 |
var x=document.forms['quizForm']['mlwUserName'].value;
|
78 |
if (x==null || x=='')
|
79 |
{
|
80 |
+
document.getElementById('mlw_error_message').innerHTML = '**Name must be filled out!**';
|
81 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Name must be filled out!**';
|
82 |
return false;
|
83 |
}";
|
84 |
}
|
88 |
var x=document.forms['quizForm']['mlwUserComp'].value;
|
89 |
if (x==null || x=='')
|
90 |
{
|
91 |
+
document.getElementById('mlw_error_message').innerHTML = '**Business must be filled out!**';
|
92 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Business must be filled out!**';
|
93 |
return false;
|
94 |
}";
|
95 |
}
|
99 |
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
100 |
if (x==null || x=='')
|
101 |
{
|
102 |
+
document.getElementById('mlw_error_message').innerHTML = '**Email must be filled out!**';
|
103 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Email must be filled out!**';
|
104 |
return false;
|
105 |
}";
|
106 |
}
|
110 |
var x=document.forms['quizForm']['mlwUserPhone'].value;
|
111 |
if (x==null || x=='')
|
112 |
{
|
113 |
+
document.getElementById('mlw_error_message').innerHTML = '**Phone number must be filled out!**';
|
114 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Phone number must be filled out!**';
|
115 |
return false;
|
116 |
}";
|
117 |
}
|
123 |
var dotpos=x.lastIndexOf('.');
|
124 |
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
125 |
{
|
126 |
+
document.getElementById('mlw_error_message').innerHTML = '**Not a valid e-mail address!**';
|
127 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Not a valid e-mail address!**';
|
128 |
return false;
|
129 |
}
|
130 |
}
|
137 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
138 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
139 |
$mlw_display .= "<br />";
|
140 |
+
$mlw_display .= "<span name='mlw_error_message' id='mlw_error_message' style='color: red;'></span><br />";
|
141 |
$mlw_display .= "<form name='quizForm' action='" . $PHP_SELF . "' method='post' onsubmit='return mlw_validateForm()' >";
|
142 |
$mlw_display .= "<table>";
|
143 |
$mlw_display .= "<thead>";
|
234 |
}
|
235 |
$mlw_display .= "<input type='hidden' name='complete_quiz' value='confirmation' />";
|
236 |
$mlw_display .= "<input type='submit' value='".$mlw_quiz_options->submit_button_text."' />";
|
237 |
+
$mlw_display .= "<span name='mlw_error_message_bottom' id='mlw_error_message_bottom' style='color: red;'></span><br />";
|
238 |
$mlw_display .= "</form>";
|
239 |
|
240 |
}
|
includes/mlw_quiz_install.php
CHANGED
@@ -252,7 +252,7 @@ function mlw_quiz_activate()
|
|
252 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
253 |
dbDelta($sql);
|
254 |
}
|
255 |
-
$data = "0.5.
|
256 |
if ( ! get_option('mlw_quiz_master_version'))
|
257 |
{
|
258 |
add_option('mlw_quiz_master_version' , $data);
|
252 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
253 |
dbDelta($sql);
|
254 |
}
|
255 |
+
$data = "0.5.3";
|
256 |
if ( ! get_option('mlw_quiz_master_version'))
|
257 |
{
|
258 |
add_option('mlw_quiz_master_version' , $data);
|
mlw_quizmaster2.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
6 |
-
Version: 0.5.
|
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: Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
6 |
+
Version: 0.5.3
|
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.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -11,7 +11,7 @@ Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
This is the successor plugin to the wildly popular Quiz Master plugin
|
15 |
|
16 |
Use this plugin to add multiple quizzes or tests to your website. This plugin allows for unlimited quizzes each with unlimited amount of questions. The plugin allows you to create the quiz, add it to any page using a customized shortcode, allows the user to take the quiz, and then saves the results.
|
17 |
|
@@ -37,8 +37,7 @@ Features include:
|
|
37 |
== Frequently Asked Questions ==
|
38 |
|
39 |
= I have an idea, how do I contact you? =
|
40 |
-
|
41 |
-
Feel free to use the support option on the main page of the plugin.
|
42 |
|
43 |
== Screenshots ==
|
44 |
|
@@ -50,6 +49,10 @@ Feel free to use the support option on the main page of the plugin.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
|
|
53 |
= 0.5.2 (September 29, 2013) =
|
54 |
* Bug Fixes
|
55 |
|
@@ -94,6 +97,9 @@ Feel free to use the support option on the main page of the plugin.
|
|
94 |
|
95 |
== Upgrade Notice ==
|
96 |
|
|
|
|
|
|
|
97 |
= 0.5.2 =
|
98 |
Upgrade to fix some minor bug fixes.
|
99 |
|
@@ -113,4 +119,4 @@ Upgrade to enjoy the new Not Graded scoring system and some error fixes!
|
|
113 |
Upgrade to enjoy three new features and some minor fixes!
|
114 |
|
115 |
= 0.1 =
|
116 |
-
Initial Version
|
3 |
Tags: quiz, test, score, survey
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.6.1
|
6 |
+
Stable tag: 0.5.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
This is the successor plugin to the wildly popular Quiz Master plugin. Re-wrote from the ground up.
|
15 |
|
16 |
Use this plugin to add multiple quizzes or tests to your website. This plugin allows for unlimited quizzes each with unlimited amount of questions. The plugin allows you to create the quiz, add it to any page using a customized shortcode, allows the user to take the quiz, and then saves the results.
|
17 |
|
37 |
== Frequently Asked Questions ==
|
38 |
|
39 |
= I have an idea, how do I contact you? =
|
40 |
+
Feel free to use the support option on the main page of the plugin or from the contact page at mylocalwebstop.com.
|
|
|
41 |
|
42 |
== Screenshots ==
|
43 |
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 0.5.3 (October 11, 2013) =
|
53 |
+
* Bug Fixes
|
54 |
+
* Started Redesigning Quiz Look
|
55 |
+
|
56 |
= 0.5.2 (September 29, 2013) =
|
57 |
* Bug Fixes
|
58 |
|
97 |
|
98 |
== Upgrade Notice ==
|
99 |
|
100 |
+
= 0.5.3 =
|
101 |
+
Upgrade to fix some minor bug fixes.
|
102 |
+
|
103 |
= 0.5.2 =
|
104 |
Upgrade to fix some minor bug fixes.
|
105 |
|
119 |
Upgrade to enjoy three new features and some minor fixes!
|
120 |
|
121 |
= 0.1 =
|
122 |
+
Initial Version
|