Version Description
Upgrade to have the ability to edit the css styles for each quiz! Plus minor bugs fixes.
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.1.1
- includes/images/quiz_icon.png +0 -0
- includes/mlw_dashboard.php +5 -7
- includes/mlw_qmn_credits.php +42 -7
- includes/mlw_quiz.php +8 -46
- includes/mlw_quiz_admin.php +46 -35
- includes/mlw_quiz_install.php +2 -0
- includes/mlw_quiz_options.php +112 -43
- includes/mlw_results.php +1 -31
- includes/mlw_results_details.php +1 -31
- includes/mlw_tools.php +1 -31
- includes/mlw_update.php +52 -1
- mlw_quizmaster2.php +56 -1
- readme.txt +11 -2
- uninstall.php +2 -0
includes/images/quiz_icon.png
ADDED
Binary file
|
includes/mlw_dashboard.php
CHANGED
@@ -144,11 +144,9 @@ function mlw_generate_quiz_dashboard(){
|
|
144 |
}
|
145 |
</style>
|
146 |
<div class="wrap">
|
147 |
-
<h2>Quiz Master Next <?php _e("Dashboard", "mlw_qmn_text_domain"); ?><a id="opener" href="">(?)</a></h2>
|
148 |
-
|
149 |
-
<h3>Version <?php echo $mlw_quiz_version; ?></h3>
|
150 |
-
<p>Thank you for using this plugin. I hope you find it beneficial to your website. <?php if ( get_option('mlw_advert_shows') == 'true' ) { ?> If it is, please consider a <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ">donation</a>, a <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">review</a>, or taking this <a href="http://mylocalwebstop.com/sample-survey/" target="_blank">survey</a>. <?php } ?>Thank you!</p>
|
151 |
|
|
|
152 |
<!--Display Widget Boxes-->
|
153 |
<div style="float:left; width:19%;" class="inner-sidebar1">
|
154 |
<?php do_meta_boxes('quiz_wpss10','advanced',''); ?>
|
@@ -768,13 +766,13 @@ function mlw_qmn_quaterly_percent_taken_widget()
|
|
768 |
{
|
769 |
global $wpdb;
|
770 |
|
771 |
-
$mlw_this_quater = mktime(0, 0, 0, date("m") , date("d")-
|
772 |
$mlw_this_quater = date("Y-m-d", $mlw_this_quater);
|
773 |
$mlw_qmn_this_quater_taken = $wpdb->get_var( "SELECT COUNT(*) FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_this_quater." 00:00:00' AND '".date("Y-m-d")." 23:59:59') AND deleted=0");
|
774 |
|
775 |
-
$mlw_last_quater_start = mktime(0, 0, 0, date("m") , date("d")-
|
776 |
$mlw_last_quater_start = date("Y-m-d", $mlw_last_quater_start);
|
777 |
-
$mlw_last_quater_end = mktime(0, 0, 0, date("m") , date("d")-
|
778 |
$mlw_last_quater_end = date("Y-m-d", $mlw_last_quater_end);
|
779 |
$mlw_qmn_last_quater_taken = $wpdb->get_var( "SELECT COUNT(*) FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_last_quater_start." 00:00:00' AND '".$mlw_last_quater_end." 23:59:59') AND deleted=0");
|
780 |
|
144 |
}
|
145 |
</style>
|
146 |
<div class="wrap">
|
147 |
+
<h2>Quiz Master Next Version <?php echo $mlw_quiz_version; ?><?php _e("Dashboard", "mlw_qmn_text_domain"); ?><a id="opener" href="">(?)</a></h2>
|
|
|
|
|
|
|
148 |
|
149 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
150 |
<!--Display Widget Boxes-->
|
151 |
<div style="float:left; width:19%;" class="inner-sidebar1">
|
152 |
<?php do_meta_boxes('quiz_wpss10','advanced',''); ?>
|
766 |
{
|
767 |
global $wpdb;
|
768 |
|
769 |
+
$mlw_this_quater = mktime(0, 0, 0, date("m") , date("d")-89, date("Y"));
|
770 |
$mlw_this_quater = date("Y-m-d", $mlw_this_quater);
|
771 |
$mlw_qmn_this_quater_taken = $wpdb->get_var( "SELECT COUNT(*) FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_this_quater." 00:00:00' AND '".date("Y-m-d")." 23:59:59') AND deleted=0");
|
772 |
|
773 |
+
$mlw_last_quater_start = mktime(0, 0, 0, date("m") , date("d")-179, date("Y"));
|
774 |
$mlw_last_quater_start = date("Y-m-d", $mlw_last_quater_start);
|
775 |
+
$mlw_last_quater_end = mktime(0, 0, 0, date("m") , date("d")-90, date("Y"));
|
776 |
$mlw_last_quater_end = date("Y-m-d", $mlw_last_quater_end);
|
777 |
$mlw_qmn_last_quater_taken = $wpdb->get_var( "SELECT COUNT(*) FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_last_quater_start." 00:00:00' AND '".$mlw_last_quater_end." 23:59:59') AND deleted=0");
|
778 |
|
includes/mlw_qmn_credits.php
CHANGED
@@ -51,16 +51,51 @@ function mlw_generate_about_page()
|
|
51 |
$j("button").button();
|
52 |
});
|
53 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
<div class="wrap about-wrap">
|
55 |
<h1>Welcome To Quiz Master Next <?php echo $mlw_quiz_version; ?><a id="opener" href="">(?)</a></h1>
|
56 |
<div class="about-text">Thank you for updating!</div>
|
57 |
-
<
|
58 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<ul>
|
60 |
-
<li>
|
61 |
-
<li>Fixed
|
62 |
-
<li>Fixed
|
63 |
-
<li>
|
64 |
</ul>
|
65 |
<h3>What's Coming Soon</h3>
|
66 |
<ul>
|
@@ -68,7 +103,7 @@ function mlw_generate_about_page()
|
|
68 |
<li>Stats For Each Quiz</li>
|
69 |
<li>Multiple Right Answers</li>
|
70 |
<li>Graded Open Text Answers</li>
|
71 |
-
<li>
|
72 |
</ul>
|
73 |
|
74 |
<div id="dialog" title="Help">
|
51 |
$j("button").button();
|
52 |
});
|
53 |
</script>
|
54 |
+
<style>
|
55 |
+
div.mlw_qmn_icon_wrap
|
56 |
+
{
|
57 |
+
background: <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
58 |
+
background: none, <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
59 |
+
position: absolute;
|
60 |
+
top: 0;
|
61 |
+
right: 0;
|
62 |
+
background-color: #0d97d8;
|
63 |
+
color: yellow;
|
64 |
+
background-position: center 24px;
|
65 |
+
background-size: 85px 85px;
|
66 |
+
font-size: 14px;
|
67 |
+
text-align: center;
|
68 |
+
font-weight: 600;
|
69 |
+
margin: 5px 0 0;
|
70 |
+
padding-top: 120px;
|
71 |
+
height: 40px;
|
72 |
+
display: inline-block;
|
73 |
+
width: 150px;
|
74 |
+
text-rendering: optimizeLegibility;
|
75 |
+
border: 5px solid #106daa;
|
76 |
+
-moz-border-radius: 20px;
|
77 |
+
-webkit-border-radius: 20px;
|
78 |
+
-khtml-border-radius: 20px;
|
79 |
+
border-radius: 20px;
|
80 |
+
}
|
81 |
+
</style>
|
82 |
<div class="wrap about-wrap">
|
83 |
<h1>Welcome To Quiz Master Next <?php echo $mlw_quiz_version; ?><a id="opener" href="">(?)</a></h1>
|
84 |
<div class="about-text">Thank you for updating!</div>
|
85 |
+
<div class="mlw_qmn_icon_wrap">Version <?php echo $mlw_quiz_version; ?></div>
|
86 |
+
<h2 class="nav-tab-wrapper">
|
87 |
+
<a href="#" class="nav-tab nav-tab-active">
|
88 |
+
What’s New In <?php echo $mlw_quiz_version; ?> </a>
|
89 |
+
</h2>
|
90 |
+
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Now you can edit the style for each quiz!</h2>
|
91 |
+
<p>This new version brings the ability to edit the css for each quiz. Simply go to the new Quiz Style tab on the Quiz options page to see the current css as well as the recommended default css. The css classes for the page are listed at the top of the tab with an explanation as to what they are assigned to.</p>
|
92 |
+
<br />
|
93 |
+
<h3>Changelog For <?php echo $mlw_quiz_version; ?></h3>
|
94 |
<ul>
|
95 |
+
<li>Added Ability To Edit Style For Each Quiz</li>
|
96 |
+
<li>Fixed Tried Quiz Too Many Times Text Bug</li>
|
97 |
+
<li>Fixed Dashboard Quartely Widget Bug</li>
|
98 |
+
<li>Minor Design Changes To Quiz Options Page</li>
|
99 |
</ul>
|
100 |
<h3>What's Coming Soon</h3>
|
101 |
<ul>
|
103 |
<li>Stats For Each Quiz</li>
|
104 |
<li>Multiple Right Answers</li>
|
105 |
<li>Graded Open Text Answers</li>
|
106 |
+
<li>Exporting Of Results</li>
|
107 |
</ul>
|
108 |
|
109 |
<div id="dialog" title="Help">
|
includes/mlw_quiz.php
CHANGED
@@ -181,29 +181,12 @@ function mlw_quiz_shortcode($atts)
|
|
181 |
$j( ".quiz_section.slide"+window.mlw_quiz_slide ).show( "slide", {direction: "left"}, 300 );
|
182 |
}
|
183 |
</script>
|
184 |
-
<style type="text/css">
|
185 |
-
div.mlw_qmn_quiz input[type=submit],
|
186 |
-
a.mlw_qmn_quiz_link
|
187 |
-
{
|
188 |
-
border-radius: 4px;
|
189 |
-
position: relative;
|
190 |
-
background-image: linear-gradient(#fff,#dedede);
|
191 |
-
background-color: #eee;
|
192 |
-
border: #ccc solid 1px;
|
193 |
-
color: #333;
|
194 |
-
text-shadow: 0 1px 0 rgba(255,255,255,.5);
|
195 |
-
box-sizing: border-box;
|
196 |
-
display: inline-block;
|
197 |
-
padding: 5px 5px 5px 5px;
|
198 |
-
margin: auto;
|
199 |
-
}
|
200 |
-
</style>
|
201 |
<?php
|
202 |
}
|
203 |
if ($mlw_quiz_options->timer_limit != 0)
|
204 |
{
|
205 |
?>
|
206 |
-
<div id="mlw_qmn_timer"></div>
|
207 |
<script type="text/javascript">
|
208 |
var minutes = <?php echo $mlw_quiz_options->timer_limit; ?>;
|
209 |
window.amount = (minutes*60);
|
@@ -237,19 +220,6 @@ function mlw_quiz_shortcode($atts)
|
|
237 |
return minutes+":"+seconds;
|
238 |
}
|
239 |
</script>
|
240 |
-
<style type="text/css">
|
241 |
-
#mlw_qmn_timer {
|
242 |
-
position:fixed;
|
243 |
-
top:200px;
|
244 |
-
right:0px;
|
245 |
-
width:130px;
|
246 |
-
color:#00CCFF;
|
247 |
-
border-radius: 15px;
|
248 |
-
background:#000000;
|
249 |
-
text-align: center;
|
250 |
-
padding: 15px 15px 15px 15px
|
251 |
-
}
|
252 |
-
</style>
|
253 |
<?php
|
254 |
}
|
255 |
|
@@ -265,19 +235,7 @@ function mlw_quiz_shortcode($atts)
|
|
265 |
|
266 |
</script>
|
267 |
<style type="text/css">
|
268 |
-
|
269 |
-
div.mlw_qmn_quiz input[type=submit],
|
270 |
-
div.mlw_qmn_quiz label {
|
271 |
-
cursor: pointer;
|
272 |
-
}
|
273 |
-
div.mlw_qmn_quiz input:not([type=submit]):focus,
|
274 |
-
div.mlw_qmn_quiz textarea:focus {
|
275 |
-
background: #eaeaea;
|
276 |
-
}
|
277 |
-
div.mlw_qmn_quiz_section
|
278 |
-
{
|
279 |
-
|
280 |
-
}
|
281 |
</style>
|
282 |
<?php
|
283 |
//Update the quiz views
|
@@ -862,7 +820,6 @@ EOC;
|
|
862 |
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
863 |
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
864 |
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
865 |
-
if ( get_option('mlw_advert_shows') == 'true' ) {$mlw_message .= "<br>This email was generated by the Quiz Master Next plugin.";}
|
866 |
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
867 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
868 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
@@ -914,7 +871,12 @@ EOC;
|
|
914 |
{
|
915 |
if (!$mlw_qmn_isAllowed)
|
916 |
{
|
917 |
-
$
|
|
|
|
|
|
|
|
|
|
|
918 |
}
|
919 |
else { $mlw_display .= "Thank you."; }
|
920 |
}
|
181 |
$j( ".quiz_section.slide"+window.mlw_quiz_slide ).show( "slide", {direction: "left"}, 300 );
|
182 |
}
|
183 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
<?php
|
185 |
}
|
186 |
if ($mlw_quiz_options->timer_limit != 0)
|
187 |
{
|
188 |
?>
|
189 |
+
<div id="mlw_qmn_timer" class="mlw_qmn_timer"></div>
|
190 |
<script type="text/javascript">
|
191 |
var minutes = <?php echo $mlw_quiz_options->timer_limit; ?>;
|
192 |
window.amount = (minutes*60);
|
220 |
return minutes+":"+seconds;
|
221 |
}
|
222 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
<?php
|
224 |
}
|
225 |
|
235 |
|
236 |
</script>
|
237 |
<style type="text/css">
|
238 |
+
<?php echo $mlw_quiz_options->quiz_stye; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
</style>
|
240 |
<?php
|
241 |
//Update the quiz views
|
820 |
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
821 |
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
822 |
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
|
|
823 |
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
824 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
825 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
871 |
{
|
872 |
if (!$mlw_qmn_isAllowed)
|
873 |
{
|
874 |
+
$current_user = wp_get_current_user();
|
875 |
+
$mlw_message = htmlspecialchars_decode($mlw_quiz_options->total_user_tries_text, ENT_QUOTES);
|
876 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
877 |
+
$mlw_message = str_replace( "%USER_NAME%" , $current_user->display_name, $mlw_message);
|
878 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
879 |
+
$mlw_display .= $mlw_message;
|
880 |
}
|
881 |
else { $mlw_display .= "Thank you."; }
|
882 |
}
|
includes/mlw_quiz_admin.php
CHANGED
@@ -28,10 +28,52 @@ function mlw_generate_quiz_admin()
|
|
28 |
3. %THIRD_PLACE_NAME%-%THIRD_PLACE_SCORE%<br />
|
29 |
4. %FOURTH_PLACE_NAME%-%FOURTH_PLACE_SCORE%<br />
|
30 |
5. %FIFTH_PLACE_NAME%-%FIFTH_PLACE_SCORE%<br />";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
|
32 |
$insert = "INSERT INTO " . $table_name .
|
33 |
-
"(quiz_id, quiz_name, message_before, message_after, message_comment, message_end_template, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, email_from_text, question_answer_template, leaderboard_template, system, randomness_order, loggedin_user_contact, show_score, send_user_email, send_admin_email, contact_info_location, user_name, user_comp, user_email, user_phone, admin_email, comment_section, question_from_total, total_user_tries, total_user_tries_text, certificate_template, social_media, social_media_text, pagination, pagination_text, timer_limit, quiz_views, quiz_taken, deleted) " .
|
34 |
-
"VALUES (NULL , '" . $quiz_name . "' , 'Enter your text here', 'Enter your text here', 'Enter your text here', '', 'Enter your text here', 'Enter your text here', 'Submit Quiz', 'Name', 'Business', 'Email', 'Phone Number', 'Comments', 'Wordpress', '".$mlw_question_answer_default."', '".$mlw_leaderboard_default."', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '".get_option( 'admin_email', 'Enter email' )."', 0, 0, 0, 'Enter Your Text Here', 'Enter Your Text Here!', 0, 'I just score a %CORRECT_SCORE%% on %QUIZ_NAME%!', 0, 'Next', 0, 0, 0, 0)";
|
35 |
$results = $wpdb->query( $insert );
|
36 |
if ($results != false)
|
37 |
{
|
@@ -120,7 +162,7 @@ function mlw_generate_quiz_admin()
|
|
120 |
$mlw_duplicate_quiz_id = $_POST["duplicate_quiz_id"];
|
121 |
$mlw_duplicate_quiz_name = htmlspecialchars($_POST["duplicate_new_quiz_name"], ENT_QUOTES);
|
122 |
$mlw_qmn_duplicate_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "mlw_quizzes WHERE quiz_id=%d", $mlw_duplicate_quiz_id ) );
|
123 |
-
$results = $wpdb->query( "INSERT INTO ".$table_name." (quiz_id, quiz_name, message_before, message_after, message_comment, message_end_template, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, email_from_text, question_answer_template, leaderboard_template, system, randomness_order, loggedin_user_contact, show_score, send_user_email, send_admin_email, contact_info_location, user_name, user_comp, user_email, user_phone, admin_email, comment_section, question_from_total, total_user_tries, total_user_tries_text, certificate_template, social_media, social_media_text, pagination, pagination_text, timer_limit, quiz_views, quiz_taken, deleted) VALUES (NULL , '".$mlw_duplicate_quiz_name."' , '".$mlw_qmn_duplicate_data->message_before."', '".$mlw_qmn_duplicate_data->message_after."', '".$mlw_qmn_duplicate_data->message_comment."', '".$mlw_qmn_duplicate_data->message_end_template."', '".$mlw_qmn_duplicate_data->user_email_template."', '".$mlw_qmn_duplicate_data->admin_email_template."', '".$mlw_qmn_duplicate_data->submit_button_text."', '".$mlw_qmn_duplicate_data->name_field_text."', '".$mlw_qmn_duplicate_data->business_field_text."', '".$mlw_qmn_duplicate_data->email_field_text."', '".$mlw_qmn_duplicate_data->phone_field_text."', '".$mlw_qmn_duplicate_data->comment_field_text."', '".$mlw_qmn_duplicate_data->email_from_text."', '".$mlw_qmn_duplicate_data->question_answer_template."', '".$mlw_qmn_duplicate_data->leaderboard_template."', ".$mlw_qmn_duplicate_data->system.", ".$mlw_qmn_duplicate_data->randomness_order.", ".$mlw_qmn_duplicate_data->loggedin_user_contact.", ".$mlw_qmn_duplicate_data->show_score.", ".$mlw_qmn_duplicate_data->send_user_email.", ".$mlw_qmn_duplicate_data->send_admin_email.", ".$mlw_qmn_duplicate_data->contact_info_location.", ".$mlw_qmn_duplicate_data->user_name.", ".$mlw_qmn_duplicate_data->user_comp.", ".$mlw_qmn_duplicate_data->user_email.", ".$mlw_qmn_duplicate_data->user_phone.", '".get_option( 'admin_email', 'Enter email' )."', ".$mlw_qmn_duplicate_data->comment_section.", ".$mlw_qmn_duplicate_data->question_from_total.", ".$mlw_qmn_duplicate_data->total_user_tries.", '".$mlw_qmn_duplicate_data->total_user_tries_text."', '".$mlw_qmn_duplicate_data->certificate_template."', ".$mlw_qmn_duplicate_data->social_media.", '".$mlw_qmn_duplicate_data->social_media_text."', ".$mlw_qmn_duplicate_data->pagination.", '".$mlw_qmn_duplicate_data->pagination_text."', ".$mlw_qmn_duplicate_data->timer_limit.", 0, 0, 0)" );
|
124 |
if ($results != false)
|
125 |
{
|
126 |
$hasDuplicatedQuiz = true;
|
@@ -405,38 +447,7 @@ function mlw_generate_quiz_admin()
|
|
405 |
|
406 |
<button id="new_quiz_button">Create New Quiz</button>
|
407 |
|
408 |
-
<?php
|
409 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
410 |
-
{
|
411 |
-
?>
|
412 |
-
<style>
|
413 |
-
div.help_decide
|
414 |
-
{
|
415 |
-
display: block;
|
416 |
-
text-align:center;
|
417 |
-
letter-spacing: 1px;
|
418 |
-
margin: auto;
|
419 |
-
text-shadow: 0 1px 1px #000000;
|
420 |
-
background: #0d97d8;
|
421 |
-
border: 5px solid #106daa;
|
422 |
-
-moz-border-radius: 20px;
|
423 |
-
-webkit-border-radius: 20px;
|
424 |
-
-khtml-border-radius: 20px;
|
425 |
-
border-radius: 20px;
|
426 |
-
color: #FFFFFF;
|
427 |
-
}
|
428 |
-
div.help_decide a
|
429 |
-
{
|
430 |
-
color: yellow;
|
431 |
-
}
|
432 |
-
</style>
|
433 |
-
<div class="help_decide">
|
434 |
-
<p>Need support or features? Check out our Plugin Add-On Store for premium support, installation services, and more! Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a>!</p>
|
435 |
-
</div>
|
436 |
-
<?php
|
437 |
-
}
|
438 |
-
?>
|
439 |
-
|
440 |
<!--Dialogs-->
|
441 |
|
442 |
<!--New Quiz Dialog-->
|
28 |
3. %THIRD_PLACE_NAME%-%THIRD_PLACE_SCORE%<br />
|
29 |
4. %FOURTH_PLACE_NAME%-%FOURTH_PLACE_SCORE%<br />
|
30 |
5. %FIFTH_PLACE_NAME%-%FIFTH_PLACE_SCORE%<br />";
|
31 |
+
$mlw_style_default = "
|
32 |
+
div.mlw_qmn_quiz input[type=radio],
|
33 |
+
div.mlw_qmn_quiz input[type=submit],
|
34 |
+
div.mlw_qmn_quiz label {
|
35 |
+
cursor: pointer;
|
36 |
+
}
|
37 |
+
div.mlw_qmn_quiz input:not([type=submit]):focus,
|
38 |
+
div.mlw_qmn_quiz textarea:focus {
|
39 |
+
background: #eaeaea;
|
40 |
+
}
|
41 |
+
div.mlw_qmn_quiz {
|
42 |
+
text-align: left;
|
43 |
+
}
|
44 |
+
div.quiz_section {
|
45 |
+
|
46 |
+
}
|
47 |
+
div.mlw_qmn_timer {
|
48 |
+
position:fixed;
|
49 |
+
top:200px;
|
50 |
+
right:0px;
|
51 |
+
width:130px;
|
52 |
+
color:#00CCFF;
|
53 |
+
border-radius: 15px;
|
54 |
+
background:#000000;
|
55 |
+
text-align: center;
|
56 |
+
padding: 15px 15px 15px 15px
|
57 |
+
}
|
58 |
+
div.mlw_qmn_quiz input[type=submit],
|
59 |
+
a.mlw_qmn_quiz_link
|
60 |
+
{
|
61 |
+
border-radius: 4px;
|
62 |
+
position: relative;
|
63 |
+
background-image: linear-gradient(#fff,#dedede);
|
64 |
+
background-color: #eee;
|
65 |
+
border: #ccc solid 1px;
|
66 |
+
color: #333;
|
67 |
+
text-shadow: 0 1px 0 rgba(255,255,255,.5);
|
68 |
+
box-sizing: border-box;
|
69 |
+
display: inline-block;
|
70 |
+
padding: 5px 5px 5px 5px;
|
71 |
+
margin: auto;
|
72 |
+
}";
|
73 |
$mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
|
74 |
$insert = "INSERT INTO " . $table_name .
|
75 |
+
"(quiz_id, quiz_name, message_before, message_after, message_comment, message_end_template, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, email_from_text, question_answer_template, leaderboard_template, system, randomness_order, loggedin_user_contact, show_score, send_user_email, send_admin_email, contact_info_location, user_name, user_comp, user_email, user_phone, admin_email, comment_section, question_from_total, total_user_tries, total_user_tries_text, certificate_template, social_media, social_media_text, pagination, pagination_text, timer_limit, quiz_stye, quiz_views, quiz_taken, deleted) " .
|
76 |
+
"VALUES (NULL , '" . $quiz_name . "' , 'Enter your text here', 'Enter your text here', 'Enter your text here', '', 'Enter your text here', 'Enter your text here', 'Submit Quiz', 'Name', 'Business', 'Email', 'Phone Number', 'Comments', 'Wordpress', '".$mlw_question_answer_default."', '".$mlw_leaderboard_default."', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '".get_option( 'admin_email', 'Enter email' )."', 0, 0, 0, 'Enter Your Text Here', 'Enter Your Text Here!', 0, 'I just score a %CORRECT_SCORE%% on %QUIZ_NAME%!', 0, 'Next', 0, '".$mlw_style_default."', 0, 0, 0)";
|
77 |
$results = $wpdb->query( $insert );
|
78 |
if ($results != false)
|
79 |
{
|
162 |
$mlw_duplicate_quiz_id = $_POST["duplicate_quiz_id"];
|
163 |
$mlw_duplicate_quiz_name = htmlspecialchars($_POST["duplicate_new_quiz_name"], ENT_QUOTES);
|
164 |
$mlw_qmn_duplicate_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "mlw_quizzes WHERE quiz_id=%d", $mlw_duplicate_quiz_id ) );
|
165 |
+
$results = $wpdb->query( "INSERT INTO ".$table_name." (quiz_id, quiz_name, message_before, message_after, message_comment, message_end_template, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, email_from_text, question_answer_template, leaderboard_template, system, randomness_order, loggedin_user_contact, show_score, send_user_email, send_admin_email, contact_info_location, user_name, user_comp, user_email, user_phone, admin_email, comment_section, question_from_total, total_user_tries, total_user_tries_text, certificate_template, social_media, social_media_text, pagination, pagination_text, timer_limit, quiz_stye, quiz_views, quiz_taken, deleted) VALUES (NULL , '".$mlw_duplicate_quiz_name."' , '".$mlw_qmn_duplicate_data->message_before."', '".$mlw_qmn_duplicate_data->message_after."', '".$mlw_qmn_duplicate_data->message_comment."', '".$mlw_qmn_duplicate_data->message_end_template."', '".$mlw_qmn_duplicate_data->user_email_template."', '".$mlw_qmn_duplicate_data->admin_email_template."', '".$mlw_qmn_duplicate_data->submit_button_text."', '".$mlw_qmn_duplicate_data->name_field_text."', '".$mlw_qmn_duplicate_data->business_field_text."', '".$mlw_qmn_duplicate_data->email_field_text."', '".$mlw_qmn_duplicate_data->phone_field_text."', '".$mlw_qmn_duplicate_data->comment_field_text."', '".$mlw_qmn_duplicate_data->email_from_text."', '".$mlw_qmn_duplicate_data->question_answer_template."', '".$mlw_qmn_duplicate_data->leaderboard_template."', ".$mlw_qmn_duplicate_data->system.", ".$mlw_qmn_duplicate_data->randomness_order.", ".$mlw_qmn_duplicate_data->loggedin_user_contact.", ".$mlw_qmn_duplicate_data->show_score.", ".$mlw_qmn_duplicate_data->send_user_email.", ".$mlw_qmn_duplicate_data->send_admin_email.", ".$mlw_qmn_duplicate_data->contact_info_location.", ".$mlw_qmn_duplicate_data->user_name.", ".$mlw_qmn_duplicate_data->user_comp.", ".$mlw_qmn_duplicate_data->user_email.", ".$mlw_qmn_duplicate_data->user_phone.", '".get_option( 'admin_email', 'Enter email' )."', ".$mlw_qmn_duplicate_data->comment_section.", ".$mlw_qmn_duplicate_data->question_from_total.", ".$mlw_qmn_duplicate_data->total_user_tries.", '".$mlw_qmn_duplicate_data->total_user_tries_text."', '".$mlw_qmn_duplicate_data->certificate_template."', ".$mlw_qmn_duplicate_data->social_media.", '".$mlw_qmn_duplicate_data->social_media_text."', ".$mlw_qmn_duplicate_data->pagination.", '".$mlw_qmn_duplicate_data->pagination_text."', ".$mlw_qmn_duplicate_data->timer_limit.", '".$mlw_qmn_duplicate_data->quiz_stye."', 0, 0, 0)" );
|
166 |
if ($results != false)
|
167 |
{
|
168 |
$hasDuplicatedQuiz = true;
|
447 |
|
448 |
<button id="new_quiz_button">Create New Quiz</button>
|
449 |
|
450 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
<!--Dialogs-->
|
452 |
|
453 |
<!--New Quiz Dialog-->
|
includes/mlw_quiz_install.php
CHANGED
@@ -91,6 +91,8 @@ function mlw_quiz_activate()
|
|
91 |
pagination_text TEXT NOT NULL,
|
92 |
|
93 |
timer_limit INT NOT NULL,
|
|
|
|
|
94 |
|
95 |
quiz_views INT NOT NULL,
|
96 |
|
91 |
pagination_text TEXT NOT NULL,
|
92 |
|
93 |
timer_limit INT NOT NULL,
|
94 |
+
|
95 |
+
quiz_stye TEXT NOT NULL,
|
96 |
|
97 |
quiz_views INT NOT NULL,
|
98 |
|
includes/mlw_quiz_options.php
CHANGED
@@ -22,6 +22,7 @@ function mlw_generate_quiz_options()
|
|
22 |
$mlw_hasResetQuizStats = false;
|
23 |
$mlw_hasAddedLanding = false;
|
24 |
$mlw_hasSavedLanding = false;
|
|
|
25 |
$mlw_qmn_isQueryError = false;
|
26 |
$mlw_qmn_error_code = '0000';
|
27 |
|
@@ -437,6 +438,38 @@ function mlw_generate_quiz_options()
|
|
437 |
}
|
438 |
}
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
/*
|
442 |
Code For Quiz Tools Tab
|
@@ -933,6 +966,15 @@ function mlw_generate_quiz_options()
|
|
933 |
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
934 |
<strong>Success!</strong> The certificate options have been saved successfully!</p>
|
935 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
<?php
|
937 |
}
|
938 |
?>
|
@@ -944,7 +986,8 @@ function mlw_generate_quiz_options()
|
|
944 |
<li><a href="#tabs-4">Quiz Leaderboard</a></li>
|
945 |
<li><a href="#tabs-5">Quiz Certificate (Beta)</a></li>
|
946 |
<li><a href="#tabs-6">Quiz Landing Page</a></li>
|
947 |
-
<li><a href="#tabs-7">Quiz
|
|
|
948 |
</ul>
|
949 |
<div id="tabs-1">
|
950 |
<button id="new_question_button_two">Add Question</button><button id="question_tab_help">Help</button>
|
@@ -1881,17 +1924,7 @@ function mlw_generate_quiz_options()
|
|
1881 |
|
1882 |
<tr>
|
1883 |
<td><strong>%COMMENT_SECTION%</strong> - The comments the user entered into comment box if enabled</td>
|
1884 |
-
|
1885 |
-
</tr>
|
1886 |
-
|
1887 |
-
<tr>
|
1888 |
-
<td><strong>%USER_ANSWER%</strong> - The answer the user gave for the question</td>
|
1889 |
-
<td><strong>%CORRECT_ANSWER%</strong> - The correct answer for the question</td>
|
1890 |
-
</tr>
|
1891 |
-
|
1892 |
-
<tr>
|
1893 |
-
<td><strong>%USER_COMMENTS%</strong> - The comments the user provided in the comment field for the question</td>
|
1894 |
-
<td><strong>%CORRECT_ANSWER_INFO%</strong> - Reason why the correct answer is the correct answer</td>
|
1895 |
</tr>
|
1896 |
<tr>
|
1897 |
<td><strong>%TIMER%</strong> - The amount of time user spent of quiz</td>
|
@@ -1979,6 +2012,72 @@ function mlw_generate_quiz_options()
|
|
1979 |
</form>
|
1980 |
</div>
|
1981 |
<div id="tabs-7">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1982 |
<p>Use this button to reset all the stats collected for this quiz (Quiz Views and Times Quiz Has Been Taken). </p>
|
1983 |
<button id="mlw_reset_stats_button">Reset Quiz Views And Taken Stats</button>
|
1984 |
<div id="mlw_reset_stats_dialog" title="Reset Stats For This Quiz" style="display:none;">
|
@@ -1994,37 +2093,7 @@ function mlw_generate_quiz_options()
|
|
1994 |
</div>
|
1995 |
</div>
|
1996 |
|
1997 |
-
<?php
|
1998 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
1999 |
-
{
|
2000 |
-
?>
|
2001 |
-
<style>
|
2002 |
-
div.help_decide
|
2003 |
-
{
|
2004 |
-
display: block;
|
2005 |
-
text-align:center;
|
2006 |
-
letter-spacing: 1px;
|
2007 |
-
margin: auto;
|
2008 |
-
text-shadow: 0 1px 1px #000000;
|
2009 |
-
background: #0d97d8;
|
2010 |
-
border: 5px solid #106daa;
|
2011 |
-
-moz-border-radius: 20px;
|
2012 |
-
-webkit-border-radius: 20px;
|
2013 |
-
-khtml-border-radius: 20px;
|
2014 |
-
border-radius: 20px;
|
2015 |
-
color: #FFFFFF;
|
2016 |
-
}
|
2017 |
-
div.help_decide a
|
2018 |
-
{
|
2019 |
-
color: yellow;
|
2020 |
-
}
|
2021 |
-
</style>
|
2022 |
-
<div class="help_decide">
|
2023 |
-
<p>Need support or features? Check out our Plugin Add-On Store for premium support, installation services, and more! Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a>!</p>
|
2024 |
-
</div>
|
2025 |
-
<?php
|
2026 |
-
}
|
2027 |
-
?>
|
2028 |
|
2029 |
|
2030 |
<!--Dialogs-->
|
22 |
$mlw_hasResetQuizStats = false;
|
23 |
$mlw_hasAddedLanding = false;
|
24 |
$mlw_hasSavedLanding = false;
|
25 |
+
$mlw_hasSavedStyle = false;
|
26 |
$mlw_qmn_isQueryError = false;
|
27 |
$mlw_qmn_error_code = '0000';
|
28 |
|
438 |
}
|
439 |
}
|
440 |
|
441 |
+
/*
|
442 |
+
Code For Quiz Style Tab
|
443 |
+
*/
|
444 |
+
|
445 |
+
if (isset($_POST["save_style_options"]) && $_POST["save_style_options"] == "confirmation")
|
446 |
+
{
|
447 |
+
//Function Variables
|
448 |
+
$mlw_qmn_style_id = intval($_POST["style_quiz_id"]);
|
449 |
+
$mlw_qmn_style = htmlspecialchars(stripslashes($_POST["quiz_css"]), ENT_QUOTES);
|
450 |
+
|
451 |
+
//Save the new css
|
452 |
+
$mlw_save_stle_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET quiz_stye='%s' WHERE quiz_id=%d", $mlw_qmn_style, $mlw_qmn_style_id ) );
|
453 |
+
if ($mlw_save_stle_results != false)
|
454 |
+
{
|
455 |
+
$mlw_hasSavedStyle = true;
|
456 |
+
|
457 |
+
//Insert Action Into Audit Trail
|
458 |
+
global $current_user;
|
459 |
+
get_currentuserinfo();
|
460 |
+
$table_name = $wpdb->prefix . "mlw_qm_audit_trail";
|
461 |
+
$insert = "INSERT INTO " . $table_name .
|
462 |
+
"(trail_id, action_user, action, time) " .
|
463 |
+
"VALUES (NULL , '" . $current_user->display_name . "' , 'Styles Have Been Saved For Quiz Number ".$mlw_qmn_landing_id."' , '" . date("h:i:s A m/d/Y") . "')";
|
464 |
+
$results = $wpdb->query( $insert );
|
465 |
+
}
|
466 |
+
else
|
467 |
+
{
|
468 |
+
$mlw_qmn_isQueryError = true;
|
469 |
+
$mlw_qmn_error_code = '0015';
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
|
474 |
/*
|
475 |
Code For Quiz Tools Tab
|
966 |
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
967 |
<strong>Success!</strong> The certificate options have been saved successfully!</p>
|
968 |
</div>
|
969 |
+
<?php
|
970 |
+
}
|
971 |
+
if ($mlw_hasSavedStyle)
|
972 |
+
{
|
973 |
+
?>
|
974 |
+
<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
|
975 |
+
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
976 |
+
<strong>Success!</strong> The styles have been saved successfully!</p>
|
977 |
+
</div>
|
978 |
<?php
|
979 |
}
|
980 |
?>
|
986 |
<li><a href="#tabs-4">Quiz Leaderboard</a></li>
|
987 |
<li><a href="#tabs-5">Quiz Certificate (Beta)</a></li>
|
988 |
<li><a href="#tabs-6">Quiz Landing Page</a></li>
|
989 |
+
<li><a href="#tabs-7">Quiz Styling</a></li>
|
990 |
+
<li><a href="#tabs-8">Quiz Tools</a></li>
|
991 |
</ul>
|
992 |
<div id="tabs-1">
|
993 |
<button id="new_question_button_two">Add Question</button><button id="question_tab_help">Help</button>
|
1924 |
|
1925 |
<tr>
|
1926 |
<td><strong>%COMMENT_SECTION%</strong> - The comments the user entered into comment box if enabled</td>
|
1927 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1928 |
</tr>
|
1929 |
<tr>
|
1930 |
<td><strong>%TIMER%</strong> - The amount of time user spent of quiz</td>
|
2012 |
</form>
|
2013 |
</div>
|
2014 |
<div id="tabs-7">
|
2015 |
+
<h3>Quiz CSS</h3>
|
2016 |
+
<p>This page allows you to edit the css styles for the quiz.</p>
|
2017 |
+
<p>Entire quiz is wrapped in class 'mlw_qmn_quiz'</p>
|
2018 |
+
<p>Each page of the quiz is wrapped in class 'quiz_section'</p>
|
2019 |
+
<p>Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'</p>
|
2020 |
+
<p>Timer is wrapped in class 'mlw_qmn_timer'</p>
|
2021 |
+
<button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
|
2022 |
+
<?php
|
2023 |
+
echo "<form action='' method='post' name='quiz_style_form'>";
|
2024 |
+
echo "<input type='hidden' name='save_style_options' value='confirmation' />";
|
2025 |
+
echo "<input type='hidden' name='style_quiz_id' value='".$quiz_id."' />";
|
2026 |
+
?>
|
2027 |
+
<table class="form-table">
|
2028 |
+
<tr>
|
2029 |
+
<td width="66%"><textarea style="width: 100%; height: 100%;" id="quiz_css" name="quiz_css"><?php echo $mlw_quiz_options->quiz_stye; ?></textarea>
|
2030 |
+
</td>
|
2031 |
+
<td width="30%">
|
2032 |
+
<strong>Default:</strong><br />
|
2033 |
+
div.mlw_qmn_quiz input[type=radio],<br />
|
2034 |
+
div.mlw_qmn_quiz input[type=submit],<br />
|
2035 |
+
div.mlw_qmn_quiz label {<br />
|
2036 |
+
cursor: pointer;<br />
|
2037 |
+
}<br />
|
2038 |
+
div.mlw_qmn_quiz input:not([type=submit]):focus,<br />
|
2039 |
+
div.mlw_qmn_quiz textarea:focus {<br />
|
2040 |
+
background: #eaeaea;<br />
|
2041 |
+
}<br />
|
2042 |
+
div.mlw_qmn_quiz {<br />
|
2043 |
+
text-align: left;<br />
|
2044 |
+
}<br />
|
2045 |
+
div.quiz_section {<br />
|
2046 |
+
<br />
|
2047 |
+
}<br />
|
2048 |
+
div.mlw_qmn_timer {<br />
|
2049 |
+
position:fixed;<br />
|
2050 |
+
top:200px;<br />
|
2051 |
+
right:0px;<br />
|
2052 |
+
width:130px;<br />
|
2053 |
+
color:#00CCFF;<br />
|
2054 |
+
border-radius: 15px;<br />
|
2055 |
+
background:#000000;<br />
|
2056 |
+
text-align: center;<br />
|
2057 |
+
padding: 15px 15px 15px 15px<br />
|
2058 |
+
}<br />
|
2059 |
+
div.mlw_qmn_quiz input[type=submit],<br />
|
2060 |
+
a.mlw_qmn_quiz_link<br />
|
2061 |
+
{<br />
|
2062 |
+
border-radius: 4px;<br />
|
2063 |
+
position: relative;<br />
|
2064 |
+
background-image: linear-gradient(#fff,#dedede);<br />
|
2065 |
+
background-color: #eee;<br />
|
2066 |
+
border: #ccc solid 1px;<br />
|
2067 |
+
color: #333;<br />
|
2068 |
+
text-shadow: 0 1px 0 rgba(255,255,255,.5);<br />
|
2069 |
+
box-sizing: border-box;<br />
|
2070 |
+
display: inline-block;<br />
|
2071 |
+
padding: 5px 5px 5px 5px;<br />
|
2072 |
+
margin: auto;<br />
|
2073 |
+
}<br />
|
2074 |
+
</td>
|
2075 |
+
</tr>
|
2076 |
+
</table>
|
2077 |
+
<button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
|
2078 |
+
</form>
|
2079 |
+
</div>
|
2080 |
+
<div id="tabs-8">
|
2081 |
<p>Use this button to reset all the stats collected for this quiz (Quiz Views and Times Quiz Has Been Taken). </p>
|
2082 |
<button id="mlw_reset_stats_button">Reset Quiz Views And Taken Stats</button>
|
2083 |
<div id="mlw_reset_stats_dialog" title="Reset Stats For This Quiz" style="display:none;">
|
2093 |
</div>
|
2094 |
</div>
|
2095 |
|
2096 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2097 |
|
2098 |
|
2099 |
<!--Dialogs-->
|
includes/mlw_results.php
CHANGED
@@ -209,37 +209,7 @@ function mlw_generate_quiz_results()
|
|
209 |
echo $display;
|
210 |
?>
|
211 |
|
212 |
-
<?php
|
213 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
214 |
-
{
|
215 |
-
?>
|
216 |
-
<style>
|
217 |
-
div.help_decide
|
218 |
-
{
|
219 |
-
display: block;
|
220 |
-
text-align:center;
|
221 |
-
letter-spacing: 1px;
|
222 |
-
margin: auto;
|
223 |
-
text-shadow: 0 1px 1px #000000;
|
224 |
-
background: #0d97d8;
|
225 |
-
border: 5px solid #106daa;
|
226 |
-
-moz-border-radius: 20px;
|
227 |
-
-webkit-border-radius: 20px;
|
228 |
-
-khtml-border-radius: 20px;
|
229 |
-
border-radius: 20px;
|
230 |
-
color: #FFFFFF;
|
231 |
-
}
|
232 |
-
div.help_decide a
|
233 |
-
{
|
234 |
-
color: yellow;
|
235 |
-
}
|
236 |
-
</style>
|
237 |
-
<div class="help_decide">
|
238 |
-
<p>Need support or features? Check out our Plugin Add-On Store for premium support, installation services, and more! Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a>!</p>
|
239 |
-
</div>
|
240 |
-
<?php
|
241 |
-
}
|
242 |
-
?>
|
243 |
|
244 |
<div id="dialog" title="Help" style="display:none;">
|
245 |
<h3><b>Help</b></h3>
|
209 |
echo $display;
|
210 |
?>
|
211 |
|
212 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
<div id="dialog" title="Help" style="display:none;">
|
215 |
<h3><b>Help</b></h3>
|
includes/mlw_results_details.php
CHANGED
@@ -225,37 +225,7 @@ EOC;
|
|
225 |
<p>The bottom section shows the text from the comment box if enabled.</p>
|
226 |
</div>
|
227 |
</div>
|
228 |
-
<?php
|
229 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
230 |
-
{
|
231 |
-
?>
|
232 |
-
<style>
|
233 |
-
div.help_decide
|
234 |
-
{
|
235 |
-
display: block;
|
236 |
-
text-align:center;
|
237 |
-
letter-spacing: 1px;
|
238 |
-
margin: auto;
|
239 |
-
text-shadow: 0 1px 1px #000000;
|
240 |
-
background: #0d97d8;
|
241 |
-
border: 5px solid #106daa;
|
242 |
-
-moz-border-radius: 20px;
|
243 |
-
-webkit-border-radius: 20px;
|
244 |
-
-khtml-border-radius: 20px;
|
245 |
-
border-radius: 20px;
|
246 |
-
color: #FFFFFF;
|
247 |
-
}
|
248 |
-
div.help_decide a
|
249 |
-
{
|
250 |
-
color: yellow;
|
251 |
-
}
|
252 |
-
</style>
|
253 |
-
<div class="help_decide">
|
254 |
-
<p>Need support or features? Check out our Plugin Add-On Store for premium support, installation services, and more! Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a>!</p>
|
255 |
-
</div>
|
256 |
-
<?php
|
257 |
-
}
|
258 |
-
?>
|
259 |
</div>
|
260 |
</div>
|
261 |
|
225 |
<p>The bottom section shows the text from the comment box if enabled.</p>
|
226 |
</div>
|
227 |
</div>
|
228 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
</div>
|
230 |
</div>
|
231 |
|
includes/mlw_tools.php
CHANGED
@@ -72,37 +72,7 @@ function mlw_generate_quiz_tools(){
|
|
72 |
|
73 |
<div style="clear:both"></div>
|
74 |
|
75 |
-
<?php
|
76 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
77 |
-
{
|
78 |
-
?>
|
79 |
-
<style>
|
80 |
-
div.help_decide
|
81 |
-
{
|
82 |
-
display: block;
|
83 |
-
text-align:center;
|
84 |
-
letter-spacing: 1px;
|
85 |
-
margin: auto;
|
86 |
-
text-shadow: 0 1px 1px #000000;
|
87 |
-
background: #0d97d8;
|
88 |
-
border: 5px solid #106daa;
|
89 |
-
-moz-border-radius: 20px;
|
90 |
-
-webkit-border-radius: 20px;
|
91 |
-
-khtml-border-radius: 20px;
|
92 |
-
border-radius: 20px;
|
93 |
-
color: #FFFFFF;
|
94 |
-
}
|
95 |
-
div.help_decide a
|
96 |
-
{
|
97 |
-
color: yellow;
|
98 |
-
}
|
99 |
-
</style>
|
100 |
-
<div class="help_decide">
|
101 |
-
<p>Need support or features? Check out our Plugin Add-On Store for premium support, installation services, and more! Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a>!</p>
|
102 |
-
</div>
|
103 |
-
<?php
|
104 |
-
}
|
105 |
-
?>
|
106 |
|
107 |
<div id="dialog" title="Help" style="display:none;">
|
108 |
<h3><b>Help</b></h3>
|
72 |
|
73 |
<div style="clear:both"></div>
|
74 |
|
75 |
+
<?php echo mlw_qmn_show_adverts(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
<div id="dialog" title="Help" style="display:none;">
|
78 |
<h3><b>Help</b></h3>
|
includes/mlw_update.php
CHANGED
@@ -6,7 +6,7 @@ function mlw_quiz_update()
|
|
6 |
{
|
7 |
|
8 |
//Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
|
9 |
-
$data = "2.
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
@@ -167,6 +167,57 @@ function mlw_quiz_update()
|
|
167 |
$results = $wpdb->query( $update_sql );
|
168 |
}
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
global $wpdb;
|
172 |
$table_name = $wpdb->prefix . "mlw_questions";
|
6 |
{
|
7 |
|
8 |
//Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
|
9 |
+
$data = "2.1.1";
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
167 |
$results = $wpdb->query( $update_sql );
|
168 |
}
|
169 |
|
170 |
+
//Update 2.1.1
|
171 |
+
if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'quiz_stye'") != "quiz_stye")
|
172 |
+
{
|
173 |
+
$sql = "ALTER TABLE ".$table_name." ADD quiz_stye TEXT NOT NULL AFTER timer_limit";
|
174 |
+
$results = $wpdb->query( $sql );
|
175 |
+
$mlw_style_default = "
|
176 |
+
div.mlw_qmn_quiz input[type=radio],
|
177 |
+
div.mlw_qmn_quiz input[type=submit],
|
178 |
+
div.mlw_qmn_quiz label {
|
179 |
+
cursor: pointer;
|
180 |
+
}
|
181 |
+
div.mlw_qmn_quiz input:not([type=submit]):focus,
|
182 |
+
div.mlw_qmn_quiz textarea:focus {
|
183 |
+
background: #eaeaea;
|
184 |
+
}
|
185 |
+
div.mlw_qmn_quiz {
|
186 |
+
text-align: left;
|
187 |
+
}
|
188 |
+
div.quiz_section {
|
189 |
+
|
190 |
+
}
|
191 |
+
div.mlw_qmn_timer {
|
192 |
+
position:fixed;
|
193 |
+
top:200px;
|
194 |
+
right:0px;
|
195 |
+
width:130px;
|
196 |
+
color:#00CCFF;
|
197 |
+
border-radius: 15px;
|
198 |
+
background:#000000;
|
199 |
+
text-align: center;
|
200 |
+
padding: 15px 15px 15px 15px
|
201 |
+
}
|
202 |
+
div.mlw_qmn_quiz input[type=submit],
|
203 |
+
a.mlw_qmn_quiz_link
|
204 |
+
{
|
205 |
+
border-radius: 4px;
|
206 |
+
position: relative;
|
207 |
+
background-image: linear-gradient(#fff,#dedede);
|
208 |
+
background-color: #eee;
|
209 |
+
border: #ccc solid 1px;
|
210 |
+
color: #333;
|
211 |
+
text-shadow: 0 1px 0 rgba(255,255,255,.5);
|
212 |
+
box-sizing: border-box;
|
213 |
+
display: inline-block;
|
214 |
+
padding: 5px 5px 5px 5px;
|
215 |
+
margin: auto;
|
216 |
+
}";
|
217 |
+
$update_sql = "UPDATE ".$table_name." SET quiz_stye='".$mlw_style_default."'";
|
218 |
+
$results = $wpdb->query( $update_sql );
|
219 |
+
}
|
220 |
+
|
221 |
|
222 |
global $wpdb;
|
223 |
$table_name = $wpdb->prefix . "mlw_questions";
|
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: 2.
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
@@ -95,6 +95,61 @@ function mlw_qmn_notice_ignore() {
|
|
95 |
update_option('mlw_qmn_review_notice' , '2');
|
96 |
}
|
97 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
|
100 |
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
6 |
+
Version: 2.1.1
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
95 |
update_option('mlw_qmn_review_notice' , '2');
|
96 |
}
|
97 |
}
|
98 |
+
function mlw_qmn_show_adverts()
|
99 |
+
{
|
100 |
+
$mlw_advert = "";
|
101 |
+
$mlw_advert_text = "";
|
102 |
+
if ( get_option('mlw_advert_shows') == 'true' )
|
103 |
+
{
|
104 |
+
$mlw_random_int = rand(0, 4);
|
105 |
+
switch ($mlw_random_int) {
|
106 |
+
case 0:
|
107 |
+
$mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
108 |
+
break;
|
109 |
+
case 1:
|
110 |
+
$mlw_advert_text = "Is Quiz Master Next beneficial to your website? Please help by giving us a review on WordPress.org by going <a href=\"http://wordpress.org/support/view/plugin-reviews/quiz-master-next\">here</a>!";
|
111 |
+
break;
|
112 |
+
case 2:
|
113 |
+
$mlw_advert_text = "Want help installing and configuring one of our plugins? Check out our Plugin Installation services. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
114 |
+
break;
|
115 |
+
case 3:
|
116 |
+
$mlw_advert_text = "Would you like to support this plugin but do not need or want premium support? Please consider our inexpensive 'Advertisements Be Gone' add-on which will get rid of these ads. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
117 |
+
break;
|
118 |
+
case 4:
|
119 |
+
$mlw_advert_text = "Need a plugin to show off testimonials from customers or clients? Be sure to check out our new Testimonial Master plugin. Visit our <a href=\"http://mylocalwebstop.com/wordpress-plugins/\">WordPress Plugins Page</a> for details!";
|
120 |
+
break;
|
121 |
+
default:
|
122 |
+
$mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
123 |
+
}
|
124 |
+
$mlw_advert .= "
|
125 |
+
<style>
|
126 |
+
div.help_decide
|
127 |
+
{
|
128 |
+
display: block;
|
129 |
+
text-align:center;
|
130 |
+
letter-spacing: 1px;
|
131 |
+
margin: auto;
|
132 |
+
text-shadow: 0 1px 1px #000000;
|
133 |
+
background: #0d97d8;
|
134 |
+
border: 5px solid #106daa;
|
135 |
+
-moz-border-radius: 20px;
|
136 |
+
-webkit-border-radius: 20px;
|
137 |
+
-khtml-border-radius: 20px;
|
138 |
+
border-radius: 20px;
|
139 |
+
color: #FFFFFF;
|
140 |
+
}
|
141 |
+
div.help_decide a
|
142 |
+
{
|
143 |
+
color: yellow;
|
144 |
+
}
|
145 |
+
</style>";
|
146 |
+
$mlw_advert .= "
|
147 |
+
<div class=\"help_decide\">
|
148 |
+
<p>$mlw_advert_text</p>
|
149 |
+
</div>";
|
150 |
+
}
|
151 |
+
return $mlw_advert;
|
152 |
+
}
|
153 |
|
154 |
|
155 |
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: fpcorso
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
|
4 |
Tags: quiz, test, score, survey, contact, form, email, answer, question
|
5 |
-
Requires at least: 3.
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 2.
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
|
@@ -99,6 +99,12 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
= 2.0.1 (March 22, 2014) =
|
103 |
* Added Pagination On Quiz Results Page
|
104 |
* Redesigned Results Detail Page
|
@@ -389,6 +395,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
|
|
389 |
|
390 |
== Upgrade Notice ==
|
391 |
|
|
|
|
|
|
|
392 |
= 2.0.1 =
|
393 |
Upgrade to fix minor bugs and enable pagination on results page.
|
394 |
|
2 |
Contributors: fpcorso
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
|
4 |
Tags: quiz, test, score, survey, contact, form, email, answer, question
|
5 |
+
Requires at least: 3.6
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 2.1.1
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 2.1.1 (March 26, 2014) =
|
103 |
+
* Added Ability To Edit Style For Each Quiz
|
104 |
+
* Fixed Tried Quiz Too Many Times Text Bug
|
105 |
+
* Fixed Dashboard Quartely Widget Bug
|
106 |
+
* Minor Design Changes To Quiz Options Page
|
107 |
+
|
108 |
= 2.0.1 (March 22, 2014) =
|
109 |
* Added Pagination On Quiz Results Page
|
110 |
* Redesigned Results Detail Page
|
395 |
|
396 |
== Upgrade Notice ==
|
397 |
|
398 |
+
= 2.1.1 =
|
399 |
+
Upgrade to have the ability to edit the css styles for each quiz! Plus minor bugs fixes.
|
400 |
+
|
401 |
= 2.0.1 =
|
402 |
Upgrade to fix minor bugs and enable pagination on results page.
|
403 |
|
uninstall.php
CHANGED
@@ -28,4 +28,6 @@ global $wpdb;
|
|
28 |
delete_option('mlw_quiz_master_version');
|
29 |
|
30 |
delete_option('mlw_qmn_review_notice');
|
|
|
|
|
31 |
?>
|
28 |
delete_option('mlw_quiz_master_version');
|
29 |
|
30 |
delete_option('mlw_qmn_review_notice');
|
31 |
+
|
32 |
+
delete_option('mlw_advert_shows');
|
33 |
?>
|