Comments – wpDiscuz - Version 2.1.7

Version Description

  • Fixed Bug: Ultimate Member Integration problem on WEB Servers w/o DomObject support (SyntaxError: Unexpected token ... )

IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.

Download this release

Release Info

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

Code changes from version 2.1.6 to 2.1.7

Files changed (4) hide show
  1. comment-form/tpl-comment.php +8 -8
  2. files/js/wc-ajax.js +8 -4
  3. readme.txt +8 -3
  4. wc.php +1 -1
comment-form/tpl-comment.php CHANGED
@@ -210,10 +210,10 @@ class WC_Comment_Template_Builder {
210
  $output_form .= '<div style="clear:both"></div>';
211
 
212
  if ($this->wc_options_serialized->wc_show_hide_comment_checkbox || $this->wc_options_serialized->wc_show_hide_reply_checkbox || $this->wc_options_serialized->wc_show_hide_all_reply_checkbox) {
213
- $output_form .= '<span class="wc_manage_subscribtions" '.((class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) ? 'style="display:none"' : '').'>' . $this->wc_options_serialized->wc_phrases['wc_manage_subscribtions'] . ' &or;</span>';
214
  }
215
 
216
- $output_form .= '<div class="wc_notification_checkboxes" '.((class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) ? 'style="display:block"' : '').'>';
217
 
218
 
219
  $wc_is_user_subscription_confirmed = $this->wc_db_helper->wc_is_user_subscription_confirmed($comment->comment_post_ID, $current_user->user_email);
@@ -329,8 +329,7 @@ class WC_Comment_Template_Builder {
329
  if ($user) {
330
  if (class_exists('BuddyPress')) {
331
  $wc_profile_url = bp_core_get_user_domain($user->ID);
332
- } else
333
- if (class_exists('XooUserUltra')) {
334
  global $xoouserultra;
335
  $wc_profile_url = $xoouserultra->userpanel->get_user_profile_permalink($user->ID);
336
  } else if (class_exists('userpro_api')) {
@@ -338,10 +337,11 @@ class WC_Comment_Template_Builder {
338
  $wc_profile_url = $userpro->permalink($user->ID);
339
  } else if (class_exists('UM_API')) {
340
  $wc_profile_url = apply_filters('get_comment_author_link', $wc_profile_url);
341
- $dom = new DOMDocument;
342
- $dom->loadHTML($wc_profile_url);
343
- $node = $dom->getElementsByTagName('a')->item(0);
344
- $wc_profile_url = $node->getAttribute( 'href' );
 
345
  } else {
346
  if (count_user_posts($user->ID)) {
347
  $wc_profile_url = get_author_posts_url($user->ID);
210
  $output_form .= '<div style="clear:both"></div>';
211
 
212
  if ($this->wc_options_serialized->wc_show_hide_comment_checkbox || $this->wc_options_serialized->wc_show_hide_reply_checkbox || $this->wc_options_serialized->wc_show_hide_all_reply_checkbox) {
213
+ $output_form .= '<span class="wc_manage_subscribtions" ' . ((class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) ? 'style="display:none"' : '') . '>' . $this->wc_options_serialized->wc_phrases['wc_manage_subscribtions'] . ' &or;</span>';
214
  }
215
 
216
+ $output_form .= '<div class="wc_notification_checkboxes" ' . ((class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) ? 'style="display:block"' : '') . '>';
217
 
218
 
219
  $wc_is_user_subscription_confirmed = $this->wc_db_helper->wc_is_user_subscription_confirmed($comment->comment_post_ID, $current_user->user_email);
329
  if ($user) {
330
  if (class_exists('BuddyPress')) {
331
  $wc_profile_url = bp_core_get_user_domain($user->ID);
332
+ } else if (class_exists('XooUserUltra')) {
 
333
  global $xoouserultra;
334
  $wc_profile_url = $xoouserultra->userpanel->get_user_profile_permalink($user->ID);
335
  } else if (class_exists('userpro_api')) {
337
  $wc_profile_url = $userpro->permalink($user->ID);
338
  } else if (class_exists('UM_API')) {
339
  $wc_profile_url = apply_filters('get_comment_author_link', $wc_profile_url);
340
+ if (preg_match('|<a[^\<\>]*href=[\'\"]+([^\"\']+)[\'\"]+[^\<\>]*>|is', $wc_profile_url, $wc_profile_arr)) {
341
+ $wc_profile_url = $wc_profile_arr[1];
342
+ } else {
343
+ $wc_profile_url = '';
344
+ }
345
  } else {
346
  if (count_user_posts($user->ID)) {
347
  $wc_profile_url = get_author_posts_url($user->ID);
files/js/wc-ajax.js CHANGED
@@ -199,7 +199,11 @@ jQuery(document).ready(function ($) {
199
  $('#wc_openModalFormAction').css('opacity', '1');
200
  $('#wc_openModalFormAction').css('pointer-events', 'auto');
201
  $('#wc_openModalFormAction .close').css('display', 'block');
202
- $('#wc_openModalFormAction > #wc_response_info').html(html + e);
 
 
 
 
203
  }
204
  });
205
  }
@@ -554,7 +558,7 @@ jQuery(document).ready(function ($) {
554
  }
555
  setInputsDataFromCookie();
556
  } catch (e) {
557
- alert(e);
558
  }
559
  }
560
 
@@ -646,7 +650,7 @@ jQuery(document).ready(function ($) {
646
  $('#wc_openModalFormAction > #wc_response_info').html(html + obj.phrase_message);
647
  }
648
  } catch (e) {
649
-
650
  }
651
  });
652
  });
@@ -694,7 +698,7 @@ jQuery(document).ready(function ($) {
694
  editableTextarea = '';
695
  commentContent = '';
696
  } catch (e) {
697
-
698
  }
699
  });
700
  }
199
  $('#wc_openModalFormAction').css('opacity', '1');
200
  $('#wc_openModalFormAction').css('pointer-events', 'auto');
201
  $('#wc_openModalFormAction .close').css('display', 'block');
202
+ if (response.contains('<') && response.contains('>')) {
203
+ $('#wc_openModalFormAction > #wc_response_info').html(html + e);
204
+ }else{
205
+ $('#wc_openModalFormAction > #wc_response_info').html(html + response);
206
+ }
207
  }
208
  });
209
  }
558
  }
559
  setInputsDataFromCookie();
560
  } catch (e) {
561
+ console.log(e);
562
  }
563
  }
564
 
650
  $('#wc_openModalFormAction > #wc_response_info').html(html + obj.phrase_message);
651
  }
652
  } catch (e) {
653
+ console.log(e);
654
  }
655
  });
656
  });
698
  editableTextarea = '';
699
  commentContent = '';
700
  } catch (e) {
701
+ console.log(e);
702
  }
703
  });
704
  }
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, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system
5
  Requires at least: 2.7
6
  Tested up to: 4.1.1
7
- Stable tag: 2.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -126,13 +126,18 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
129
  = 2.1.6 =
130
  * Added : Integration with Ultimate Member - author profile picture
131
  * Added : Integration with Ultimate Member - author name is linked to profile page
132
  * Fixed Bug: CSS overrides some default styles on /wp-admin/
133
 
134
- IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
135
-
136
  = 2.1.5 =
137
  * Fixed Bug: Problems with email notifications
138
  * Fixed Bug: Empty name of anonymouse comments
4
  Tags: wordpress comments, ajax comments, ajax, live update, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system
5
  Requires at least: 2.7
6
  Tested up to: 4.1.1
7
+ Stable tag: 2.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
126
 
127
  == Changelog ==
128
 
129
+ = 2.1.7 =
130
+ * Fixed Bug: Ultimate Member Integration problem on WEB Servers w/o DomObject support
131
+ (SyntaxError: Unexpected token ... )
132
+
133
+ IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
134
+
135
+
136
  = 2.1.6 =
137
  * Added : Integration with Ultimate Member - author profile picture
138
  * Added : Integration with Ultimate Member - author name is linked to profile page
139
  * Fixed Bug: CSS overrides some default styles on /wp-admin/
140
 
 
 
141
  = 2.1.5 =
142
  * Fixed Bug: Problems with email notifications
143
  * Fixed Bug: Empty name of anonymouse comments
wc.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: wpDiscuz - Wordpress Comments
5
  Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
- Version: 2.1.6
7
  Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  Author URI: http://www.gvectors.com/
9
  Plugin URI: http://www.gvectors.com/wpdiscuz/
3
  /*
4
  Plugin Name: wpDiscuz - Wordpress Comments
5
  Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
+ Version: 2.1.7
7
  Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  Author URI: http://www.gvectors.com/
9
  Plugin URI: http://www.gvectors.com/wpdiscuz/