Comments – wpDiscuz - Version 3.2.5

Version Description

  • Fixed Bug: ERROR: Invalid field entry
  • Fixed Bug: ERROR: Some fields are missing
  • Fixed Bug: Message: Please fill out required fields

IMPORTANT:

  • This update is only for wpDiscuz users who have these errors
  • This release does not require CDN Purging, you only need to delete page cache after update.
Download this release

Release Info

Developer AdvancedCoding
Plugin Icon 128x128 Comments – wpDiscuz
Version 3.2.5
Comparing to
See all releases

Code changes from version 3.2.4 to 3.2.5

class.WpdiscuzCore.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: wpDiscuz - Supercharged native comments
5
  * Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
- * Version: 3.2.4
7
  * Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  * Author URI: http://gvectors.com/
9
  * Plugin URI: http://wpdiscuz.com/
@@ -133,7 +133,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
133
  $loadLastCommentId = isset($_POST['loadLastCommentId']) ? intval($_POST['loadLastCommentId']) : 0;
134
  $visibleCommentIds = isset($_POST['visibleCommentIds']) ? trim($_POST['visibleCommentIds'], ',') : '';
135
  $sentEmail = isset($_POST['email']) ? trim($_POST['email']) : '';
136
- $email = $currentUser ? $currentUser->user_email : $sentEmail;
137
  if ($visibleCommentIds && $postId && $loadLastCommentId && $email) {
138
  $lastCommentId = $this->dbManager->getLastCommentId($postId);
139
  if ($lastCommentId > $loadLastCommentId) {
@@ -215,9 +215,8 @@ class WpdiscuzCore implements WpDiscuzConstants {
215
  $messageArray = array();
216
  $isAnonymous = false;
217
  $uniqueId = isset($_POST['wpdiscuz_unique_id']) ? trim($_POST['wpdiscuz_unique_id']) : '';
218
- $postId = isset($_POST['postId']) ? intval($_POST['postId']) : '';
219
- $formNonce = isset($_POST['wpdiscuz_comment_form_nonce']) ? trim($_POST['wpdiscuz_comment_form_nonce']) : '';
220
- if ($uniqueId && $postId && wp_verify_nonce($formNonce, self::ACTION_FORM_NONCE)) {
221
  do_action('wpdiscuz_add_comment');
222
  if (function_exists('zerospam_get_key') && isset($_POST['wpdiscuz_zs']) && ($wpdiscuzZS = $_POST['wpdiscuz_zs'])) {
223
  $_POST['zerospam_key'] = $wpdiscuzZS == md5(zerospam_get_key()) ? zerospam_get_key() : '';
@@ -233,7 +232,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
233
  $isInSameContainer = '0';
234
  }
235
  $notificationType = isset($_POST['wpdiscuz_notification_type']) ? $_POST['wpdiscuz_notification_type'] : '';
236
- if ($this->helper->isShowCaptcha($current_user->ID) && !class_exists("wpDiscuzReCaptcha")) {
237
  $captcha = isset($_POST['wc_captcha']) ? trim($_POST['wc_captcha']) : '';
238
  if ($this->optionsSerialized->isCaptchaInSession) {
239
  if (!session_id()) {
@@ -256,7 +255,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
256
  }
257
 
258
  $website_url = '';
259
- if ($current_user) {
260
  $user = $current_user;
261
  $user_id = $current_user->ID;
262
  $name = $current_user->display_name;
@@ -377,7 +376,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
377
  $current_user = wp_get_current_user();
378
  $isInRange = $this->helper->isContentInRange($comment->comment_content);
379
  $isEditable = $this->optionsSerialized->commentEditableTime == 'unlimit' ? true && $isInRange : $this->helper->isCommentEditable($comment) && $isInRange;
380
- if (isset($current_user) && $comment->user_id == $current_user->ID && $isEditable) {
381
  $messageArray['code'] = 1;
382
  $messageArray['message'] = $comment->comment_content;
383
  } else {
@@ -401,7 +400,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
401
  if ($commentId && $trimmedContent) {
402
  $comment = get_comment($commentId);
403
  $current_user = wp_get_current_user();
404
- $isCurrentUserCanEdit = isset($current_user) && ($comment->user_id == $current_user->ID || current_user_can('edit_comment', $comment->comment_ID));
405
  if ($this->helper->isContentInRange($trimmedContent) && $isCurrentUserCanEdit) {
406
  if ($trimmedContent != $comment->comment_content) {
407
  $commentContent = wp_kses(stripslashes($trimmedContent), $this->helper->wc_allowed_tags);
3
  /*
4
  * Plugin Name: wpDiscuz - Supercharged native comments
5
  * Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
+ * Version: 3.2.5
7
  * Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  * Author URI: http://gvectors.com/
9
  * Plugin URI: http://wpdiscuz.com/
133
  $loadLastCommentId = isset($_POST['loadLastCommentId']) ? intval($_POST['loadLastCommentId']) : 0;
134
  $visibleCommentIds = isset($_POST['visibleCommentIds']) ? trim($_POST['visibleCommentIds'], ',') : '';
135
  $sentEmail = isset($_POST['email']) ? trim($_POST['email']) : '';
136
+ $email = $currentUser && $currentUser->ID ? $currentUser->user_email : $sentEmail;
137
  if ($visibleCommentIds && $postId && $loadLastCommentId && $email) {
138
  $lastCommentId = $this->dbManager->getLastCommentId($postId);
139
  if ($lastCommentId > $loadLastCommentId) {
215
  $messageArray = array();
216
  $isAnonymous = false;
217
  $uniqueId = isset($_POST['wpdiscuz_unique_id']) ? trim($_POST['wpdiscuz_unique_id']) : '';
218
+ $postId = isset($_POST['postId']) ? intval($_POST['postId']) : '';
219
+ if ($uniqueId && $postId) {
 
220
  do_action('wpdiscuz_add_comment');
221
  if (function_exists('zerospam_get_key') && isset($_POST['wpdiscuz_zs']) && ($wpdiscuzZS = $_POST['wpdiscuz_zs'])) {
222
  $_POST['zerospam_key'] = $wpdiscuzZS == md5(zerospam_get_key()) ? zerospam_get_key() : '';
232
  $isInSameContainer = '0';
233
  }
234
  $notificationType = isset($_POST['wpdiscuz_notification_type']) ? $_POST['wpdiscuz_notification_type'] : '';
235
+ if ($current_user && $this->helper->isShowCaptcha($current_user->ID) && !class_exists("wpDiscuzReCaptcha")) {
236
  $captcha = isset($_POST['wc_captcha']) ? trim($_POST['wc_captcha']) : '';
237
  if ($this->optionsSerialized->isCaptchaInSession) {
238
  if (!session_id()) {
255
  }
256
 
257
  $website_url = '';
258
+ if ($current_user && $current_user->ID) {
259
  $user = $current_user;
260
  $user_id = $current_user->ID;
261
  $name = $current_user->display_name;
376
  $current_user = wp_get_current_user();
377
  $isInRange = $this->helper->isContentInRange($comment->comment_content);
378
  $isEditable = $this->optionsSerialized->commentEditableTime == 'unlimit' ? true && $isInRange : $this->helper->isCommentEditable($comment) && $isInRange;
379
+ if ($current_user && $comment->user_id == $current_user->ID && $isEditable) {
380
  $messageArray['code'] = 1;
381
  $messageArray['message'] = $comment->comment_content;
382
  } else {
400
  if ($commentId && $trimmedContent) {
401
  $comment = get_comment($commentId);
402
  $current_user = wp_get_current_user();
403
+ $isCurrentUserCanEdit = $current_user && ($comment->user_id == $current_user->ID || current_user_can('edit_comment', $comment->comment_ID));
404
  if ($this->helper->isContentInRange($trimmedContent) && $isCurrentUserCanEdit) {
405
  if ($trimmedContent != $comment->comment_content) {
406
  $commentContent = wp_kses(stripslashes($trimmedContent), $this->helper->wc_allowed_tags);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: wordpress comments, ajax comments, ajax, live update, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
5
  Requires at least: 3.8.0
6
  Tested up to: 4.4.1
7
- Stable tag: 3.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -126,15 +126,21 @@ Support Forum: http://gvectors.com/forum/
126
 
127
  == Changelog ==
128
 
129
- = 3.2.4 =
130
 
131
- * Fixed Bug: Guest comment form warning message - Cannot modify header information - headers already sent...
 
 
132
 
133
  IMPORTANT:
134
 
135
- - This update is only for wpDiscuz users who have this error on guest comment form above CAPTCHA
136
  - This release does not require CDN Purging, you only need to delete page cache after update.
137
 
 
 
 
 
138
  = 3.2.3 =
139
 
140
  * Fixed Bug: Unable to post a comment as guest on some servers
4
  Tags: wordpress comments, ajax comments, ajax, live update, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
5
  Requires at least: 3.8.0
6
  Tested up to: 4.4.1
7
+ Stable tag: 3.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
126
 
127
  == Changelog ==
128
 
129
+ = 3.2.5 =
130
 
131
+ * Fixed Bug: ERROR: Invalid field entry
132
+ * Fixed Bug: ERROR: Some fields are missing
133
+ * Fixed Bug: Message: Please fill out required fields
134
 
135
  IMPORTANT:
136
 
137
+ - This update is only for wpDiscuz users who have these errors
138
  - This release does not require CDN Purging, you only need to delete page cache after update.
139
 
140
+ = 3.2.4 =
141
+
142
+ * Fixed Bug: Guest comment form warning message - Cannot modify header information - headers already sent...
143
+
144
  = 3.2.3 =
145
 
146
  * Fixed Bug: Unable to post a comment as guest on some servers
templates/comment/class.WpdiscuzWalker.php CHANGED
@@ -35,6 +35,7 @@ class WpdiscuzWalker extends Walker_Comment {
35
  $commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
36
  $commentContent = $this->helper->makeClickable($commentContent);
37
  $commentContent = apply_filters('comment_text', $commentContent, $comment, $args);
 
38
  $commentContent .= $comment->comment_approved == 0 ? '<p class="wc_held_for_moderate">' . $this->optionsSerialized->phrases['wc_held_for_moderate'] . '</p>' : '';
39
 
40
  $hideAvatarStyle = $this->optionsSerialized->wordpressShowAvatars ? '' : 'style = "margin-left : 0;"';
35
  $commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
36
  $commentContent = $this->helper->makeClickable($commentContent);
37
  $commentContent = apply_filters('comment_text', $commentContent, $comment, $args);
38
+ $commentContent = apply_filters('wpdiscuz_after_comment_text', $commentContent, $comment);
39
  $commentContent .= $comment->comment_approved == 0 ? '<p class="wc_held_for_moderate">' . $this->optionsSerialized->phrases['wc_held_for_moderate'] . '</p>' : '';
40
 
41
  $hideAvatarStyle = $this->optionsSerialized->wordpressShowAvatars ? '' : 'style = "margin-left : 0;"';
templates/comment/comment-form.php CHANGED
@@ -15,7 +15,7 @@ if (!post_password_required($post->ID)) {
15
  $wc_is_name_field_required = ($wpdiscuz->optionsSerialized->isNameFieldRequired) ? 'required="required"' : '';
16
  $wc_is_email_field_required = ($wpdiscuz->optionsSerialized->isEmailFieldRequired) ? 'required="required"' : '';
17
 
18
- $wpCommClasses = $current_user->ID ? 'wpdiscuz_auth' : 'wpdiscuz_unauth';
19
  $wpCommClasses .= $wpdiscuz->optionsSerialized->wordpressShowAvatars ? '' : ' wpdiscuz_no_avatar';
20
 
21
  $ob_stat = ini_get('output_buffering');
@@ -55,7 +55,7 @@ if (!post_password_required($post->ID)) {
55
  } elseif (!$_GET['subscriptionSuccess']) {
56
  $subscriptionMsg = __('Subscription not successed', 'wpdiscuz');
57
  } else {
58
- if ($current_user->ID && $wpdiscuz->optionsSerialized->disableMemberConfirm) {
59
  $subscriptionMsg = $wpdiscuz->optionsSerialized->phrases['wc_subscribe_message'];
60
  } else {
61
  $subscriptionMsg = $wpdiscuz->optionsSerialized->phrases['wc_confirm_email'];
@@ -78,7 +78,7 @@ if (!post_password_required($post->ID)) {
78
  <h3 id="wc-comment-header"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_leave_a_reply_text']; ?></h3>
79
  <?php
80
  if ($wpdiscuz->optionsSerialized->showHideLoggedInUsername) {
81
- if ($current_user->ID) {
82
  $user_url = get_author_posts_url($current_user->ID);
83
  ?>
84
  <div id="wc_show_hide_loggedin_username">
15
  $wc_is_name_field_required = ($wpdiscuz->optionsSerialized->isNameFieldRequired) ? 'required="required"' : '';
16
  $wc_is_email_field_required = ($wpdiscuz->optionsSerialized->isEmailFieldRequired) ? 'required="required"' : '';
17
 
18
+ $wpCommClasses = $current_user && $current_user->ID ? 'wpdiscuz_auth' : 'wpdiscuz_unauth';
19
  $wpCommClasses .= $wpdiscuz->optionsSerialized->wordpressShowAvatars ? '' : ' wpdiscuz_no_avatar';
20
 
21
  $ob_stat = ini_get('output_buffering');
55
  } elseif (!$_GET['subscriptionSuccess']) {
56
  $subscriptionMsg = __('Subscription not successed', 'wpdiscuz');
57
  } else {
58
+ if ($current_user && $current_user->ID && $wpdiscuz->optionsSerialized->disableMemberConfirm) {
59
  $subscriptionMsg = $wpdiscuz->optionsSerialized->phrases['wc_subscribe_message'];
60
  } else {
61
  $subscriptionMsg = $wpdiscuz->optionsSerialized->phrases['wc_confirm_email'];
78
  <h3 id="wc-comment-header"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_leave_a_reply_text']; ?></h3>
79
  <?php
80
  if ($wpdiscuz->optionsSerialized->showHideLoggedInUsername) {
81
+ if ($current_user && $current_user->ID) {
82
  $user_url = get_author_posts_url($current_user->ID);
83
  ?>
84
  <div id="wc_show_hide_loggedin_username">
utils/class.WpdiscuzEmailHelper.php CHANGED
@@ -17,7 +17,7 @@ class WpdiscuzEmailHelper {
17
  $httpReferer = filter_input(INPUT_POST, '_wp_http_referer');
18
  $subscriptionType = filter_input(INPUT_POST, 'wpdiscuzSubscriptionType');
19
  $postId = filter_input(INPUT_POST, 'wpdiscuzSubscriptionPostId');
20
- if ($current_user->ID) {
21
  $email = $current_user->user_email;
22
  } else {
23
  $email = filter_input(INPUT_POST, 'wpdiscuzSubscriptionEmail');
@@ -101,7 +101,7 @@ class WpdiscuzEmailHelper {
101
  $email = isset($_POST['email']) ? trim($_POST['email']) : '';
102
  $isParent = isset($_POST['isParent']) ? intval($_POST['isParent']) : '';
103
  $current_user = wp_get_current_user();
104
- if ($current_user->user_email) {
105
  $email = $current_user->user_email;
106
  }
107
  if ($comment_id && $email && $postId) {
17
  $httpReferer = filter_input(INPUT_POST, '_wp_http_referer');
18
  $subscriptionType = filter_input(INPUT_POST, 'wpdiscuzSubscriptionType');
19
  $postId = filter_input(INPUT_POST, 'wpdiscuzSubscriptionPostId');
20
+ if ($current_user && $current_user->ID) {
21
  $email = $current_user->user_email;
22
  } else {
23
  $email = filter_input(INPUT_POST, 'wpdiscuzSubscriptionEmail');
101
  $email = isset($_POST['email']) ? trim($_POST['email']) : '';
102
  $isParent = isset($_POST['isParent']) ? intval($_POST['isParent']) : '';
103
  $current_user = wp_get_current_user();
104
+ if ($current_user && $current_user->user_email) {
105
  $email = $current_user->user_email;
106
  }
107
  if ($comment_id && $email && $postId) {
utils/class.WpdiscuzHelper.php CHANGED
@@ -376,7 +376,6 @@ class WpdiscuzHelper {
376
  <div class="clearfix"></div>
377
  </div>
378
  <div class="clearfix"></div>
379
- <?php wp_nonce_field(WpDiscuzConstants::ACTION_FORM_NONCE, 'wpdiscuz_comment_form_nonce'); ?>
380
  <input type="hidden" class="wpdiscuz_unique_id" value="<?php echo $uniqueId; ?>" name="wpdiscuz_unique_id">
381
  </form>
382
  <?php } else { ?>
376
  <div class="clearfix"></div>
377
  </div>
378
  <div class="clearfix"></div>
 
379
  <input type="hidden" class="wpdiscuz_unique_id" value="<?php echo $uniqueId; ?>" name="wpdiscuz_unique_id">
380
  </form>
381
  <?php } else { ?>