Comments – wpDiscuz - Version 2.2.9

Version Description

  • Fixed Bug : RTL issues
  • Added : Compatibility with Super Socializer social comments (tabbed comment systems)
  • Added : Option to turn on/off loading of wpDiscuz JS and CSS files on home page

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.2.9
Comparing to
See all releases

Code changes from version 2.2.8 to 2.2.9

comment-form/form.php CHANGED
@@ -7,38 +7,38 @@ $wc_core->wc_options_serialized->init_phrases_on_load();
7
  $wc_comment_list_update_type = $wc_core->wc_options_serialized->wc_comment_list_update_type;
8
  $wc_form_avatar = $wc_core->wc_helper->get_comment_author_avatar();
9
  ?>
10
- <script type="text/javascript">
11
- // initialize the wpdiscuzValidator function
12
- wpdiscuzValidator.message['invalid'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_invalid_field']; ?>';
13
- wpdiscuzValidator.message['empty'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_empty_text']; ?>';
14
- wpdiscuzValidator.message['email'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_email_text']; ?>';
15
- wpdiscuzValidator.message['url'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_url_text']; ?>';
16
- wpdiscuzValidator.message['max'] = '<?php echo sprintf($wc_core->wc_options_serialized->wc_phrases['wc_msg_comment_text_max_length'], $wc_core->wc_options_serialized->wc_comment_text_max_length); ?>';
17
 
18
- jQuery(document).ready(function ($) {
19
- $(document).delegate('.wc-toggle', 'click', function () {
20
- var toggleID = $(this).attr('id');
21
- var uniqueID = toggleID.substring(toggleID.lastIndexOf('-') + 1);
22
- $('#wc-comm-' + uniqueID + ' .wc-reply').slideToggle(500, function () {
23
- if ($(this).is(':hidden')) {
24
- $('#' + toggleID).html('<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_show_replies_text']; ?> &or;');
25
- } else {
26
- $('#' + toggleID).html('<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_hide_replies_text']; ?> &and;');
27
- }
 
28
  });
29
- });
30
 
31
- if ($.cookie('wc_author_name') !== '' && $.cookie('wc_author_email')) {
32
- $('#wpcomm .wc_name').val($.cookie('wc_author_name'));
33
- $('#wpcomm .wc_email').val($.cookie('wc_author_email'));
34
- }
35
 
36
- $('#wc_unsubscribe_message').delay(7000).fadeOut(1500, function () {
37
- $(this).remove();
38
- });
39
 
40
- });
41
- </script>
42
  <?php
43
  $textarea_placeholder = '';
44
  if ($post->comment_count) {
@@ -55,270 +55,392 @@ $header_text .= ' "' . get_the_title($post) . '"';
55
  $wc_is_name_field_required = ($wc_core->wc_options_serialized->wc_is_name_field_required) ? 'required="required"' : '';
56
  $wc_is_email_field_required = ($wc_core->wc_options_serialized->wc_is_email_field_required) ? 'required="required"' : '';
57
 
58
- $ob_stat = ini_get('output_buffering'); if( $ob_stat || $ob_stat === '' ){ $wc_ob_allowed = true; ob_start(); do_action('comment_form_top'); $wc_comment_form_top_content = ob_get_contents(); ob_clean(); $wc_comment_form_top_content = wpdiscuz_close_divs($wc_comment_form_top_content); } else{ $wc_ob_allowed = false; }
 
 
 
 
 
 
 
 
 
 
59
  $wc_validate_comment_text_length = (intval($wc_core->wc_options_serialized->wc_comment_text_max_length)) ? 'data-validate-length-range="1,' . $wc_core->wc_options_serialized->wc_comment_text_max_length . '"' : '';
60
  ?>
61
- <div style="clear:both"></div>
62
 
63
- <?php if (comments_open($post->ID)) { ?>
64
- <div id="comments" class="comments-area"><div id="respond" style="width: 0;height: 0;clear: both;margin: 0;padding: 0;"></div>
65
- <?php
66
- if (isset($_GET['wpdiscuzSubscribeID']) && isset($_GET['key'])) {
67
- $wc_core->wc_unsubscribe($_GET['wpdiscuzSubscribeID'], $_GET['key']);
68
- ?>
69
- <div id="wc_unsubscribe_message">
70
- <span class="wc_unsubscribe_message"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_unsubscribe_message']; ?></span>
71
- </div>
 
 
 
 
 
 
72
  <?php
73
- }
74
- ?>
75
-
76
- <?php
77
- if (isset($_GET['wpdiscuzConfirmID']) && isset($_GET['wpdiscuzConfirmKey']) && isset($_GET['wpDiscuzComfirm'])) {
78
- $wc_core->wc_db_helper->wc_notification_confirm($_GET['wpdiscuzConfirmID'], $_GET['wpdiscuzConfirmKey']);
79
  ?>
80
- <div id="wc_unsubscribe_message">
81
- <span class="wc_unsubscribe_message"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_comfirm_success_message']; ?></span>
82
- </div>
83
- <?php
84
- }
85
- ?>
86
 
87
- <?php if (comments_open($post->ID)) { ?>
88
- <h3 id="wc-comment-header"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_leave_a_reply_text']; ?></h3>
89
- <?php } ?>
90
- <?php
91
- if ($wc_core->wc_options_serialized->wc_show_hide_loggedin_username) {
92
- if (is_user_logged_in()) {
93
- global $current_user;
94
- get_currentuserinfo();
95
- $user_url = get_author_posts_url($current_user->ID);
96
  ?>
97
- <div id="wc_show_hide_loggedin_username">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  <span class="wc_show_hide_loggedin_username">
99
  <?php
100
- $logout = wp_loginout(get_permalink(),false) ;
101
- $logout = preg_replace('!>([^<]+)!is','>'.$wc_core->wc_options_serialized->wc_phrases['wc_log_out'], $logout);
102
- echo $wc_core->wc_options_serialized->wc_phrases['wc_logged_in_as'] . ' <a href="' . $user_url . '">' . $current_user->display_name . '</a> | '. $logout;
103
  ?>
104
  </span>
105
- </div>
106
  <?php
 
107
  }
108
- }
109
- ?>
110
- <div id="wpcomm">
111
- <?php if (!$wc_core->wc_options_serialized->wc_header_text_show_hide) { ?>
112
- <div class="wc-comment-bar">
113
- <p class="wc-comment-title">
114
- <?php echo ($post->comment_count) ? $header_text : $wc_core->wc_options_serialized->wc_phrases['wc_be_the_first_text']; ?>
115
- </p>
116
- <div style="clear:both"></div>
117
- </div>
118
- <?php } ?>
119
- <?php do_action('comment_form_before'); ?>
120
- <div class="wc_social_plugin_wrapper">
121
- <?php if( $wc_ob_allowed ){ echo $wc_comment_form_top_content; } else{ do_action('comment_form_top'); }?>
122
- </div>
123
- <div class="wc-form-wrapper">
124
- <?php
125
- if ($wc_core->is_guest_can_comment()) {
126
- ?>
127
 
128
- <form action="" method="post" id="wc_comm_form-<?php echo $unique_id; ?>" class="wc_comm_form wc_main_comm_form">
129
- <div class="wc-field-comment">
130
- <?php if (!$wc_core->wc_options_serialized->wc_avatar_show_hide) { ?>
131
- <div class="wc-field-avatararea">
132
- <?php echo $wc_form_avatar; ?>
133
- </div>
134
- <?php } ?>
135
- <div class="wpdiscuz-item wc-field-textarea" <?php
136
- if ($wc_core->wc_options_serialized->wc_avatar_show_hide) {
137
- echo ' style="margin-left: 0;"';
138
- }
139
- ?>><textarea <?php echo $wc_validate_comment_text_length; ?> id="wc_comment-<?php echo $unique_id; ?>" class="wc_comment wc_field_input" name="wc_comment" required="required" placeholder="<?php echo $textarea_placeholder; ?>"></textarea></div>
140
- <div style="clear:both"></div>
141
- </div>
142
- <div id="wc-form-footer-<?php echo $unique_id; ?>" class="wc-form-footer">
143
- <?php if (!is_user_logged_in()) { ?>
144
- <div class="wc-author-data">
145
- <div class="wc-field-name wpdiscuz-item"><input id="wc_name-<?php echo $unique_id; ?>" class="wc_name wc_field_input" name="wc_name" <?php echo $wc_is_name_field_required; ?> value="" type="text" placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_name_text'] ?>"/></div>
146
- <div class="wc-field-email wpdiscuz-item"><input id="wc_email-<?php echo $unique_id; ?>" class="wc_email wc_field_input email" name="wc_email" <?php echo $wc_is_email_field_required; ?> value="" type="email" placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_email_text']; ?>"/></div>
147
- <div style="clear:both"></div>
148
- </div>
149
- <?php } ?>
150
- <div class="wc-form-submit">
151
- <?php if (!$wc_core->wc_options_serialized->wc_captcha_show_hide) { ?>
152
- <?php if (!is_user_logged_in()) { ?>
153
- <div class="wc-field-captcha wpdiscuz-item">
154
- <input id="wc_captcha-<?php echo $unique_id; ?>" class="wc_field_input wc_field_captcha" name="wc_captcha" required="required" value="" type="text" maxlength="5"/>
155
- <span class="wc-label wc-captcha-label">
156
- <img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $post->ID . '-' . 0); ?>" id="wc_captcha_img-<?php echo $unique_id; ?>" rel="nofollow" noimageindex />
157
- <img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png'); ?>" id="wc_captcha_refresh_img-<?php echo $unique_id; ?>" class="wc_captcha_refresh_img" rel="nofollow" noimageindex/>
158
- </span>
159
- <span class="captcha_msg"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_captcha_text']; ?></span>
 
 
 
 
 
 
 
 
 
 
160
  </div>
161
- <?php } ?>
 
 
 
 
 
 
 
 
162
  <?php } ?>
163
- <div class="wc-field-submit">
164
- <?php if (!is_user_logged_in() && !$wc_core->wc_options_serialized->wc_weburl_show_hide) { ?>
165
- <div class="wc-field-website wpdiscuz-item"><input id="wc_website-<?php echo $unique_id; ?>" class="wc_website wc_field_input" name="wc_website" value="" type="url" placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_website_text'] ?>"/></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  <?php } ?>
167
- <input type="button" name="submit" value="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_submit_text']; ?>" id="wc_comm-<?php echo $unique_id; ?>" class="wc_comm_submit button alt"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  </div>
169
- <div style="clear:both"></div>
170
- </div>
171
- <?php if ($wc_core->wc_options_serialized->wc_show_hide_comment_checkbox || $wc_core->wc_options_serialized->wc_show_hide_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox) { ?>
172
- <span class="wc_manage_subscribtions" <?php if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) echo 'style="display:none"' ?>><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_manage_subscribtions']; ?> &or;</span>
173
- <?php } ?>
174
- <div class="wc_notification_checkboxes" <?php if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) echo 'style="display:block"' ?>>
175
- <?php
176
- $wc_is_user_subscription_confirmed = $wc_core->wc_db_helper->wc_is_user_subscription_confirmed($post->ID, $current_user->user_email);
177
- $wc_subscription_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_unsubscribe'] : $wc_core->wc_options_serialized->wc_phrases['wc_ignore_subscription'];
178
 
179
- if ($wc_core->wc_options_serialized->wc_comment_reply_checkboxes_default_checked == 1) {
180
- $none_status = '';
181
- $post_sub_status = 'checked="checked"';
182
- } else {
183
- $none_status = 'checked="checked"';
184
- $post_sub_status = '';
185
- }
186
 
187
- if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
188
- ?>
189
- <input id="wc_notification_new_comment-<?php echo $unique_id; ?>" class="wc_notification_new_comment" value="wc_notification_new_comment" <?php echo $post_sub_status; ?> type="checkbox" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php _e('Participate in this discussion via email', WC_Core::$TEXT_DOMAIN); ?></label>
190
- <?php
191
- } else {
192
- if ($current_user->ID && $wc_core->wc_db_helper->wc_has_post_notification($post->ID, $current_user->user_email)) {
193
- $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_subscribed_on_post'] : $wc_core->wc_options_serialized->wc_phrases['wc_confirm_email'];
194
  ?>
195
- <label class="wc-label-comment-notify" style="cursor: default;"><?php echo $wc_confirmation_phrase; ?> | <a href="<?php echo $wc_core->wc_db_helper->wc_unsubscribe_link($post->ID, $current_user->user_email, 'post'); ?>" rel="nofollow" class="unsubscribe"><?php echo $wc_subscription_phrase; ?></a></label>
196
- <?php
 
 
 
 
 
 
197
  } else {
198
- if ($current_user->ID && $wc_core->wc_db_helper->wc_has_all_comments_notification($post->ID, $current_user->user_email)) {
199
- $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_subscribed_on_all_comment'] : $wc_core->wc_options_serialized->wc_phrases['wc_confirm_email'];
200
  ?>
201
- <label class="wc-label-all-reply-notify" style="cursor: default;"><?php echo $wc_confirmation_phrase; ?> | <a href="<?php echo $wc_core->wc_db_helper->wc_unsubscribe_link($post->ID, $current_user->user_email, 'all_comment'); ?>" rel="nofollow" class="unsubscribe"><?php echo $wc_subscription_phrase; ?></a></label><br/>
202
- <?php
 
 
 
 
203
  } else {
204
- if ($wc_core->wc_options_serialized->wc_show_hide_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_comment_checkbox) {
 
205
  ?>
206
- <input id="wc_notification_none-<?php echo $unique_id; ?>" class="wc_notification_none" <?php echo $none_status; ?> value="wc_notification_none" type="radio" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-notification-none" for="wc_notification_none-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_none']; ?></label><br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  <?php
208
- }
209
- if ($wc_core->wc_options_serialized->wc_show_hide_reply_checkbox) {
210
- ?>
211
- <input id="wc_notification_new_reply-<?php echo $unique_id; ?>" class="wc_notification_new_reply" value="wc_notification_new_reply" type="radio" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-reply-notify" for="wc_notification_new_reply-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_new_reply']; ?></label><br />
 
 
 
 
 
 
212
  <?php
213
- }
214
 
215
- if ($wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox) {
216
- ?>
217
- <input id="wc_notification_all_new_reply-<?php echo $unique_id; ?>" class="wc_notification_all_new_reply" value="wc_notification_all_new_reply" type="radio" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-all-reply-notify" for="wc_notification_all_new_reply-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_all_new_reply']; ?></label><br />
 
 
 
 
 
 
218
  <?php
219
- }
220
 
221
- if ($wc_core->wc_options_serialized->wc_show_hide_comment_checkbox) {
222
- ?>
223
- <input id="wc_notification_new_comment-<?php echo $unique_id; ?>" class="wc_notification_new_comment" value="wc_notification_new_comment" <?php echo $post_sub_status; ?> type="radio" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_new_comment']; ?></label><br />
 
 
 
 
 
 
 
224
  <?php
 
225
  }
226
  }
227
  }
228
- }
229
- ?>
230
 
231
- </div>
232
 
233
- </div>
234
- <input type="hidden" name="wc_comment_post_ID" value="<?php echo $post->ID; ?>" id="wc_comment_post_ID-<?php echo $unique_id; ?>" />
235
- <input type="hidden" name="wc_comment_parent" value="0" id="wc_comment_parent-<?php echo $unique_id; ?>" />
236
- </form>
 
 
237
 
238
- <?php } else { ?>
239
- <p class="wc-must-login">
240
- <?php echo $wc_core->wc_options_serialized->wc_phrases['wc_you_must_be_text'];
241
- $login = wp_loginout(get_permalink(),false);
242
- $login = preg_replace('!>([^<]+)!is','>'.$wc_core->wc_options_serialized->wc_phrases['wc_logged_in_text'],$login);
243
- echo ' ' . $login . ' ' .$wc_core->wc_options_serialized->wc_phrases['wc_to_post_comment_text']; ?>
244
- </p>
245
  <?php
246
- }
247
- ?>
248
- </div>
249
- <?php do_action('comment_form_after'); ?>
250
- <hr/>
251
- <?php if ($wc_comment_list_update_type == 2) { ?>
252
- <div class="wc_new_comment_and_replies">
253
- <div class="wc_new_comment"><span class="wc_new_comment_button_text"></span></div>
254
- <div class="wc_new_reply"><span class="wc_new_reply_button_text"></span></div>
255
- <div style="clear:both"></div>
256
  </div>
257
- <div style="clear:both"></div>
258
- <?php } ?>
259
- <?php } else { ?>
260
- <?php if ($post->comment_count > 0) { ?>
 
 
 
 
 
 
 
 
261
  <div class="comments-area" style="border:none;">
262
  <?php do_action('comment_form_closed'); ?>
263
- <?php } else { ?>
264
  <div class="comments-area" style="display:none">
265
  <?php do_action('comment_form_closed'); ?>
266
- <?php } ?>
267
- <div id="wpcomm" style="border:none;">
268
- <?php } ?>
269
- <div class="wc-thread-wrapper">
270
- <?php
271
- $wc_wp_comments = $wc_core->get_wp_comments(1);
272
- $wc_parent_comments_count = $wc_wp_comments['wc_parent_comments_count'];
273
- echo $wc_wp_comments['wc_list'];
274
- ?>
275
- </div>
276
  <span style="display: none;">
277
- <input type="hidden" name="wc_home_url" value="<?php echo plugins_url(); ?>" id="wc_home_url" />
278
- <input type="hidden" name="wc_plugin_dir_url" value="<?php echo WC_Core::$PLUGIN_DIRECTORY; ?>" id="wc_plugin_dir_url" />
279
- <input type="hidden" name="wc_comments_offset" id="wc_comments_offset" value="1" />
280
- <input type="hidden" name="wc_parent_per_page" id="wc_parent_per_page" value="<?php echo $wc_core->wc_options_serialized->wc_comment_count; ?>" />
281
- <input type="hidden" name="wc_parent_comments_count" id="wc_parent_comments_count" value="<?php echo $wc_parent_comments_count; ?>" />
282
- <input type="hidden" name="wc_curr_user_comment_count" id="wc_curr_user_comment_count" class="wc_curr_user_comment_count" value="0" />
 
 
 
 
283
  <?php
284
  $wc_all_comments_count_old = $post->comment_count;
285
  $wc_last_comment_id = $wc_core->wc_db_helper->get_last_comment_id_by_post_id($post->ID);
286
- ?>
287
- <input type="hidden" name="wc_last_comment_id" value="<?php echo $wc_last_comment_id; ?>" id="wc_last_comment_id" />
288
- <input type="hidden" name="wc_last_comment_id_before_update" value="<?php echo $wc_last_comment_id; ?>" id="wc_last_comment_id_before_update" />
289
- <input type="hidden" name="wc_all_comments_count_old" value="<?php echo $wc_all_comments_count_old; ?>" id="wc_all_comments_count_old" />
290
- <input type="hidden" name="wc_comment_list_update_type" value="<?php echo $wc_comment_list_update_type; ?>" id="wc_comment_list_update_type" />
291
- <input type="hidden" name="wc_comment_list_update_timer" value="<?php echo $wc_core->wc_options_serialized->wc_comment_list_update_timer; ?>" id="wc_comment_list_update_timer" />
 
 
 
 
 
 
292
 
293
- <input type="hidden" name="wc_last_new_comment_id" value="<?php echo $wc_last_comment_id; ?>" id="wc_last_new_comment_id" />
294
- <input type="hidden" name="wc_last_new_reply_id" value="<?php echo $wc_last_comment_id; ?>" id="wc_last_new_reply_id" />
295
- <input type="hidden" name="wc_comment_reply_checkboxes_default_checked" value="<?php echo $wc_core->wc_options_serialized->wc_comment_reply_checkboxes_default_checked; ?>" id="wc_comment_reply_checkboxes_default_checked" />
 
 
 
 
296
  <input type="hidden" value="<?php echo $post->ID; ?>" id="wpdiscuz_current_post_id"/>
297
  </span>
298
- <div style="clear:both"></div>
299
- <?php if (comments_open($post->ID)) { ?>
300
- <?php if ($wc_core->wc_options_serialized->wc_show_plugin_powerid_by) { ?>
301
- <div class="by-wpdiscuz"><span id="awpdiscuz" onclick='javascript:document.getElementById("bywpdiscuz").style.display = "inline";
302
- document.getElementById("awpdiscuz").style.display = "none";'><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/plugin-icon/icon_info.png'); ?>" align="absmiddle" class="wpdimg"/></span>&nbsp;<a href="http://gvectors.com/wpdiscuz/" id="bywpdiscuz" title="wpDiscuz v<?php echo get_option($wc_core->wc_version_slug); ?> - Interactive Comment System">wpDiscuz</a></div>
303
- <?php } ?>
304
- <?php } ?>
305
- <div id="wc_openModalFormAction" class="modalDialog">
306
- <div id="wc_response_info" class="wc_modal">
307
- <div id="wc_response_info_box">
308
- <a href="#close" title="Close" class="close">&nbsp;</a>
309
- <img width="64" height="64" src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/loader/ajax-loader-200x200.gif'); ?>" />
 
 
 
 
 
 
 
 
 
310
  </div>
311
  </div>
 
312
  </div>
313
- </div><!-- wpcomm -->
314
- </div><!-- comments-area -->
315
  <?php
316
 
317
- function wpdiscuz_close_divs($html) {
 
318
  @preg_match_all('|<div|is', $html, $wc_div_open, PREG_SET_ORDER);
319
  @preg_match_all('|</div|is', $html, $wc_div_close, PREG_SET_ORDER);
320
- $wc_div_open = count((array) $wc_div_open);
321
- $wc_div_close = count((array) $wc_div_close);
322
  $wc_div_delta = $wc_div_open - $wc_div_close;
323
  if ($wc_div_delta) {
324
  $wc_div_end_html = str_repeat('</div>', $wc_div_delta);
@@ -329,7 +451,8 @@ $wc_validate_comment_text_length = (intval($wc_core->wc_options_serialized->wc_c
329
  if (preg_match_all('|<li[^><]*>.+?</li>|is', $html, $wc_social_buttons, PREG_SET_ORDER)) {
330
  foreach ($wc_social_buttons as $wc_social_button) {
331
  $wc_social_buttons_array[] = $wc_social_button[0];
332
- } $html = '<div class="wp-social-login-widget"><div class="wp-social-login-connect-with_by_the_champ">' . __('Connect with') . ':</div><div class="wp-social-login-provider-list"><ul class="wc_social_login_by_the_champ">' . implode('', $wc_social_buttons_array) . '</ul><div style="clear:both"></div></div></div>';
 
333
  }
334
  }
335
  return $html;
7
  $wc_comment_list_update_type = $wc_core->wc_options_serialized->wc_comment_list_update_type;
8
  $wc_form_avatar = $wc_core->wc_helper->get_comment_author_avatar();
9
  ?>
10
+ <script type="text/javascript">
11
+ // initialize the wpdiscuzValidator function
12
+ wpdiscuzValidator.message['invalid'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_invalid_field']; ?>';
13
+ wpdiscuzValidator.message['empty'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_empty_text']; ?>';
14
+ wpdiscuzValidator.message['email'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_email_text']; ?>';
15
+ wpdiscuzValidator.message['url'] = '<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_error_url_text']; ?>';
16
+ wpdiscuzValidator.message['max'] = '<?php echo sprintf($wc_core->wc_options_serialized->wc_phrases['wc_msg_comment_text_max_length'], $wc_core->wc_options_serialized->wc_comment_text_max_length); ?>';
17
 
18
+ jQuery(document).ready(function ($) {
19
+ $(document).delegate('.wc-toggle', 'click', function () {
20
+ var toggleID = $(this).attr('id');
21
+ var uniqueID = toggleID.substring(toggleID.lastIndexOf('-') + 1);
22
+ $('#wc-comm-' + uniqueID + ' .wc-reply').slideToggle(500, function () {
23
+ if ($(this).is(':hidden')) {
24
+ $('#' + toggleID).html('<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_show_replies_text']; ?> &or;');
25
+ } else {
26
+ $('#' + toggleID).html('<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_hide_replies_text']; ?> &and;');
27
+ }
28
+ });
29
  });
 
30
 
31
+ if ($.cookie('wc_author_name') !== '' && $.cookie('wc_author_email')) {
32
+ $('#wpcomm .wc_name').val($.cookie('wc_author_name'));
33
+ $('#wpcomm .wc_email').val($.cookie('wc_author_email'));
34
+ }
35
 
36
+ $('#wc_unsubscribe_message').delay(7000).fadeOut(1500, function () {
37
+ $(this).remove();
38
+ });
39
 
40
+ });
41
+ </script>
42
  <?php
43
  $textarea_placeholder = '';
44
  if ($post->comment_count) {
55
  $wc_is_name_field_required = ($wc_core->wc_options_serialized->wc_is_name_field_required) ? 'required="required"' : '';
56
  $wc_is_email_field_required = ($wc_core->wc_options_serialized->wc_is_email_field_required) ? 'required="required"' : '';
57
 
58
+ $ob_stat = ini_get('output_buffering');
59
+ if ($ob_stat || $ob_stat === '') {
60
+ $wc_ob_allowed = true;
61
+ ob_start();
62
+ do_action('comment_form_top');
63
+ $wc_comment_form_top_content = ob_get_contents();
64
+ ob_clean();
65
+ $wc_comment_form_top_content = wpdiscuz_close_divs($wc_comment_form_top_content);
66
+ } else {
67
+ $wc_ob_allowed = false;
68
+ }
69
  $wc_validate_comment_text_length = (intval($wc_core->wc_options_serialized->wc_comment_text_max_length)) ? 'data-validate-length-range="1,' . $wc_core->wc_options_serialized->wc_comment_text_max_length . '"' : '';
70
  ?>
71
+ <div style="clear:both"></div>
72
 
73
+ <?php if (comments_open($post->ID)) {
74
+ if (function_exists('the_champ_login_button')){ ?>
75
+ <div id="comments" style="width: 0;height: 0;clear: both;margin: 0;padding: 0;"></div>
76
+ <div id="respond" class="comments-area">
77
+ <?php }else{ ?>
78
+ <div id="comments" class="comments-area">
79
+ <div id="respond" style="width: 0;height: 0;clear: both;margin: 0;padding: 0;"></div>
80
+ <?php }
81
+ if (isset($_GET['wpdiscuzSubscribeID']) && isset($_GET['key'])) {
82
+ $wc_core->wc_unsubscribe($_GET['wpdiscuzSubscribeID'], $_GET['key']);
83
+ ?>
84
+ <div id="wc_unsubscribe_message">
85
+ <span
86
+ class="wc_unsubscribe_message"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_unsubscribe_message']; ?></span>
87
+ </div>
88
  <?php
89
+ }
 
 
 
 
 
90
  ?>
 
 
 
 
 
 
91
 
92
+ <?php
93
+ if (isset($_GET['wpdiscuzConfirmID']) && isset($_GET['wpdiscuzConfirmKey']) && isset($_GET['wpDiscuzComfirm'])) {
94
+ $wc_core->wc_db_helper->wc_notification_confirm($_GET['wpdiscuzConfirmID'], $_GET['wpdiscuzConfirmKey']);
 
 
 
 
 
 
95
  ?>
96
+ <div id="wc_unsubscribe_message">
97
+ <span
98
+ class="wc_unsubscribe_message"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_comfirm_success_message']; ?></span>
99
+ </div>
100
+ <?php
101
+ }
102
+ ?>
103
+
104
+ <?php if (comments_open($post->ID)) { ?>
105
+ <h3 id="wc-comment-header"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_leave_a_reply_text']; ?></h3>
106
+ <?php } ?>
107
+ <?php
108
+ if ($wc_core->wc_options_serialized->wc_show_hide_loggedin_username) {
109
+ if (is_user_logged_in()) {
110
+ global $current_user;
111
+ get_currentuserinfo();
112
+ $user_url = get_author_posts_url($current_user->ID);
113
+ ?>
114
+ <div id="wc_show_hide_loggedin_username">
115
  <span class="wc_show_hide_loggedin_username">
116
  <?php
117
+ $logout = wp_loginout(get_permalink(), false);
118
+ $logout = preg_replace('!>([^<]+)!is', '>' . $wc_core->wc_options_serialized->wc_phrases['wc_log_out'], $logout);
119
+ echo $wc_core->wc_options_serialized->wc_phrases['wc_logged_in_as'] . ' <a href="' . $user_url . '">' . $current_user->display_name . '</a> | ' . $logout;
120
  ?>
121
  </span>
122
+ </div>
123
  <?php
124
+ }
125
  }
126
+ ?>
127
+ <div id="wpcomm">
128
+ <?php if (!$wc_core->wc_options_serialized->wc_header_text_show_hide) { ?>
129
+ <div class="wc-comment-bar">
130
+ <p class="wc-comment-title">
131
+ <?php echo ($post->comment_count) ? $header_text : $wc_core->wc_options_serialized->wc_phrases['wc_be_the_first_text']; ?>
132
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ <div style="clear:both"></div>
135
+ </div>
136
+ <?php } ?>
137
+ <?php do_action('comment_form_before'); ?>
138
+ <div class="wc_social_plugin_wrapper">
139
+ <?php if ($wc_ob_allowed) {
140
+ echo $wc_comment_form_top_content;
141
+ } else {
142
+ do_action('comment_form_top');
143
+ } ?>
144
+ </div>
145
+ <div class="wc-form-wrapper">
146
+ <?php
147
+ if ($wc_core->is_guest_can_comment()) {
148
+ ?>
149
+
150
+ <form action="" method="post" id="wc_comm_form-<?php echo $unique_id; ?>"
151
+ class="wc_comm_form wc_main_comm_form">
152
+ <div class="wc-field-comment">
153
+ <?php if (!$wc_core->wc_options_serialized->wc_avatar_show_hide) { ?>
154
+ <div class="wc-field-avatararea">
155
+ <?php echo $wc_form_avatar; ?>
156
+ </div>
157
+ <?php } ?>
158
+ <div class="wpdiscuz-item wc-field-textarea" <?php
159
+ if ($wc_core->wc_options_serialized->wc_avatar_show_hide) {
160
+ echo ' style="margin-left: 0;"';
161
+ }
162
+ ?>><textarea <?php echo $wc_validate_comment_text_length; ?>
163
+ id="wc_comment-<?php echo $unique_id; ?>" class="wc_comment wc_field_input"
164
+ name="wc_comment" required="required"
165
+ placeholder="<?php echo $textarea_placeholder; ?>"></textarea></div>
166
+ <div style="clear:both"></div>
167
+ </div>
168
+ <div id="wc-form-footer-<?php echo $unique_id; ?>" class="wc-form-footer">
169
+ <?php if (!is_user_logged_in()) { ?>
170
+ <div class="wc-author-data">
171
+ <div class="wc-field-name wpdiscuz-item"><input
172
+ id="wc_name-<?php echo $unique_id; ?>" class="wc_name wc_field_input"
173
+ name="wc_name" <?php echo $wc_is_name_field_required; ?> value=""
174
+ type="text"
175
+ placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_name_text'] ?>"/>
176
  </div>
177
+ <div class="wc-field-email wpdiscuz-item"><input
178
+ id="wc_email-<?php echo $unique_id; ?>"
179
+ class="wc_email wc_field_input email"
180
+ name="wc_email" <?php echo $wc_is_email_field_required; ?> value=""
181
+ type="email"
182
+ placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_email_text']; ?>"/>
183
+ </div>
184
+ <div style="clear:both"></div>
185
+ </div>
186
  <?php } ?>
187
+ <div class="wc-form-submit">
188
+ <?php if (!$wc_core->wc_options_serialized->wc_captcha_show_hide) { ?>
189
+ <?php if (!is_user_logged_in()) { ?>
190
+ <div class="wc-field-captcha wpdiscuz-item">
191
+ <input id="wc_captcha-<?php echo $unique_id; ?>"
192
+ class="wc_field_input wc_field_captcha" name="wc_captcha"
193
+ required="required" value="" type="text" maxlength="5"/>
194
+ <span class="wc-label wc-captcha-label">
195
+ <img
196
+ src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $post->ID . '-' . 0); ?>"
197
+ id="wc_captcha_img-<?php echo $unique_id; ?>" rel="nofollow"
198
+ noimageindex/>
199
+ <img
200
+ src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png'); ?>"
201
+ id="wc_captcha_refresh_img-<?php echo $unique_id; ?>"
202
+ class="wc_captcha_refresh_img" rel="nofollow" noimageindex/>
203
+ </span>
204
+ <span
205
+ class="captcha_msg"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_captcha_text']; ?></span>
206
+ </div>
207
+ <?php } ?>
208
  <?php } ?>
209
+ <div class="wc-field-submit">
210
+ <?php if (!is_user_logged_in() && !$wc_core->wc_options_serialized->wc_weburl_show_hide) { ?>
211
+ <div class="wc-field-website wpdiscuz-item"><input
212
+ id="wc_website-<?php echo $unique_id; ?>"
213
+ class="wc_website wc_field_input" name="wc_website" value=""
214
+ type="url"
215
+ placeholder="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_website_text'] ?>"/>
216
+ </div>
217
+ <?php } ?>
218
+ <input type="button" name="submit"
219
+ value="<?php echo $wc_core->wc_options_serialized->wc_phrases['wc_submit_text']; ?>"
220
+ id="wc_comm-<?php echo $unique_id; ?>"
221
+ class="wc_comm_submit button alt"/>
222
+ </div>
223
+ <div style="clear:both"></div>
224
  </div>
225
+ <?php if ($wc_core->wc_options_serialized->wc_show_hide_comment_checkbox || $wc_core->wc_options_serialized->wc_show_hide_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox) { ?>
226
+ <span
227
+ class="wc_manage_subscribtions" <?php if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) echo 'style="display:none"' ?>><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_manage_subscribtions']; ?> &or;</span>
228
+ <?php } ?>
229
+ <div
230
+ class="wc_notification_checkboxes" <?php if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) echo 'style="display:block"' ?>>
231
+ <?php
232
+ $wc_is_user_subscription_confirmed = $wc_core->wc_db_helper->wc_is_user_subscription_confirmed($post->ID, $current_user->user_email);
233
+ $wc_subscription_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_unsubscribe'] : $wc_core->wc_options_serialized->wc_phrases['wc_ignore_subscription'];
234
 
235
+ if ($wc_core->wc_options_serialized->wc_comment_reply_checkboxes_default_checked == 1) {
236
+ $none_status = '';
237
+ $post_sub_status = 'checked="checked"';
238
+ } else {
239
+ $none_status = 'checked="checked"';
240
+ $post_sub_status = '';
241
+ }
242
 
243
+ if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
 
 
 
 
 
 
244
  ?>
245
+ <input id="wc_notification_new_comment-<?php echo $unique_id; ?>"
246
+ class="wc_notification_new_comment"
247
+ value="wc_notification_new_comment" <?php echo $post_sub_status; ?>
248
+ type="checkbox"
249
+ name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label
250
+ class="wc-label-comment-notify"
251
+ for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php _e('Participate in this discussion via email', WC_Core::$TEXT_DOMAIN); ?></label>
252
+ <?php
253
  } else {
254
+ if ($current_user->ID && $wc_core->wc_db_helper->wc_has_post_notification($post->ID, $current_user->user_email)) {
255
+ $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_subscribed_on_post'] : $wc_core->wc_options_serialized->wc_phrases['wc_confirm_email'];
256
  ?>
257
+ <label class="wc-label-comment-notify"
258
+ style="cursor: default;"><?php echo $wc_confirmation_phrase; ?> | <a
259
+ href="<?php echo $wc_core->wc_db_helper->wc_unsubscribe_link($post->ID, $current_user->user_email, 'post'); ?>"
260
+ rel="nofollow"
261
+ class="unsubscribe"><?php echo $wc_subscription_phrase; ?></a></label>
262
+ <?php
263
  } else {
264
+ if ($current_user->ID && $wc_core->wc_db_helper->wc_has_all_comments_notification($post->ID, $current_user->user_email)) {
265
+ $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $wc_core->wc_options_serialized->wc_phrases['wc_subscribed_on_all_comment'] : $wc_core->wc_options_serialized->wc_phrases['wc_confirm_email'];
266
  ?>
267
+ <label class="wc-label-all-reply-notify"
268
+ style="cursor: default;"><?php echo $wc_confirmation_phrase; ?> |
269
+ <a href="<?php echo $wc_core->wc_db_helper->wc_unsubscribe_link($post->ID, $current_user->user_email, 'all_comment'); ?>"
270
+ rel="nofollow"
271
+ class="unsubscribe"><?php echo $wc_subscription_phrase; ?></a></label>
272
+ <br/>
273
+ <?php
274
+ } else {
275
+ if ($wc_core->wc_options_serialized->wc_show_hide_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox || $wc_core->wc_options_serialized->wc_show_hide_comment_checkbox) {
276
+ ?>
277
+ <input id="wc_notification_none-<?php echo $unique_id; ?>"
278
+ class="wc_notification_none" <?php echo $none_status; ?>
279
+ value="wc_notification_none" type="radio"
280
+ name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/>
281
+ <label class="wc-notification-none"
282
+ for="wc_notification_none-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_none']; ?></label>
283
+ <br/>
284
  <?php
285
+ }
286
+ if ($wc_core->wc_options_serialized->wc_show_hide_reply_checkbox) {
287
+ ?>
288
+ <input id="wc_notification_new_reply-<?php echo $unique_id; ?>"
289
+ class="wc_notification_new_reply"
290
+ value="wc_notification_new_reply" type="radio"
291
+ name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/>
292
+ <label class="wc-label-reply-notify"
293
+ for="wc_notification_new_reply-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_new_reply']; ?></label>
294
+ <br/>
295
  <?php
296
+ }
297
 
298
+ if ($wc_core->wc_options_serialized->wc_show_hide_all_reply_checkbox) {
299
+ ?>
300
+ <input id="wc_notification_all_new_reply-<?php echo $unique_id; ?>"
301
+ class="wc_notification_all_new_reply"
302
+ value="wc_notification_all_new_reply" type="radio"
303
+ name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/>
304
+ <label class="wc-label-all-reply-notify"
305
+ for="wc_notification_all_new_reply-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_all_new_reply']; ?></label>
306
+ <br/>
307
  <?php
308
+ }
309
 
310
+ if ($wc_core->wc_options_serialized->wc_show_hide_comment_checkbox) {
311
+ ?>
312
+ <input id="wc_notification_new_comment-<?php echo $unique_id; ?>"
313
+ class="wc_notification_new_comment"
314
+ value="wc_notification_new_comment" <?php echo $post_sub_status; ?>
315
+ type="radio"
316
+ name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/>
317
+ <label class="wc-label-comment-notify"
318
+ for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php echo $wc_core->wc_options_serialized->wc_phrases['wc_notify_on_new_comment']; ?></label>
319
+ <br/>
320
  <?php
321
+ }
322
  }
323
  }
324
  }
325
+ ?>
 
326
 
327
+ </div>
328
 
329
+ </div>
330
+ <input type="hidden" name="wc_comment_post_ID" value="<?php echo $post->ID; ?>"
331
+ id="wc_comment_post_ID-<?php echo $unique_id; ?>"/>
332
+ <input type="hidden" name="wc_comment_parent" value="0"
333
+ id="wc_comment_parent-<?php echo $unique_id; ?>"/>
334
+ </form>
335
 
336
+ <?php } else { ?>
337
+ <p class="wc-must-login">
338
+ <?php echo $wc_core->wc_options_serialized->wc_phrases['wc_you_must_be_text'];
339
+ $login = wp_loginout(get_permalink(), false);
340
+ $login = preg_replace('!>([^<]+)!is', '>' . $wc_core->wc_options_serialized->wc_phrases['wc_logged_in_text'], $login);
341
+ echo ' ' . $login . ' ' . $wc_core->wc_options_serialized->wc_phrases['wc_to_post_comment_text']; ?>
342
+ </p>
343
  <?php
344
+ }
345
+ ?>
 
 
 
 
 
 
 
 
346
  </div>
347
+ <?php do_action('comment_form_after'); ?>
348
+ <hr/>
349
+ <?php if ($wc_comment_list_update_type == 2) { ?>
350
+ <div class="wc_new_comment_and_replies">
351
+ <div class="wc_new_comment"><span class="wc_new_comment_button_text"></span></div>
352
+ <div class="wc_new_reply"><span class="wc_new_reply_button_text"></span></div>
353
+ <div style="clear:both"></div>
354
+ </div>
355
+ <div style="clear:both"></div>
356
+ <?php } ?>
357
+ <?php } else { ?>
358
+ <?php if ($post->comment_count > 0) { ?>
359
  <div class="comments-area" style="border:none;">
360
  <?php do_action('comment_form_closed'); ?>
361
+ <?php } else { ?>
362
  <div class="comments-area" style="display:none">
363
  <?php do_action('comment_form_closed'); ?>
364
+ <?php } ?>
365
+ <div id="wpcomm" style="border:none;">
366
+ <?php } ?>
367
+ <div class="wc-thread-wrapper">
368
+ <?php
369
+ $wc_wp_comments = $wc_core->get_wp_comments(1);
370
+ $wc_parent_comments_count = $wc_wp_comments['wc_parent_comments_count'];
371
+ echo $wc_wp_comments['wc_list'];
372
+ ?>
373
+ </div>
374
  <span style="display: none;">
375
+ <input type="hidden" name="wc_home_url" value="<?php echo plugins_url(); ?>" id="wc_home_url"/>
376
+ <input type="hidden" name="wc_plugin_dir_url" value="<?php echo WC_Core::$PLUGIN_DIRECTORY; ?>"
377
+ id="wc_plugin_dir_url"/>
378
+ <input type="hidden" name="wc_comments_offset" id="wc_comments_offset" value="1"/>
379
+ <input type="hidden" name="wc_parent_per_page" id="wc_parent_per_page"
380
+ value="<?php echo $wc_core->wc_options_serialized->wc_comment_count; ?>"/>
381
+ <input type="hidden" name="wc_parent_comments_count" id="wc_parent_comments_count"
382
+ value="<?php echo $wc_parent_comments_count; ?>"/>
383
+ <input type="hidden" name="wc_curr_user_comment_count" id="wc_curr_user_comment_count"
384
+ class="wc_curr_user_comment_count" value="0"/>
385
  <?php
386
  $wc_all_comments_count_old = $post->comment_count;
387
  $wc_last_comment_id = $wc_core->wc_db_helper->get_last_comment_id_by_post_id($post->ID);
388
+ ?>
389
+ <input type="hidden" name="wc_last_comment_id" value="<?php echo $wc_last_comment_id; ?>"
390
+ id="wc_last_comment_id"/>
391
+ <input type="hidden" name="wc_last_comment_id_before_update"
392
+ value="<?php echo $wc_last_comment_id; ?>" id="wc_last_comment_id_before_update"/>
393
+ <input type="hidden" name="wc_all_comments_count_old"
394
+ value="<?php echo $wc_all_comments_count_old; ?>" id="wc_all_comments_count_old"/>
395
+ <input type="hidden" name="wc_comment_list_update_type"
396
+ value="<?php echo $wc_comment_list_update_type; ?>" id="wc_comment_list_update_type"/>
397
+ <input type="hidden" name="wc_comment_list_update_timer"
398
+ value="<?php echo $wc_core->wc_options_serialized->wc_comment_list_update_timer; ?>"
399
+ id="wc_comment_list_update_timer"/>
400
 
401
+ <input type="hidden" name="wc_last_new_comment_id" value="<?php echo $wc_last_comment_id; ?>"
402
+ id="wc_last_new_comment_id"/>
403
+ <input type="hidden" name="wc_last_new_reply_id" value="<?php echo $wc_last_comment_id; ?>"
404
+ id="wc_last_new_reply_id"/>
405
+ <input type="hidden" name="wc_comment_reply_checkboxes_default_checked"
406
+ value="<?php echo $wc_core->wc_options_serialized->wc_comment_reply_checkboxes_default_checked; ?>"
407
+ id="wc_comment_reply_checkboxes_default_checked"/>
408
  <input type="hidden" value="<?php echo $post->ID; ?>" id="wpdiscuz_current_post_id"/>
409
  </span>
410
+
411
+ <div style="clear:both"></div>
412
+ <?php if (comments_open($post->ID)) { ?>
413
+ <?php if ($wc_core->wc_options_serialized->wc_show_plugin_powerid_by) { ?>
414
+ <div class="by-wpdiscuz"><span id="awpdiscuz" onclick='javascript:document.getElementById("bywpdiscuz").style.display = "inline";
415
+ document.getElementById("awpdiscuz").style.display = "none";'><img
416
+ src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/plugin-icon/icon_info.png'); ?>"
417
+ align="absmiddle" class="wpdimg"/></span>&nbsp;<a
418
+ href="http://gvectors.com/wpdiscuz/" id="bywpdiscuz"
419
+ title="wpDiscuz v<?php echo get_option($wc_core->wc_version_slug); ?> - Interactive Comment System">wpDiscuz</a>
420
+ </div>
421
+ <?php } ?>
422
+ <?php } ?>
423
+ <div id="wc_openModalFormAction" class="modalDialog">
424
+ <div id="wc_response_info" class="wc_modal">
425
+ <div id="wc_response_info_box">
426
+ <a href="#close" title="Close" class="close">&nbsp;</a>
427
+ <img width="64" height="64"
428
+ src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/loader/ajax-loader-200x200.gif'); ?>"/>
429
+ </div>
430
+ </div>
431
  </div>
432
  </div>
433
+ <!-- wpcomm -->
434
  </div>
435
+ <!-- comments-area -->
 
436
  <?php
437
 
438
+ function wpdiscuz_close_divs($html)
439
+ {
440
  @preg_match_all('|<div|is', $html, $wc_div_open, PREG_SET_ORDER);
441
  @preg_match_all('|</div|is', $html, $wc_div_close, PREG_SET_ORDER);
442
+ $wc_div_open = count((array)$wc_div_open);
443
+ $wc_div_close = count((array)$wc_div_close);
444
  $wc_div_delta = $wc_div_open - $wc_div_close;
445
  if ($wc_div_delta) {
446
  $wc_div_end_html = str_repeat('</div>', $wc_div_delta);
451
  if (preg_match_all('|<li[^><]*>.+?</li>|is', $html, $wc_social_buttons, PREG_SET_ORDER)) {
452
  foreach ($wc_social_buttons as $wc_social_button) {
453
  $wc_social_buttons_array[] = $wc_social_button[0];
454
+ }
455
+ $html = '<div class="wp-social-login-widget"><div class="wp-social-login-connect-with_by_the_champ">' . __('Connect with') . ':</div><div class="wp-social-login-provider-list"><ul class="wc_social_login_by_the_champ">' . implode('', $wc_social_buttons_array) . '</ul><div style="clear:both"></div></div></div>';
456
  }
457
  }
458
  return $html;
files/css/wpdiscuz-rtl.min.css CHANGED
@@ -1 +1 @@
1
- #wpcomm .wc-field-comment .wc-field-textarea{margin-left:2px;margin-right:65px}#wpcomm .wc-form-wrapper .avatar{margin-top:0}#wpcomm .wc-field-comment .wc-field-avatararea{float:right}#wpcomm .wc-field-submit{float:left}#wpcomm .wc-field-captcha{float:right}#wpcomm .wc_notification_checkboxes{text-align:right}#wpcomm .wc-comment .wc-comment-right{margin-left:0;margin-right:70px}#wpcomm .wc-comment-author{float:right}#wpcomm .wc-comment-date{float:left}#wpcomm .wc-comment-footer .wc-vote-result{margin-right:0;margin-left:5px}#wpcomm .wc-toggle{float:left}
1
+ #wpcomm .wc-field-comment .wc-field-textarea{margin-left:2px;margin-right:65px}#wpcomm .wc-form-wrapper .avatar{margin-top:0}#wpcomm .wc-field-comment .wc-field-avatararea{float:right}#wpcomm .wc-field-submit{float:left}#wpcomm .wc-field-captcha{float:right}#wpcomm .wc_notification_checkboxes{text-align:right}#wpcomm .wc-comment .wc-comment-right{margin-left:0;margin-right:70px}#wpcomm .wc-comment-author{float:right}#wpcomm .wc-comment-date{float:left}#wpcomm .wc-comment-footer .wc-vote-result{margin-right:0;margin-left:5px}#wpcomm .wc-toggle{float:left}#wpcomm .wc-comment-footer{text-align: left;}#wpcomm .wc-comment-text{text-align: right !important;}
options/options-layouts/settings-general.php CHANGED
@@ -179,6 +179,16 @@
179
  </label>
180
  </td>
181
  </tr>
 
 
 
 
 
 
 
 
 
 
182
  <tr valign="top">
183
  <th scope="row">
184
  <?php _e('Load rest of all comments on clicking the [Load More Comments] button', WC_Core::$TEXT_DOMAIN); ?>
@@ -215,7 +225,6 @@
215
  </label>
216
  </td>
217
  </tr>
218
-
219
  <tr valign="top">
220
  <th scope="row" >
221
  <label for="wc_show_plugin_powerid_by">
@@ -230,7 +239,6 @@
230
  </label>
231
  </td>
232
  </tr>
233
-
234
  </tbody>
235
  </table>
236
  </div>
179
  </label>
180
  </td>
181
  </tr>
182
+ <tr valign="top">
183
+ <th scope="row" >
184
+ <?php _e('Load WpDiscuz CSS and JS on home page', WC_Core::$TEXT_DOMAIN); ?>
185
+ </th>
186
+ <td colspan="3">
187
+ <label for="wc_load_js_css_on_home">
188
+ <input type="checkbox" <?php checked($this->wc_options_serialized->wc_load_js_css_on_home == 1) ?> value="1" name="wc_load_js_css_on_home" id="wc_load_js_css_on_home" />
189
+ </label>
190
+ </td>
191
+ </tr>
192
  <tr valign="top">
193
  <th scope="row">
194
  <?php _e('Load rest of all comments on clicking the [Load More Comments] button', WC_Core::$TEXT_DOMAIN); ?>
225
  </label>
226
  </td>
227
  </tr>
 
228
  <tr valign="top">
229
  <th scope="row" >
230
  <label for="wc_show_plugin_powerid_by">
239
  </label>
240
  </td>
241
  </tr>
 
242
  </tbody>
243
  </table>
244
  </div>
options/wc-options-serialize.php CHANGED
@@ -354,7 +354,16 @@ class WC_Options_Serialize {
354
  * Default Value - Unlimit
355
  */
356
  public $wc_comment_text_max_length;
357
-
 
 
 
 
 
 
 
 
 
358
 
359
  function __construct($wc_db_helper) {
360
  $this->wc_db_helper = $wc_db_helper;
@@ -408,6 +417,7 @@ class WC_Options_Serialize {
408
  $this->wc_show_plugin_powerid_by = isset($options['wc_show_plugin_powerid_by']) ? $options['wc_show_plugin_powerid_by'] : 0;
409
  $this->wc_is_use_po_mo = isset($options['wc_is_use_po_mo']) ? $options['wc_is_use_po_mo'] : 0;
410
  $this->wc_comment_text_max_length = isset($options['wc_comment_text_max_length']) ? $options['wc_comment_text_max_length'] : '';
 
411
  }
412
 
413
  /**
@@ -553,7 +563,8 @@ class WC_Options_Serialize {
553
  'wc_custom_css' => $this->wc_custom_css,
554
  'wc_show_plugin_powerid_by' => $this->wc_show_plugin_powerid_by,
555
  'wc_is_use_po_mo' => $this->wc_is_use_po_mo,
556
- 'wc_comment_text_max_length' => $this->wc_comment_text_max_length
 
557
  );
558
 
559
  return $options;
@@ -606,7 +617,8 @@ class WC_Options_Serialize {
606
  'wc_custom_css' => '.comments-area{width:auto;}',
607
  'wc_show_plugin_powerid_by' => '0',
608
  'wc_is_use_po_mo' => '0',
609
- 'wc_comment_text_max_length' => ''
 
610
  );
611
  add_option($this->wc_options_slug, serialize($options));
612
  }
354
  * Default Value - Unlimit
355
  */
356
  public $wc_comment_text_max_length;
357
+
358
+
359
+ /**
360
+ * Type - Checkbox
361
+ * Available Values - Checked/Unchecked
362
+ * Description - Disable / Enable wpdiscuz js and css loading on home page
363
+ * Default Value - Checked
364
+ */
365
+ public $wc_load_js_css_on_home;
366
+
367
 
368
  function __construct($wc_db_helper) {
369
  $this->wc_db_helper = $wc_db_helper;
417
  $this->wc_show_plugin_powerid_by = isset($options['wc_show_plugin_powerid_by']) ? $options['wc_show_plugin_powerid_by'] : 0;
418
  $this->wc_is_use_po_mo = isset($options['wc_is_use_po_mo']) ? $options['wc_is_use_po_mo'] : 0;
419
  $this->wc_comment_text_max_length = isset($options['wc_comment_text_max_length']) ? $options['wc_comment_text_max_length'] : '';
420
+ $this->wc_load_js_css_on_home = isset($options['wc_load_js_css_on_home']) ? $options['wc_load_js_css_on_home'] : 1;
421
  }
422
 
423
  /**
563
  'wc_custom_css' => $this->wc_custom_css,
564
  'wc_show_plugin_powerid_by' => $this->wc_show_plugin_powerid_by,
565
  'wc_is_use_po_mo' => $this->wc_is_use_po_mo,
566
+ 'wc_comment_text_max_length' => $this->wc_comment_text_max_length,
567
+ 'wc_load_js_css_on_home' => $this->wc_load_js_css_on_home
568
  );
569
 
570
  return $options;
617
  'wc_custom_css' => '.comments-area{width:auto;}',
618
  'wc_show_plugin_powerid_by' => '0',
619
  'wc_is_use_po_mo' => '0',
620
+ 'wc_comment_text_max_length' => '',
621
+ 'wc_load_js_css_on_home' => '1'
622
  );
623
  add_option($this->wc_options_slug, serialize($options));
624
  }
options/wc-options.php CHANGED
@@ -74,6 +74,7 @@ class WC_Options {
74
  $this->wc_options_serialized->wc_show_plugin_powerid_by = isset($_POST['wc_show_plugin_powerid_by']) ? $_POST['wc_show_plugin_powerid_by'] : 0;
75
  $this->wc_options_serialized->wc_is_use_po_mo = isset($_POST['wc_is_use_po_mo']) ? $_POST['wc_is_use_po_mo'] : 0;
76
  $this->wc_options_serialized->wc_comment_text_max_length = (isset($_POST['wc_comment_text_max_length']) && intval($_POST['wc_comment_text_max_length']) && intval($_POST['wc_comment_text_max_length']) > 0) ? intval($_POST['wc_comment_text_max_length']) : '';
 
77
 
78
  $this->wc_options_serialized->update_options();
79
  }
74
  $this->wc_options_serialized->wc_show_plugin_powerid_by = isset($_POST['wc_show_plugin_powerid_by']) ? $_POST['wc_show_plugin_powerid_by'] : 0;
75
  $this->wc_options_serialized->wc_is_use_po_mo = isset($_POST['wc_is_use_po_mo']) ? $_POST['wc_is_use_po_mo'] : 0;
76
  $this->wc_options_serialized->wc_comment_text_max_length = (isset($_POST['wc_comment_text_max_length']) && intval($_POST['wc_comment_text_max_length']) && intval($_POST['wc_comment_text_max_length']) > 0) ? intval($_POST['wc_comment_text_max_length']) : '';
77
+ $this->wc_options_serialized->wc_load_js_css_on_home = isset($_POST['wc_load_js_css_on_home']) ? $_POST['wc_load_js_css_on_home'] : 0;
78
 
79
  $this->wc_options_serialized->update_options();
80
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: gVectors Team
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UC44WQM5XJFPA
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, redirect, comment redirect, first commenter, social login
5
  Requires at least: 2.7
6
- Tested up to: 4.2.3
7
- Stable tag: 2.2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -130,13 +130,18 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
130
 
131
  == Changelog ==
132
 
 
 
 
 
 
 
 
133
  = 2.2.8 =
134
  * Added : French (fr_FR) translation, thanks to Eric Malalel
135
  * Fixed Bug : You do not have sufficient permissions to access WP Super Socializer setting page
136
  * Compatibility : To make "Comments Evolved for WordPress" plugin compatible with wpDiscuz please read this support topic: https://wordpress.org/support/topic/add-compatibility-with-plugin-comments-evolved?replies=7#post-7255442
137
 
138
- IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
139
-
140
  = 2.2.7 =
141
  * Fixed Bug : Slashes removing issue
142
  * Fixed Bug : JavaScript Uncaught TypeError issue
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UC44WQM5XJFPA
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, redirect, comment redirect, first commenter, social login
5
  Requires at least: 2.7
6
+ Tested up to: 4.2.4
7
+ Stable tag: 2.2.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
130
 
131
  == Changelog ==
132
 
133
+ = 2.2.9 =
134
+ * Fixed Bug : RTL issues
135
+ * Added : Compatibility with Super Socializer social comments (tabbed comment systems)
136
+ * Added : Option to turn on/off loading of wpDiscuz JS and CSS files on home page
137
+
138
+ IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
139
+
140
  = 2.2.8 =
141
  * Added : French (fr_FR) translation, thanks to Eric Malalel
142
  * Fixed Bug : You do not have sufficient permissions to access WP Super Socializer setting page
143
  * Compatibility : To make "Comments Evolved for WordPress" plugin compatible with wpDiscuz please read this support topic: https://wordpress.org/support/topic/add-compatibility-with-plugin-comments-evolved?replies=7#post-7255442
144
 
 
 
145
  = 2.2.7 =
146
  * Fixed Bug : Slashes removing issue
147
  * Fixed Bug : JavaScript Uncaught TypeError issue
wc-css.php CHANGED
@@ -9,7 +9,7 @@ class WC_CSS {
9
  }
10
 
11
  /**
12
- * init woo discuss styles
13
  */
14
  public function init_styles() {
15
  if (is_singular()) {
9
  }
10
 
11
  /**
12
+ * init wpdiscuz styles
13
  */
14
  public function init_styles() {
15
  if (is_singular()) {
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.2.8
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/
@@ -199,6 +199,10 @@ class WC_Core {
199
  * Styles and scripts registration to use on front page
200
  */
201
  public function front_end_styles_scripts() {
 
 
 
 
202
  if (is_singular()) {
203
  $u_agent = $_SERVER['HTTP_USER_AGENT'];
204
 
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.2.9
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/
199
  * Styles and scripts registration to use on front page
200
  */
201
  public function front_end_styles_scripts() {
202
+
203
+ if(!$this->wc_options_serialized->wc_load_js_css_on_home && (is_home() || is_front_page())){
204
+ return;
205
+ }
206
  if (is_singular()) {
207
  $u_agent = $_SERVER['HTTP_USER_AGENT'];
208