Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: fubralimited/WP-Survey-And-Quiz-Tool
base: 38cd7f12f3
...
head fork: fubralimited/WP-Survey-And-Quiz-Tool
compare: 5c17515a6a
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
10 lib/Wpsqt/Page/Options.php
@@ -22,6 +22,11 @@ public function process(){
update_option("wpsqt_email_template",$_POST['wpsqt_email_template']);
update_option("wpsqt_chart_bg", $_POST['wpsqt_chart_bg']);
update_option("wpsqt_chart_colour", $_POST['wpsqt_chart_colour']);
+ update_option("wpsqt_chart_width", $_POST['wpsqt_chart_width']);
+ update_option("wpsqt_chart_height", $_POST['wpsqt_chart_height']);
+ update_option("wpsqt_chart_text_colour", $_POST['wpsqt_chart_text_colour']);
+ update_option("wpsqt_chart_text_size", $_POST['wpsqt_chart_text_size']);
+ update_option("wpsqt_chart_abbreviation", $_POST['wpsqt_chart_abbreviation']);
update_option("wpsqt_support_us",$_POST['wpsqt_support_us']);
update_option("wpsqt_from_email",$_POST['wpsqt_from_email']);
update_option("wpsqt_contact_email",$_POST['wpsqt_email']);
@@ -62,6 +67,11 @@ public function process(){
$this->_pageVars['emailTemplate'] = get_option("wpsqt_email_template");
$this->_pageVars['chartBg'] = get_option("wpsqt_chart_bg");
$this->_pageVars['chartColour'] = get_option("wpsqt_chart_colour");
+ $this->_pageVars['chartWidth'] = get_option("wpsqt_chart_width");
+ $this->_pageVars['chartHeight'] = get_option("wpsqt_chart_height");
+ $this->_pageVars['chartTextColour'] = get_option("wpsqt_chart_text_colour");
+ $this->_pageVars['chartTextSize'] = get_option("wpsqt_chart_text_size");
+ $this->_pageVars['chartAbbreviation'] = get_option("wpsqt_chart_abbreviation");
$this->_pageVars['supportUs'] = get_option("wpsqt_support_us");
$this->_pageVars['fromEmail'] = get_option("wpsqt_from_email");
$this->_pageVars['email'] = get_option("wpsqt_contact_email");
View
29 pages/admin/misc/options.php
@@ -67,12 +67,35 @@
<tr>
<th scope="row">Chart Background Colour</th>
<td><input type="text" name="wpsqt_chart_bg" value="<?php echo $chartBg; ?>" size="30" /></td>
- <td>This is the colour that will be displayed as the chart background (in RGB format)</td>
+ <td>This is the colour that will be displayed as the chart background (in RRGGBB format)</td>
</tr>
<tr>
<th scope="row">Chart Bar Colour</th>
<td><input type="text" name="wpsqt_chart_colour" value="<?php echo $chartColour; ?>" size="30" /></td>
- <td>This is the colour that will be displayed as the chart bar colour (in RGB format)</td>
+ <td>This is the colour that will be displayed as the chart bar colour (in RRGGBB format)</td>
+ </tr>
+ <tr>
+ <th scope="row">Chart Size</th>
+ <td><input type="text" name="wpsqt_chart_width" value="<?php echo $chartWidth; ?>" size="4" />&nbsp;x&nbsp;<input type="text" name="wpsqt_chart_height" value="<?php echo $chartHeight; ?>" size="4" /></td>
+ <td>This is the size of the chart which will be displayed on the site in pixels (width x height).</td>
+ </tr>
+ <tr>
+ <th scope="row">Chart Text Colour</th>
+ <td><input type="text" name="wpsqt_chart_text_colour" value="<?php echo $chartTextColour; ?>" size="30" /></td>
+ <td>This is the colour of the text that will be used for the charts (in RRGGBB format)</td>
+ </tr>
+ <tr>
+ <th scope="row">Chart Text Size</th>
+ <td><input type="text" name="wpsqt_chart_text_size" value="<?php echo $chartTextSize; ?>" size="30" /></td>
+ <td>This is the size of the text that will be used for the charts.</td>
+ </tr>
+ <tr>
+ <th scope="row">Chart Text Abbreviations</th>
+ <td>
+ <input type="radio" name="wpsqt_chart_abbreviation" value="yes" id="wpsqt_abbreviation_yes" <?php if ($chartAbbreviation == 'yes') { echo 'checked="checked"'; } ?> /> <label for="wpsqt_abbreviation_yes">Yes</label>
+ <input type="radio" name="wpsqt_chart_abbreviation" value="no" id="wpsqt_abbreviation_no" <?php if ($chartAbbreviation == 'no') { echo 'checked="checked"'; } ?> /> <label for="wpsqt_abbreviation_no">No</label>
+ </td>
+ <td>Apply the abbreviation <em>strngly</em> instead of <em>strongly</em>.</td>
</tr>
<tr>
<th scope="row">Support Us!</th>
@@ -93,7 +116,7 @@
</table>
<p class="submit">
- <input class="button-primary" type="submit" name="Save" value="Save Quiz" id="submitbutton" />
+ <input class="button-primary" type="submit" name="Save" value="Save Options" id="submitbutton" />
</p>
<h3>Replacement Token</h3>
View
43 pages/admin/surveys/result.total.script.site.php
@@ -10,9 +10,26 @@
<div class="wpsqt-question-review">
<h3><?php echo $question['name']; ?></h3>
+ <?php
+ $chartWidth = get_option('wpsqt_chart_width');
+ $chartHeight = get_option('wpsqt_chart_height');
+ $chartTextColour = get_option('wpsqt_chart_text_colour');
+ $chartTextSize = get_option('wpsqt_chart_text_size');
+ $chartAbbreviations = get_option('wpsqt_chart_abbreviation');
+ if (!isset($chartWidth) || $chartWidth == NULL)
+ $chartWidth = 400;
+ if (!isset($chartHeight) || $chartHeight == NULL)
+ $chartHeight = 185;
+ if (!isset($chartTextColour) || $chartTextColour == NULL)
+ $chartTextColour = '000000';
+ if (!isset($chartTextSize) || $chartTextSize == NULL)
+ $chartTextSize = 13;
+ $chartSize = 'chs='.$chartWidth.'x'.$chartHeight;
+ ?>
+
<?php if ( $question['type'] == "Multiple Choice" ||
$question['type'] == "Dropdown" ) {
- $googleChartUrl = 'http://chart.apis.google.com/chart?chs=400x185&chxs=0,333333,13,0,lt,333333|1,333333,13,1,lt,333333&cht=p&chf=bg,s,'.get_option("wpsqt_chart_bg").'&chco='.get_option("wpsqt_chart_colour");
+ $googleChartUrl = 'http://chart.apis.google.com/chart?'.$chartSize.'&chxs=0,'.$chartTextColour.','.$chartTextSize.',0,lt,'.$chartTextColour.'|1,'.$chartTextColour.','.$chartTextSize.',1,lt,'.$chartTextColour.'&cht=p&chf=bg,s,'.get_option("wpsqt_chart_bg").'&chco='.get_option("wpsqt_chart_colour");
$valueArray = array();
$nameArray = array();
foreach ( $question['answers'] as $answer ) {
@@ -47,7 +64,7 @@
}
} else if ($question['type'] == "Likert") {
- $googleChartUrl = 'http://chart.apis.google.com/chart?&cht=bvs&chxs=0,333333,13,0,lt,333333|1,333333,13,1,lt,333333&chf=bg,s,'.get_option("wpsqt_chart_bg").'&chco='.get_option("wpsqt_chart_colour");
+ $googleChartUrl = 'http://chart.apis.google.com/chart?&cht=bvs&chxs=0,'.$chartTextColour.','.$chartTextSize.',0,lt,'.$chartTextColour.'|1,'.$chartTextColour.','.$chartTextSize.',1,lt,'.$chartTextColour.'&chf=bg,s,'.get_option("wpsqt_chart_bg").'&chco='.get_option("wpsqt_chart_colour");
$valueArray = array();
$nameArray = array();
$maxValue = 0;
@@ -63,10 +80,14 @@
}
// Makes chart wider if its an agree/disagree question
if (array_key_exists('Disagree', $question['answers'])) {
- $googleChartUrl .= '&chs=600x250&chbh=r,5,10';
- $googleChartUrl .= '&chxt=x&chxl=0:|Strgly Disagree|Disagree|No Opinion|Agree|Strgly Agree'; // Sets labelling to x-axis only
+ $googleChartUrl .= '&'.$chartSize.'&chbh=r,5,10';
+ if ($chartAbbreviations == 'yes') {
+ $googleChartUrl .= '&chxt=x&chxl=0:|Strgly Disagree|Disagree|No Opinion|Agree|Strgly Agree'; // Sets labelling to x-axis only
+ } else {
+ $googleChartUrl .= '&chxt=x&chxl=0:|Strongly Disagree|Disagree|No Opinion|Agree|Strongly Agree'; // Sets labelling to x-axis only
+ }
} else {
- $googleChartUrl .= '&chs=350x250';
+ $googleChartUrl .= '&'.$chartSize;
$googleChartUrl .= '&chxt=x&chxl=0:|'.implode('|', $nameArray); // Sets labelling to x-axis only
}
$googleChartUrl .= '&chm=N,000000,0,,10|N,000000,1,,10|N,000000,2,,10'; // Adds the count above bars
@@ -80,7 +101,7 @@
$wordScale = false;
}
foreach($question['answers'] as $optionkey => $matrixOption) {
- $googleChartUrl = 'http://chart.apis.google.com/chart?&cht=bvs&chxs=0,333333,13,0,lt,333333|1,333333,13,1,lt,333333';
+ $googleChartUrl = 'http://chart.apis.google.com/chart?&cht=bvs&chxs=0,'.$chartTextColour.','.$chartTextSize.',0,lt,'.$chartTextColour.'|1,'.$chartTextColour.','.$chartTextSize.',1,lt,'.$chartTextColour.'';
$valueArray = array();
$nameArray = array();
$maxValue = 0;
@@ -94,11 +115,15 @@
$maxValue = $answer['count'];
}
- $googleChartUrl .= '&chs=350x250';
+ $googleChartUrl .= '&'.$chartSize;
if (isset($wordScale) && $wordScale == true) {
- $googleChartUrl .= '&chxt=x&chxl=0:|Strgly Disagree|Disagree|No Opinion|Agree|Strgly Agree'; // Sets labelling to x-axis only and labels with numbers
- $googleChartUrl .= '&chs=600x250&chbh=r,5,10'; // Makes chart wider
+ if ($chartAbbreviations == 'yes') {
+ $googleChartUrl .= '&chxt=x&chxl=0:|Strgly Disagree|Disagree|No Opinion|Agree|Strgly Agree'; // Sets labelling to x-axis only
+ } else {
+ $googleChartUrl .= '&chxt=x&chxl=0:|Strongly Disagree|Disagree|No Opinion|Agree|Strongly Agree'; // Sets labelling to x-axis only
+ }
+ $googleChartUrl .= '&'.$chartSize.'&chbh=r,5,10'; // Makes chart wider
} else {
$googleChartUrl .= '&chxt=x&chxl=0:|'.implode('|', $nameArray); // Sets labelling to x-axis only and labels with numbers
}
View
10 readme.txt
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=99WUG
Tags: Quiz,test,exam,survey,results,email,quizzes,charts,google charts,wpsqt,tool,poll,polling,polls
Requires at least: 3.1
Tested up to: 3.3-beta2
-Stable tag: 2.9.1
+Stable tag: 2.9.2
A highly customisable Quiz, Survey and Poll plugin to which allows for unlimited questions and sections.
== Description ==
@@ -65,6 +65,14 @@ Any further issues then feel free to create a thread on the <a href="http://word
== ChangeLog ==
+= 2.9.2 =
+
+* Several clarifications in admin panel
+* Ability to customise chart size
+* Ability to customise chart text size
+* Ability to customise chart text colour
+* Ability to abbreviation 'strongly' on chart
+
= 2.9.1 =
* Quiz duplication
View
4 wp-survey-and-quiz-tool.php
@@ -5,7 +5,7 @@
Description: Allows wordpress owners to create their own web based quizes.
Author: Fubra Limited
Author URI: http://www.catn.com
-Version: 2.9.1
+Version: 2.9.2
WP Survey And Quiz Tool
Copyright (C) 2011 Fubra Limited
@@ -49,7 +49,7 @@
define( 'WPSQT_URL_MAIN' , admin_url('admin.php?page='.WPSQT_PAGE_MAIN) );
define( 'WPSQT_URL_MAINENTANCE' , admin_url('admin.php?page='.WPSQT_PAGE_MAINTENANCE) );
define( 'WPSQT_CONTACT_EMAIL' , 'support@catn.com' );
-define( 'WPSQT_VERSION' , '2.9.1' );
+define( 'WPSQT_VERSION' , '2.9.2' );
define( 'WPSQT_DIR' , dirname(__FILE__).'/' );
define( 'WPSQT_FILE' , __FILE__ );

No commit comments for this range

Something went wrong with that request. Please try again.