Crowdsignal Dashboard – Polls, Surveys & more - Version 1.7.4

Version Description

  • Bug Fix: Added fix for missing styles array (used when javascript is disabled)
  • Bug Fix: Added fix for Internet Explorer 8 and jQuery fadeIn, fadeOut methods
  • Bug Fix: Fixed php warnings
Download this release

Release Info

Developer mdawaffe
Plugin Icon 128x128 Crowdsignal Dashboard – Polls, Surveys & more
Version 1.7.4
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.4

Files changed (3) hide show
  1. polldaddy.js +4 -1
  2. polldaddy.php +84 -17
  3. readme.txt +8 -3
polldaddy.js CHANGED
@@ -1,5 +1,6 @@
1
  jQuery(function($){
2
  $('.hide-if-js').hide();
 
3
  $('.hide-if-no-js').removeClass( 'hide-if-no-js' );
4
 
5
  $('a.delete-poll').click( function() {
@@ -45,9 +46,11 @@ jQuery(function($){
45
 
46
  $('.polldaddy-show-shortcode').toggle( function() {
47
  $(this).parents('tr:first').next('tr').fadeIn();
 
48
  return false;
49
  }, function() {
50
  $(this).parents('tr:first').next('tr').fadeOut();
 
51
  return false;
52
  } );
53
 
@@ -123,4 +126,4 @@ jQuery(function($){
123
  $("#numberChoices").hide("fast");
124
  }
125
  });
126
- });
1
  jQuery(function($){
2
  $('.hide-if-js').hide();
3
+ $('.empty-if-js').empty();
4
  $('.hide-if-no-js').removeClass( 'hide-if-no-js' );
5
 
6
  $('a.delete-poll').click( function() {
46
 
47
  $('.polldaddy-show-shortcode').toggle( function() {
48
  $(this).parents('tr:first').next('tr').fadeIn();
49
+ $(this).parents('tr:first').next('tr').show();
50
  return false;
51
  }, function() {
52
  $(this).parents('tr:first').next('tr').fadeOut();
53
+ $(this).parents('tr:first').next('tr').hide();
54
  return false;
55
  } );
56
 
126
  $("#numberChoices").hide("fast");
127
  }
128
  });
129
+ });
polldaddy.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: PollDaddy Polls
5
  Description: Create and manage PollDaddy polls in WordPress
6
  Author: Automattic, Inc.
7
  Author URL: http://automattic.com/
8
- Version: 1.7.3
9
  */
10
 
11
  // You can hardcode your PollDaddy PartnerGUID (API Key) here
@@ -15,7 +15,7 @@ if ( !defined( 'WP_POLLDADDY__CLASS' ) )
15
  define( 'WP_POLLDADDY__CLASS', 'WP_PollDaddy' );
16
 
17
  if ( !defined( 'WP_POLLDADDY__POLLDADDY_CLIENT_PATH' ) )
18
- define( 'WP_POLLDADDY__POLLDADDY_CLIENT_PATH', dirname( __FILE__ ) . '/polldaddy-client.php' );
19
 
20
  // TODO: when user changes PollDaddy password, userCode changes
21
  class WP_PollDaddy {
@@ -24,7 +24,7 @@ class WP_PollDaddy {
24
  var $base_url = false;
25
  var $use_ssl = 0;
26
  var $scheme = 'https';
27
- var $version = '1.7.3';
28
 
29
  var $polldaddy_clients = array();
30
 
@@ -961,9 +961,9 @@ class WP_PollDaddy {
961
  }
962
 
963
  function polls_table( $view = 'blog' ) {
964
- $page = absint($_GET['paged']);
965
- if ( !$page )
966
- $page = 1;
967
  $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, WP_POLLDADDY__USERCODE );
968
  $polldaddy->reset();
969
  if ( 'user' == $view )
@@ -973,7 +973,10 @@ class WP_PollDaddy {
973
  $this->parse_errors( $polldaddy );
974
  $this->print_errors();
975
  $polls = & $polls_object->poll;
976
- $total_polls = $polls_object->_total;
 
 
 
977
  $class = '';
978
 
979
  $page_links = paginate_links( array(
@@ -1340,6 +1343,70 @@ class WP_PollDaddy {
1340
  $standard_style_ID = $style_ID;
1341
  $custom_style_ID = 0;
1342
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1343
  ?>
1344
 
1345
  <h3><?php _e( 'Design' ); ?></h3>
@@ -1402,11 +1469,11 @@ class WP_PollDaddy {
1402
  </table>
1403
  </div>
1404
 
1405
- <p class="hide-if-js" id="no-js-styleID">
1406
- <select name="styleID">
1407
 
1408
  <?php foreach ( $options as $styleID => $label ) :
1409
- $selected = $styleID == $standard_style_ID ? ' selected="selected"' : ''; ?>
1410
  <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
1411
  <?php endforeach; ?>
1412
 
@@ -1533,10 +1600,10 @@ class WP_PollDaddy {
1533
  <select id="customSelect" name="customSelect" onclick="pd_change_style(this.value);" <?php echo $hide ?>>
1534
  <?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
1535
  <option value="x"<?php echo $selected; ?>>Please choose a custom style...</option>
1536
- <?php foreach ( $styles->style as $style ) :
1537
  $selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
1538
  <option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
1539
- <?php endforeach;?>
1540
  </select>
1541
  <div id="styleIDErr" class="formErr" style="display:none;">Please choose a style.</div></td>
1542
  </tr>
@@ -1552,11 +1619,11 @@ class WP_PollDaddy {
1552
  </tbody>
1553
  </table>
1554
  </div>
1555
- <p class="hide-if-js" id="no-js-styleID">
1556
- <select name="styleID">
1557
 
1558
  <?php foreach ( $options as $styleID => $label ) :
1559
- $selected = $styleID == $standard_style_ID ? ' selected="selected"' : ''; ?>
1560
  <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
1561
  <?php endforeach; ?>
1562
 
@@ -1698,7 +1765,7 @@ class WP_PollDaddy {
1698
  <input class="button-secondary action" type="submit" name="doaction" value="<?php _e( 'Apply' ); ?>" />
1699
  <?php wp_nonce_field( 'action-style_bulk' ); ?>
1700
  </div>
1701
- <div class="tablenav-pages"><?php echo $page_links; ?></div>
1702
  </div>
1703
  <br class="clear" />
1704
  <table class="widefat">
@@ -1754,7 +1821,7 @@ class WP_PollDaddy {
1754
  </table>
1755
  </form>
1756
  <div class="tablenav">
1757
- <div class="tablenav-pages"><?php echo $page_links; ?></div>
1758
  </div>
1759
  <br class="clear" />
1760
 
5
  Description: Create and manage PollDaddy polls in WordPress
6
  Author: Automattic, Inc.
7
  Author URL: http://automattic.com/
8
+ Version: 1.7.4
9
  */
10
 
11
  // You can hardcode your PollDaddy PartnerGUID (API Key) here
15
  define( 'WP_POLLDADDY__CLASS', 'WP_PollDaddy' );
16
 
17
  if ( !defined( 'WP_POLLDADDY__POLLDADDY_CLIENT_PATH' ) )
18
+ define( 'WP_POLLDADDY__POLLDADDY_CLIENT_PATH', dirname( __FILE__ ) . '/polldaddy-client.php' );
19
 
20
  // TODO: when user changes PollDaddy password, userCode changes
21
  class WP_PollDaddy {
24
  var $base_url = false;
25
  var $use_ssl = 0;
26
  var $scheme = 'https';
27
+ var $version = '1.7.4';
28
 
29
  var $polldaddy_clients = array();
30
 
961
  }
962
 
963
  function polls_table( $view = 'blog' ) {
964
+ $page = 1;
965
+ if ( isset( $_GET['paged'] ) )
966
+ $page = absint($_GET['paged']);
967
  $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, WP_POLLDADDY__USERCODE );
968
  $polldaddy->reset();
969
  if ( 'user' == $view )
973
  $this->parse_errors( $polldaddy );
974
  $this->print_errors();
975
  $polls = & $polls_object->poll;
976
+ if( isset( $polls_object->_total ) )
977
+ $total_polls = $polls_object->_total;
978
+ else
979
+ $total_polls = count( $polls );
980
  $class = '';
981
 
982
  $page_links = paginate_links( array(
1343
  $standard_style_ID = $style_ID;
1344
  $custom_style_ID = 0;
1345
  }
1346
+
1347
+ $options = array(
1348
+ 101 => 'Aluminum Narrow',
1349
+ 102 => 'Aluminum Medium',
1350
+ 103 => 'Aluminum Wide',
1351
+ 104 => 'Plain White Narrow',
1352
+ 105 => 'Plain White Medium',
1353
+ 106 => 'Plain White Wide',
1354
+ 107 => 'Plain Black Narrow',
1355
+ 108 => 'Plain Black Medium',
1356
+ 109 => 'Plain Black Wide',
1357
+ 110 => 'Paper Narrow',
1358
+ 111 => 'Paper Medium',
1359
+ 112 => 'Paper Wide',
1360
+ 113 => 'Skull Dark Narrow',
1361
+ 114 => 'Skull Dark Medium',
1362
+ 115 => 'Skull Dark Wide',
1363
+ 116 => 'Skull Light Narrow',
1364
+ 117 => 'Skull Light Medium',
1365
+ 118 => 'Skull Light Wide',
1366
+ 157 => 'Micro',
1367
+ 119 => 'Plastic White Narrow',
1368
+ 120 => 'Plastic White Medium',
1369
+ 121 => 'Plastic White Wide',
1370
+ 122 => 'Plastic Grey Narrow',
1371
+ 123 => 'Plastic Grey Medium',
1372
+ 124 => 'Plastic Grey Wide',
1373
+ 125 => 'Plastic Black Narrow',
1374
+ 126 => 'Plastic Black Medium',
1375
+ 127 => 'Plastic Black Wide',
1376
+ 128 => 'Manga Narrow',
1377
+ 129 => 'Manga Medium',
1378
+ 130 => 'Manga Wide',
1379
+ 131 => 'Tech Dark Narrow',
1380
+ 132 => 'Tech Dark Medium',
1381
+ 133 => 'Tech Dark Wide',
1382
+ 134 => 'Tech Grey Narrow',
1383
+ 135 => 'Tech Grey Medium',
1384
+ 136 => 'Tech Grey Wide',
1385
+ 137 => 'Tech Light Narrow',
1386
+ 138 => 'Tech Light Medium',
1387
+ 139 => 'Tech Light Wide',
1388
+ 140 => 'Working Male Narrow',
1389
+ 141 => 'Working Male Medium',
1390
+ 142 => 'Working Male Wide',
1391
+ 143 => 'Working Female Narrow',
1392
+ 144 => 'Working Female Medium',
1393
+ 145 => 'Working Female Wide',
1394
+ 146 => 'Thinking Male Narrow',
1395
+ 147 => 'Thinking Male Medium',
1396
+ 148 => 'Thinking Male Wide',
1397
+ 149 => 'Thinking Female Narrow',
1398
+ 150 => 'Thinking Female Medium',
1399
+ 151 => 'Thinking Female Wide',
1400
+ 152 => 'Sunset Narrow',
1401
+ 153 => 'Sunset Medium',
1402
+ 154 => 'Sunset Wide',
1403
+ 155 => 'Music Medium',
1404
+ 156 => 'Music Wide'
1405
+ );
1406
+
1407
+ foreach( $styles->style as $style ){
1408
+ $options[ (int) $style->_id ] = $style->title;
1409
+ }
1410
  ?>
1411
 
1412
  <h3><?php _e( 'Design' ); ?></h3>
1469
  </table>
1470
  </div>
1471
 
1472
+ <p class="empty-if-js" id="no-js-styleID">
1473
+ <select id="styleID" name="styleID">
1474
 
1475
  <?php foreach ( $options as $styleID => $label ) :
1476
+ $selected = $styleID == $style_ID ? ' selected="selected"' : ''; ?>
1477
  <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
1478
  <?php endforeach; ?>
1479
 
1600
  <select id="customSelect" name="customSelect" onclick="pd_change_style(this.value);" <?php echo $hide ?>>
1601
  <?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
1602
  <option value="x"<?php echo $selected; ?>>Please choose a custom style...</option>
1603
+ <?php if( $show_custom) : foreach ( $styles->style as $style ) :
1604
  $selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
1605
  <option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
1606
+ <?php endforeach; endif;?>
1607
  </select>
1608
  <div id="styleIDErr" class="formErr" style="display:none;">Please choose a style.</div></td>
1609
  </tr>
1619
  </tbody>
1620
  </table>
1621
  </div>
1622
+ <p class="empty-if-js" id="no-js-styleID">
1623
+ <select id="styleID" name="styleID">
1624
 
1625
  <?php foreach ( $options as $styleID => $label ) :
1626
+ $selected = $styleID == $style_ID ? ' selected="selected"' : ''; ?>
1627
  <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
1628
  <?php endforeach; ?>
1629
 
1765
  <input class="button-secondary action" type="submit" name="doaction" value="<?php _e( 'Apply' ); ?>" />
1766
  <?php wp_nonce_field( 'action-style_bulk' ); ?>
1767
  </div>
1768
+ <div class="tablenav-pages"></div>
1769
  </div>
1770
  <br class="clear" />
1771
  <table class="widefat">
1821
  </table>
1822
  </form>
1823
  <div class="tablenav">
1824
+ <div class="tablenav-pages"></div>
1825
  </div>
1826
  <br class="clear" />
1827
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === PollDaddy Polls ===
2
- Contributors: mdawaffe, eoigal
3
  Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys
4
  Requires at least: 2.6
5
- Tested up to: 2.8.4
6
- Stable tag: 1.7.3
7
 
8
  Create and manage PollDaddy polls from within WordPress.
9
 
@@ -32,6 +32,11 @@ Yes. You'll be able to edit the polls they create from your blog. (You won't be
32
  Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
33
 
34
  == Change Log ==
 
 
 
 
 
35
  = 1.7.3 =
36
  * Added poll option to allow you to set limit on number of answers for multiple choice polls.
37
 
1
  === PollDaddy Polls ===
2
+ Contributors: mdawaffe, eoigal, automattic
3
  Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys
4
  Requires at least: 2.6
5
+ Tested up to: 2.8.5
6
+ Stable tag: 1.7.4
7
 
8
  Create and manage PollDaddy polls from within WordPress.
9
 
32
  Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
33
 
34
  == Change Log ==
35
+ = 1.7.4 =
36
+ * Bug Fix: Added fix for missing styles array (used when javascript is disabled)
37
+ * Bug Fix: Added fix for Internet Explorer 8 and jQuery fadeIn, fadeOut methods
38
+ * Bug Fix: Fixed php warnings
39
+
40
  = 1.7.3 =
41
  * Added poll option to allow you to set limit on number of answers for multiple choice polls.
42