Disqus Comment System - Version 2.71

Version Description

Download this release

Release Info

Developer Disqus
Plugin Icon Disqus Comment System
Version 2.71
Comparing to
See all releases

Code changes from version 2.70 to 2.71

Files changed (4) hide show
  1. comments.php +8 -1
  2. disqus.php +5 -7
  3. manage.php +7 -7
  4. readme.txt +10 -2
comments.php CHANGED
@@ -121,7 +121,14 @@ if (DISQUS_DEBUG) {
121
  (function() {
122
  var dsq = document.createElement('script'); dsq.type = 'text/javascript';
123
  dsq.async = true;
124
- dsq.src = 'http://' + disqus_shortname + '.' + disqus_domain + '/embed.js?pname=wordpress&pver=<?php echo DISQUS_VERSION; ?>';
 
 
 
 
 
 
 
125
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
126
  })();
127
  /* ]]> */
121
  (function() {
122
  var dsq = document.createElement('script'); dsq.type = 'text/javascript';
123
  dsq.async = true;
124
+ <?php
125
+ if (is_ssl()) {
126
+ $connection_type = "https";
127
+ } else {
128
+ $connection_type = "http";
129
+ }
130
+ ?>
131
+ dsq.src = '<?php echo $connection_type; ?>' + '://' + disqus_shortname + '.' + disqus_domain + '/embed.js?pname=wordpress&pver=<?php echo DISQUS_VERSION; ?>';
132
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
133
  })();
134
  /* ]]> */
disqus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Disqus Comment System
4
  Plugin URI: http://disqus.com/
5
  Description: The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus. Head over to the Comments admin page to set up your DISQUS Comment System.
6
  Author: Disqus <team@disqus.com>
7
- Version: 2.70
8
  Author URI: http://disqus.com/
9
  */
10
 
@@ -31,7 +31,7 @@ define('DISQUS_CAN_EXPORT', is_file(dirname(__FILE__) . '/export.php'));
31
  if (!defined('DISQUS_DEBUG')) {
32
  define('DISQUS_DEBUG', false);
33
  }
34
- define('DISQUS_VERSION', '2.70');
35
  define('DISQUS_SYNC_TIMEOUT', 30);
36
 
37
  /**
@@ -305,7 +305,7 @@ function dsq_sync_comments($comments) {
305
  $commentdata['comment_author_url'] = $comment->anonymous_author->url;
306
  $commentdata['comment_author_IP'] = $comment->ip_address;
307
  } else {
308
- if (isset($comment->author->display_name)) {
309
  $commentdata['comment_author'] = $comment->author->display_name;
310
  } else {
311
  $commentdata['comment_author'] = $comment->author->username;
@@ -1164,7 +1164,6 @@ function dsq_output_loop_comment_js($post_ids = null) {
1164
  <script type="text/javascript">
1165
  // <![CDATA[
1166
  var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
1167
- var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
1168
  (function () {
1169
  var nodes = document.getElementsByTagName('span');
1170
  for (var i = 0, url; i < nodes.length; i++) {
@@ -1178,7 +1177,7 @@ function dsq_output_loop_comment_js($post_ids = null) {
1178
  }
1179
  var s = document.createElement('script'); s.async = true;
1180
  s.type = 'text/javascript';
1181
- s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
1182
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
1183
  }());
1184
  //]]>
@@ -1194,7 +1193,6 @@ function dsq_output_footer_comment_js() {
1194
  <script type="text/javascript">
1195
  // <![CDATA[
1196
  var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
1197
- var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
1198
  (function () {
1199
  var nodes = document.getElementsByTagName('span');
1200
  for (var i = 0, url; i < nodes.length; i++) {
@@ -1208,7 +1206,7 @@ function dsq_output_footer_comment_js() {
1208
  }
1209
  var s = document.createElement('script'); s.async = true;
1210
  s.type = 'text/javascript';
1211
- s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
1212
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
1213
  }());
1214
  //]]>
4
  Plugin URI: http://disqus.com/
5
  Description: The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus. Head over to the Comments admin page to set up your DISQUS Comment System.
6
  Author: Disqus <team@disqus.com>
7
+ Version: 2.71
8
  Author URI: http://disqus.com/
9
  */
10
 
31
  if (!defined('DISQUS_DEBUG')) {
32
  define('DISQUS_DEBUG', false);
33
  }
34
+ define('DISQUS_VERSION', '2.71');
35
  define('DISQUS_SYNC_TIMEOUT', 30);
36
 
37
  /**
305
  $commentdata['comment_author_url'] = $comment->anonymous_author->url;
306
  $commentdata['comment_author_IP'] = $comment->ip_address;
307
  } else {
308
+ if (!empty($comment->author->display_name)) {
309
  $commentdata['comment_author'] = $comment->author->display_name;
310
  } else {
311
  $commentdata['comment_author'] = $comment->author->username;
1164
  <script type="text/javascript">
1165
  // <![CDATA[
1166
  var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
 
1167
  (function () {
1168
  var nodes = document.getElementsByTagName('span');
1169
  for (var i = 0, url; i < nodes.length; i++) {
1177
  }
1178
  var s = document.createElement('script'); s.async = true;
1179
  s.type = 'text/javascript';
1180
+ s.src = 'http://<?php echo DISQUS_DOMAIN; ?>/forums/' + disqus_shortname + '/count.js';
1181
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
1182
  }());
1183
  //]]>
1193
  <script type="text/javascript">
1194
  // <![CDATA[
1195
  var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
 
1196
  (function () {
1197
  var nodes = document.getElementsByTagName('span');
1198
  for (var i = 0, url; i < nodes.length; i++) {
1206
  }
1207
  var s = document.createElement('script'); s.async = true;
1208
  s.type = 'text/javascript';
1209
+ s.src = 'http://<?php echo DISQUS_DOMAIN; ?>/forums/' + disqus_shortname + '/count.js';
1210
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
1211
  }());
1212
  //]]>
manage.php CHANGED
@@ -94,7 +94,7 @@ if ( 3 == $step && isset($_POST['dsq_forum']) && isset($_POST['dsq_user_api_key'
94
  $api_key = $dsq_api->get_forum_api_key($_POST['dsq_user_api_key'], $dsq_forum_id);
95
  if ( !$api_key || $api_key < 0 ) {
96
  update_option('disqus_replace', 'replace');
97
- dsq_manage_dialog(dsq_i('There was an error completing the installation of Disqus. If you are still having issues, refer to the <a href="http://disqus.com/help/wordpress">WordPress help page</a>.'), true);
98
  } else {
99
  update_option('disqus_api_key', $api_key);
100
  update_option('disqus_user_api_key', $_POST['dsq_user_api_key']);
@@ -123,7 +123,7 @@ if ( 2 == $step && isset($_POST['dsq_username']) && isset($_POST['dsq_password']
123
  dsq_manage_dialog($dsq_api->get_last_error(), true);
124
  } else if ( !$dsq_sites ) {
125
  $step = 1;
126
- dsq_manage_dialog(dsq_i('There aren\'t any sites associated with this account. Maybe you want to <a href="%s">create a site</a>?', 'http://disqus.com/comments/register/'), true);
127
  }
128
  }
129
  }
@@ -196,7 +196,7 @@ case 1:
196
  <th scope="row" valign="top"><?php echo dsq_i('Username'); ?></th>
197
  <td>
198
  <input id="dsq-username" name="dsq_username" tabindex="1" type="text" />
199
- <a href="http://disqus.com/profile/"><?php echo dsq_i('(don\'t have a Disqus Profile yet?)'); ?></a>
200
  </td>
201
  </tr>
202
  <tr>
@@ -226,7 +226,7 @@ case 0:
226
  echo 'http://'.$url.'.'.DISQUS_DOMAIN.'/admin/moderate/';
227
  } else {
228
  echo DISQUS_URL.'admin/moderate/';
229
- } ?>?template=wordpress" style="width: 100%; height: 800px"></iframe>
230
  </div>
231
  <?php } ?>
232
  </div>
@@ -292,7 +292,7 @@ case 0:
292
  <td>
293
  <input type="text" name="disqus_partner_key" value="<?php echo esc_attr($dsq_partner_key); ?>" tabindex="2">
294
  <br />
295
- <?php echo dsq_i('Advanced: Used for single sign-on (SSO) integration. (<a href="%s" onclick="window.open(this.href); return false">more info on SSO</a>)', 'http://disqus.com/help/sso'); ?>
296
  </td>
297
  </tr>
298
  <?php } ?>
@@ -330,7 +330,7 @@ case 0:
330
  <td>
331
  <input type="checkbox" id="disqus_comment_count" name="disqus_cc_fix" <?php if($dsq_cc_fix){echo 'checked="checked"';}?> >
332
  <label for="disqus_comment_count"><?php echo dsq_i('Output JavaScript in footer'); ?></label>
333
- <br /><?php echo dsq_i('NOTE: Check this if you have problems with the comment count displays including: not showing on permalinks, broken featured image carousels, or longer-than-usual homepage load times (<a href="%s" onclick="window.open(this.href); return false">more info</a>).', 'http://disqus.com/help/wordpress'); ?>
334
  </td>
335
  </tr>
336
 
@@ -401,7 +401,7 @@ case 0:
401
  </table>
402
  <br/>
403
  <h3><?php echo dsq_i('Debug Information'); ?></h3>
404
- <p><?php echo dsq_i('Having problems with the plugin? <a href="%s">Drop us a line</a> and include the following details and we\'ll do what we can.', 'mailto:help+wp@disqus.com'); ?></p>
405
  <textarea style="width:90%; height:200px;">URL: <?php echo get_option('siteurl'); ?>
406
  PHP Version: <?php echo phpversion(); ?>
407
  Version: <?php echo $wp_version; ?>
94
  $api_key = $dsq_api->get_forum_api_key($_POST['dsq_user_api_key'], $dsq_forum_id);
95
  if ( !$api_key || $api_key < 0 ) {
96
  update_option('disqus_replace', 'replace');
97
+ dsq_manage_dialog(dsq_i('There was an error completing the installation of Disqus. If you are still having issues, refer to the <a href="http://docs.disqus.com/help/87/">WordPress help page</a>.'), true);
98
  } else {
99
  update_option('disqus_api_key', $api_key);
100
  update_option('disqus_user_api_key', $_POST['dsq_user_api_key']);
123
  dsq_manage_dialog($dsq_api->get_last_error(), true);
124
  } else if ( !$dsq_sites ) {
125
  $step = 1;
126
+ dsq_manage_dialog(dsq_i('There aren\'t any sites associated with this account. Maybe you want to <a href="%s">create a site</a>?', 'http://disqus.com/admin/register/'), true);
127
  }
128
  }
129
  }
196
  <th scope="row" valign="top"><?php echo dsq_i('Username'); ?></th>
197
  <td>
198
  <input id="dsq-username" name="dsq_username" tabindex="1" type="text" />
199
+ <a href="http://disqus.com/profile/signup/"><?php echo dsq_i('(don\'t have a Disqus Profile yet?)'); ?></a>
200
  </td>
201
  </tr>
202
  <tr>
226
  echo 'http://'.$url.'.'.DISQUS_DOMAIN.'/admin/moderate/';
227
  } else {
228
  echo DISQUS_URL.'admin/moderate/';
229
+ } ?>?template=wordpress" style="width: 100%; height: 80%"></iframe>
230
  </div>
231
  <?php } ?>
232
  </div>
292
  <td>
293
  <input type="text" name="disqus_partner_key" value="<?php echo esc_attr($dsq_partner_key); ?>" tabindex="2">
294
  <br />
295
+ <?php echo dsq_i('Advanced: Used for single sign-on (SSO) integration. (<a href="%s" onclick="window.open(this.href); return false">more info on SSO</a>)', 'http://docs.disqus.com/developers/sso/'); ?>
296
  </td>
297
  </tr>
298
  <?php } ?>
330
  <td>
331
  <input type="checkbox" id="disqus_comment_count" name="disqus_cc_fix" <?php if($dsq_cc_fix){echo 'checked="checked"';}?> >
332
  <label for="disqus_comment_count"><?php echo dsq_i('Output JavaScript in footer'); ?></label>
333
+ <br /><?php echo dsq_i('NOTE: Check this if you have problems with the comment count displays including: not showing on permalinks, broken featured image carousels, or longer-than-usual homepage load times (<a href="%s" onclick="window.open(this.href); return false">more info</a>).', 'http://docs.disqus.com/help/87/'); ?>
334
  </td>
335
  </tr>
336
 
401
  </table>
402
  <br/>
403
  <h3><?php echo dsq_i('Debug Information'); ?></h3>
404
+ <p><?php echo dsq_i('Having problems with the plugin? Check out our <a href="%s" onclick="window.open(this.href); return false">WordPress Troubleshooting</a> documentation. You can also <a href="%s">drop us a line</a> including the following details and we\'ll do what we can.', 'http://docs.disqus.com/help/87/', 'mailto:help+wp@disqus.com'); ?></p>
405
  <textarea style="width:90%; height:200px;">URL: <?php echo get_option('siteurl'); ?>
406
  PHP Version: <?php echo phpversion(); ?>
407
  Version: <?php echo $wp_version; ?>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: disqus, alexkingorg, crowdfavorite
3
  Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget, disqus
4
  Requires at least: 2.8
5
- Tested up to: 3.2.1
6
- Stable tag: 2.70
7
 
8
  The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.
9
 
@@ -54,6 +54,14 @@ Go to [http://disqus.com/help/wordpress](http://disqus.com/help/wordpress)
54
 
55
  == Changes ==
56
 
 
 
 
 
 
 
 
 
57
  2.70
58
 
59
  * Properly uninstall disqus_dupecheck index when uninstalling plugin.
2
  Contributors: disqus, alexkingorg, crowdfavorite
3
  Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget, disqus
4
  Requires at least: 2.8
5
+ Tested up to: 3.3.1
6
+ Stable tag: 2.71
7
 
8
  The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.
9
 
54
 
55
  == Changes ==
56
 
57
+ 2.71
58
+
59
+ * Fixed issue where embed wasn't using SSL if page was loaded via HTTPS
60
+ * Fixed issue with syncing where to user's without a display_name would
61
+ revert back to Anonymous (really this time).
62
+ * Fixed issue where Google Webmaster Tools would incorrectly report 404s.
63
+ * Fixed issue with Disqus admin display issues.
64
+
65
  2.70
66
 
67
  * Properly uninstall disqus_dupecheck index when uninstalling plugin.