Version Description
- Added: Option to redirect first commenters to "Thank You" page
- Fixed Bug: Issues with guest voting (more secure and stable)
IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
Download this release
Release Info
Developer | AdvancedCoding |
Plugin | Comments – wpDiscuz |
Version | 2.1.9 |
Comparing to | |
See all releases |
Code changes from version 2.1.8 to 2.1.9
- comment-form/tpl-comment.php +2 -6
- files/js/wc-ajax.js +24 -0
- options/options-layouts/settings-general.php +16 -0
- options/options-layouts/settings-live-update.php +38 -38
- options/options-layouts/settings-show-hide.php +3 -3
- options/options-layouts/settings-style.php +2 -2
- options/options-layouts/settings-subscription.php +42 -42
- options/wc-options-serialize.php +13 -2
- options/wc-options.php +1 -0
- readme.txt +8 -4
- wc-css.php +1 -1
- wc.php +25 -2
comment-form/tpl-comment.php
CHANGED
@@ -336,12 +336,8 @@ class WC_Comment_Template_Builder {
|
|
336 |
global $userpro;
|
337 |
$wc_profile_url = $userpro->permalink($user->ID);
|
338 |
} else if (class_exists('UM_API')) {
|
339 |
-
|
340 |
-
|
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);
|
336 |
global $userpro;
|
337 |
$wc_profile_url = $userpro->permalink($user->ID);
|
338 |
} else if (class_exists('UM_API')) {
|
339 |
+
um_fetch_user($user->ID);
|
340 |
+
$wc_profile_url = um_user_profile_url();
|
|
|
|
|
|
|
|
|
341 |
} else {
|
342 |
if (count_user_posts($user->ID)) {
|
343 |
$wc_profile_url = get_author_posts_url($user->ID);
|
files/js/wc-ajax.js
CHANGED
@@ -190,6 +190,30 @@ jQuery(document).ready(function ($) {
|
|
190 |
$('.wc_comm_form textarea').css('box-shadow', '0 0 4px -2px #d4d0ba');
|
191 |
|
192 |
notify_on_new_comment(wc_comment_post_ID, wc_new_comment_id, wc_email, notification_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
} catch (e) {
|
194 |
$('#wc_captcha-' + uniqueID).val('');
|
195 |
$('.wc_tooltipster').tooltipster({offsetY: 2});
|
190 |
$('.wc_comm_form textarea').css('box-shadow', '0 0 4px -2px #d4d0ba');
|
191 |
|
192 |
notify_on_new_comment(wc_comment_post_ID, wc_new_comment_id, wc_email, notification_type);
|
193 |
+
|
194 |
+
// call redirection if comment added successfully
|
195 |
+
if (obj.code == 1 || obj.code == -2) {
|
196 |
+
$.ajax({
|
197 |
+
type: 'POST',
|
198 |
+
url: wc_ajax_obj.url,
|
199 |
+
data: {
|
200 |
+
wc_new_comment_id: wc_new_comment_id,
|
201 |
+
action: 'wpdiscuz_comment_redirect'
|
202 |
+
}
|
203 |
+
}).done(function (redirectResponse) {
|
204 |
+
try {
|
205 |
+
var redirectObj = $.parseJSON(redirectResponse);
|
206 |
+
if (redirectObj.code == 1) {
|
207 |
+
setTimeout(function () {
|
208 |
+
window.location.href = redirectObj.redirect_to;
|
209 |
+
}, 5000)
|
210 |
+
}
|
211 |
+
} catch (e) {
|
212 |
+
|
213 |
+
}
|
214 |
+
});
|
215 |
+
}
|
216 |
+
|
217 |
} catch (e) {
|
218 |
$('#wc_captcha-' + uniqueID).val('');
|
219 |
$('.wc_tooltipster').tooltipster({offsetY: 2});
|
options/options-layouts/settings-general.php
CHANGED
@@ -121,6 +121,22 @@
|
|
121 |
</td>
|
122 |
</tr>
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
<tr valign="top">
|
125 |
<th scope="row">
|
126 |
<?php _e('Allow guests to vote on comments', WC_Core::$TEXT_DOMAIN); ?>
|
121 |
</td>
|
122 |
</tr>
|
123 |
|
124 |
+
<tr valign="top">
|
125 |
+
<th scope="row">
|
126 |
+
<?php _e('Redirect first commenter to', WC_Core::$TEXT_DOMAIN); ?>
|
127 |
+
</th>
|
128 |
+
<td>
|
129 |
+
<?php
|
130 |
+
wp_dropdown_pages(array(
|
131 |
+
'name' => 'wpdiscuz_redirect_page',
|
132 |
+
'selected' => isset($this->wc_options_serialized->wpdiscuz_redirect_page) ? $this->wc_options_serialized->wpdiscuz_redirect_page : 0,
|
133 |
+
'show_option_none' => __('Do not redirect'),
|
134 |
+
'option_none_value' => 0
|
135 |
+
));
|
136 |
+
?>
|
137 |
+
</td>
|
138 |
+
</tr>
|
139 |
+
|
140 |
<tr valign="top">
|
141 |
<th scope="row">
|
142 |
<?php _e('Allow guests to vote on comments', WC_Core::$TEXT_DOMAIN); ?>
|
options/options-layouts/settings-live-update.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
<div>
|
2 |
-
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
-
|
6 |
<tr valign="top">
|
7 |
<th scope="row" style="width:55%;">
|
8 |
<?php _e('Live update options', WC_Core::$TEXT_DOMAIN); ?>
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
</th>
|
11 |
<td>
|
12 |
-
<
|
13 |
-
<?php $
|
14 |
-
<
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
<
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
<label title="<?php _e('Always update', WC_Core::$TEXT_DOMAIN) ?>">
|
23 |
-
<input type="radio" value="1" <?php checked('1' == $wc_comment_list_update_type); ?> name="wc_comment_list_update_type" id="wc_comment_list_update_always" />
|
24 |
-
<span><?php _e('Always check for new comments and update automatically', WC_Core::$TEXT_DOMAIN) ?></span>
|
25 |
-
</label> <br/>
|
26 |
-
</fieldset>
|
27 |
</td>
|
28 |
-
|
29 |
-
|
30 |
-
<tr valign="top">
|
31 |
-
<th scope="row">
|
32 |
-
<label for="wc_comment_list_update_timer"><?php _e('Update comment list every', WC_Core::$TEXT_DOMAIN); ?></label>
|
33 |
-
</th>
|
34 |
-
<td>
|
35 |
-
<select id="wc_comment_list_update_timer" name="wc_comment_list_update_timer">
|
36 |
-
<?php $wc_comment_list_update_timer = isset($this->wc_options_serialized->wc_comment_list_update_timer) ? $this->wc_options_serialized->wc_comment_list_update_timer : 30; ?>
|
37 |
-
<option value="10" <?php selected($wc_comment_list_update_timer, '10'); ?>>10 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
38 |
-
<option value="20" <?php selected($wc_comment_list_update_timer, '20'); ?>>20 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
39 |
-
<option value="30" <?php selected($wc_comment_list_update_timer, '30'); ?>>30 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
40 |
-
<option value="60" <?php selected($wc_comment_list_update_timer, '60'); ?>>1 <?php _e('Minute', WC_Core::$TEXT_DOMAIN); ?></option>
|
41 |
-
<option value="180" <?php selected($wc_comment_list_update_timer, '180'); ?>>3 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
42 |
-
<option value="300" <?php selected($wc_comment_list_update_timer, '300'); ?>>5 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
43 |
-
<option value="600" <?php selected($wc_comment_list_update_timer, '600'); ?>>10 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
44 |
-
</select>
|
45 |
-
</td>
|
46 |
-
</tr>
|
47 |
-
|
48 |
</tbody>
|
49 |
</table>
|
50 |
</div>
|
1 |
<div>
|
2 |
+
<h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php _e('Live Update', WC_Core::$TEXT_DOMAIN); ?></h2>
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
+
|
6 |
<tr valign="top">
|
7 |
<th scope="row" style="width:55%;">
|
8 |
<?php _e('Live update options', WC_Core::$TEXT_DOMAIN); ?>
|
9 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;">If you use Shared Web Hosting you should make sure the "Live Update" function doesn't overload your server resources. This function is good for VPS and Dedicated Hosting Plans.</p>
|
10 |
+
</th>
|
11 |
+
<td>
|
12 |
+
<fieldset class="wc_comment_list_update_type">
|
13 |
+
<?php $wc_comment_list_update_type = isset($this->wc_options_serialized->wc_comment_list_update_type) ? $this->wc_options_serialized->wc_comment_list_update_type : 1; ?>
|
14 |
+
<label title="<?php _e('Never update', WC_Core::$TEXT_DOMAIN) ?>">
|
15 |
+
<input type="radio" value="0" <?php checked('0' == $wc_comment_list_update_type); ?> name="wc_comment_list_update_type" id="wc_comment_list_update_never" />
|
16 |
+
<span><?php _e('Turn off "Live Update" function', WC_Core::$TEXT_DOMAIN) ?></span>
|
17 |
+
</label> <br/>
|
18 |
+
<label title="<?php _e('Show new comment/reply buttons to update manualy', WC_Core::$TEXT_DOMAIN) ?>">
|
19 |
+
<input type="radio" value="2" <?php checked('2' == $wc_comment_list_update_type); ?> name="wc_comment_list_update_type" id="wc_comment_list_update_new" />
|
20 |
+
<span><?php _e('Always check for new comments and show update buttons', WC_Core::$TEXT_DOMAIN) ?></span>
|
21 |
+
</label><br>
|
22 |
+
<label title="<?php _e('Always update', WC_Core::$TEXT_DOMAIN) ?>">
|
23 |
+
<input type="radio" value="1" <?php checked('1' == $wc_comment_list_update_type); ?> name="wc_comment_list_update_type" id="wc_comment_list_update_always" />
|
24 |
+
<span><?php _e('Always check for new comments and update automatically', WC_Core::$TEXT_DOMAIN) ?></span>
|
25 |
+
</label> <br/>
|
26 |
+
</fieldset>
|
27 |
+
</td>
|
28 |
+
</tr>
|
29 |
+
|
30 |
+
<tr valign="top">
|
31 |
+
<th scope="row">
|
32 |
+
<label for="wc_comment_list_update_timer"><?php _e('Update comment list every', WC_Core::$TEXT_DOMAIN); ?></label>
|
33 |
</th>
|
34 |
<td>
|
35 |
+
<select id="wc_comment_list_update_timer" name="wc_comment_list_update_timer">
|
36 |
+
<?php $wc_comment_list_update_timer = isset($this->wc_options_serialized->wc_comment_list_update_timer) ? $this->wc_options_serialized->wc_comment_list_update_timer : 30; ?>
|
37 |
+
<option value="10" <?php selected($wc_comment_list_update_timer, '10'); ?>>10 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
38 |
+
<option value="20" <?php selected($wc_comment_list_update_timer, '20'); ?>>20 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
39 |
+
<option value="30" <?php selected($wc_comment_list_update_timer, '30'); ?>>30 <?php _e('Seconds', WC_Core::$TEXT_DOMAIN); ?></option>
|
40 |
+
<option value="60" <?php selected($wc_comment_list_update_timer, '60'); ?>>1 <?php _e('Minute', WC_Core::$TEXT_DOMAIN); ?></option>
|
41 |
+
<option value="180" <?php selected($wc_comment_list_update_timer, '180'); ?>>3 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
42 |
+
<option value="300" <?php selected($wc_comment_list_update_timer, '300'); ?>>5 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
43 |
+
<option value="600" <?php selected($wc_comment_list_update_timer, '600'); ?>>10 <?php _e('Minutes', WC_Core::$TEXT_DOMAIN); ?></option>
|
44 |
+
</select>
|
|
|
|
|
|
|
|
|
|
|
45 |
</td>
|
46 |
+
</tr>
|
47 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</tbody>
|
49 |
</table>
|
50 |
</div>
|
options/options-layouts/settings-show-hide.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div>
|
2 |
-
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
@@ -45,7 +45,7 @@
|
|
45 |
</label>
|
46 |
</td>
|
47 |
</tr>
|
48 |
-
|
49 |
<tr valign="top">
|
50 |
<th scope="row">
|
51 |
<?php _e('Hide Voting buttons', WC_Core::$TEXT_DOMAIN); ?>
|
@@ -79,7 +79,7 @@
|
|
79 |
</td>
|
80 |
</tr>
|
81 |
|
82 |
-
|
83 |
</tbody>
|
84 |
</table>
|
85 |
</div>
|
1 |
<div>
|
2 |
+
<h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php _e('Show/Hide Components', WC_Core::$TEXT_DOMAIN); ?></h2>
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
45 |
</label>
|
46 |
</td>
|
47 |
</tr>
|
48 |
+
|
49 |
<tr valign="top">
|
50 |
<th scope="row">
|
51 |
<?php _e('Hide Voting buttons', WC_Core::$TEXT_DOMAIN); ?>
|
79 |
</td>
|
80 |
</tr>
|
81 |
|
82 |
+
|
83 |
</tbody>
|
84 |
</table>
|
85 |
</div>
|
options/options-layouts/settings-style.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div>
|
2 |
-
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
@@ -202,7 +202,7 @@
|
|
202 |
<textarea cols="50" rows="10" class="regular-text" id="wc_custom_css" name="wc_custom_css" placeholder=""><?php echo stripslashes($this->wc_options_serialized->wc_custom_css); ?></textarea>
|
203 |
</td>
|
204 |
</tr>
|
205 |
-
|
206 |
</tbody>
|
207 |
</table>
|
208 |
</div>
|
1 |
<div>
|
2 |
+
<h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php _e('Background and Colors', WC_Core::$TEXT_DOMAIN); ?></h2>
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
202 |
<textarea cols="50" rows="10" class="regular-text" id="wc_custom_css" name="wc_custom_css" placeholder=""><?php echo stripslashes($this->wc_options_serialized->wc_custom_css); ?></textarea>
|
203 |
</td>
|
204 |
</tr>
|
205 |
+
|
206 |
</tbody>
|
207 |
</table>
|
208 |
</div>
|
options/options-layouts/settings-subscription.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div>
|
2 |
-
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
@@ -7,47 +7,47 @@
|
|
7 |
<span><?php _e('Show "Notify of all new follow-up comments"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
8 |
<span style="line-height:22px;"><?php _e('Show "Notify of new replies to all my comments"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
9 |
<span style="line-height:22px;"><?php _e('Show "Notify of new replies to this comment"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
</tbody>
|
52 |
</table>
|
53 |
</div>
|
1 |
<div>
|
2 |
+
<h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php _e('Email Subscription Settings', WC_Core::$TEXT_DOMAIN); ?> </h2>
|
3 |
<table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
|
4 |
<tbody>
|
5 |
<tr valign="top">
|
7 |
<span><?php _e('Show "Notify of all new follow-up comments"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
8 |
<span style="line-height:22px;"><?php _e('Show "Notify of new replies to all my comments"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
9 |
<span style="line-height:22px;"><?php _e('Show "Notify of new replies to this comment"', WC_Core::$TEXT_DOMAIN); ?></span><br />
|
10 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;">
|
11 |
+
<?php _e('Please keep all three or at least one of those options ON, otherwise users will not have any option for email notifications and they\'ll not get any messages.', WC_Core::$TEXT_DOMAIN) ?>
|
12 |
+
</p>
|
13 |
+
</th>
|
14 |
+
<td>
|
15 |
+
<label for="wc_show_hide_comment_checkbox">
|
16 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_show_hide_comment_checkbox == 1) ?> value="1" name="wc_show_hide_comment_checkbox" id="wc_show_hide_comment_checkbox" />
|
17 |
+
</label>
|
18 |
+
<br />
|
19 |
+
<label for="wc_show_hide_all_reply_checkbox" style="line-height:22px;">
|
20 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_show_hide_all_reply_checkbox == 1) ?> value="1" name="wc_show_hide_all_reply_checkbox" id="wc_show_hide_all_reply_checkbox" />
|
21 |
+
</label><br />
|
22 |
+
<label for="wc_show_hide_reply_checkbox" style="line-height:22px;">
|
23 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_show_hide_reply_checkbox == 1) ?> value="1" name="wc_show_hide_reply_checkbox" id="wc_show_hide_reply_checkbox" />
|
24 |
+
</label>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
<?php if (class_exists('Prompt_Comment_Form_Handling')) { ?>
|
28 |
+
<tr valign="top">
|
29 |
+
<th scope="row">
|
30 |
+
<?php _e('Use Postmatic for subscriptions and commenting by email', WC_Core::$TEXT_DOMAIN); ?>
|
31 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;"><?php _e('Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.', WC_Core::$TEXT_DOMAIN); ?></p>
|
32 |
+
</th>
|
33 |
+
<td>
|
34 |
+
<label for="wc_use_postmatic_for_comment_notification">
|
35 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_use_postmatic_for_comment_notification == 1) ?> value="1" name="wc_use_postmatic_for_comment_notification" id="wc_use_postmatic_for_comment_notification" />
|
36 |
+
</label>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<?php } ?>
|
40 |
+
<tr valign="top">
|
41 |
+
<th scope="row">
|
42 |
+
<?php _e('Keep selected the email notification of all new follow-up comments by default', WC_Core::$TEXT_DOMAIN); ?>
|
43 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;"><?php _e('If this option is checked-on, in Manage Subscriptions section of comment forms will only be displayed the "Notify of all new follow-up comments" option and this option will always be selected by default.', WC_Core::$TEXT_DOMAIN); ?> </p>
|
44 |
+
</th>
|
45 |
+
<td>
|
46 |
+
<label for="wc_comment_reply_checkboxes_default_checked">
|
47 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_comment_reply_checkboxes_default_checked == 1) ?> value="1" name="wc_comment_reply_checkboxes_default_checked" id="wc_comment_reply_checkboxes_default_checked" />
|
48 |
+
</label>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
</tbody>
|
52 |
</table>
|
53 |
</div>
|
options/wc-options-serialize.php
CHANGED
@@ -51,8 +51,8 @@ class WC_Options_Serialize {
|
|
51 |
* Default Value - Checked
|
52 |
*/
|
53 |
public $wc_is_guest_can_vote;
|
54 |
-
|
55 |
-
|
56 |
* Type - Checkbox
|
57 |
* Available Values - Checked/Unchecked
|
58 |
* Description - Load all comments on click load more button
|
@@ -291,6 +291,14 @@ class WC_Options_Serialize {
|
|
291 |
*/
|
292 |
public $wc_show_plugin_powerid_by;
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
function __construct($wc_db_helper) {
|
295 |
$this->wc_db_helper = $wc_db_helper;
|
296 |
$this->init_phrases();
|
@@ -306,6 +314,7 @@ class WC_Options_Serialize {
|
|
306 |
$this->wc_comment_list_update_type = isset($options['wc_comment_list_update_type']) ? $options['wc_comment_list_update_type'] : 0;
|
307 |
$this->wc_comment_list_update_timer = isset($options['wc_comment_list_update_timer']) ? $options['wc_comment_list_update_timer'] : 30;
|
308 |
$this->wc_comment_editable_time = isset($options['wc_comment_editable_time']) ? $options['wc_comment_editable_time'] : 900;
|
|
|
309 |
$this->wc_is_guest_can_vote = isset($options['wc_is_guest_can_vote']) ? $options['wc_is_guest_can_vote'] : 0;
|
310 |
$this->wc_load_all_comments = isset($options['wc_load_all_comments']) ? $options['wc_load_all_comments'] : 0;
|
311 |
$this->wc_voting_buttons_show_hide = $options['wc_voting_buttons_show_hide'];
|
@@ -438,6 +447,7 @@ class WC_Options_Serialize {
|
|
438 |
'wc_comment_list_update_type' => $this->wc_comment_list_update_type,
|
439 |
'wc_comment_list_update_timer' => $this->wc_comment_list_update_timer,
|
440 |
'wc_comment_editable_time' => $this->wc_comment_editable_time,
|
|
|
441 |
'wc_is_guest_can_vote' => $this->wc_is_guest_can_vote,
|
442 |
'wc_load_all_comments' => $this->wc_load_all_comments,
|
443 |
'wc_voting_buttons_show_hide' => $this->wc_voting_buttons_show_hide,
|
@@ -483,6 +493,7 @@ class WC_Options_Serialize {
|
|
483 |
'wc_comment_list_update_type' => '0',
|
484 |
'wc_comment_list_update_timer' => '30',
|
485 |
'wc_comment_editable_time' => '900',
|
|
|
486 |
'wc_is_guest_can_vote' => '1',
|
487 |
'wc_load_all_comments' => '0',
|
488 |
'wc_voting_buttons_show_hide' => '0',
|
51 |
* Default Value - Checked
|
52 |
*/
|
53 |
public $wc_is_guest_can_vote;
|
54 |
+
|
55 |
+
/**
|
56 |
* Type - Checkbox
|
57 |
* Available Values - Checked/Unchecked
|
58 |
* Description - Load all comments on click load more button
|
291 |
*/
|
292 |
public $wc_show_plugin_powerid_by;
|
293 |
|
294 |
+
/**
|
295 |
+
* Type - Dropdown menu
|
296 |
+
* Available Values - list of pages (ids)
|
297 |
+
* Description - Redirect first commenter to the selected page
|
298 |
+
* Default Value - 0
|
299 |
+
*/
|
300 |
+
public $wpdiscuz_redirect_page;
|
301 |
+
|
302 |
function __construct($wc_db_helper) {
|
303 |
$this->wc_db_helper = $wc_db_helper;
|
304 |
$this->init_phrases();
|
314 |
$this->wc_comment_list_update_type = isset($options['wc_comment_list_update_type']) ? $options['wc_comment_list_update_type'] : 0;
|
315 |
$this->wc_comment_list_update_timer = isset($options['wc_comment_list_update_timer']) ? $options['wc_comment_list_update_timer'] : 30;
|
316 |
$this->wc_comment_editable_time = isset($options['wc_comment_editable_time']) ? $options['wc_comment_editable_time'] : 900;
|
317 |
+
$this->wpdiscuz_redirect_page = isset($options['wpdiscuz_redirect_page']) ? $options['wpdiscuz_redirect_page'] : 0;
|
318 |
$this->wc_is_guest_can_vote = isset($options['wc_is_guest_can_vote']) ? $options['wc_is_guest_can_vote'] : 0;
|
319 |
$this->wc_load_all_comments = isset($options['wc_load_all_comments']) ? $options['wc_load_all_comments'] : 0;
|
320 |
$this->wc_voting_buttons_show_hide = $options['wc_voting_buttons_show_hide'];
|
447 |
'wc_comment_list_update_type' => $this->wc_comment_list_update_type,
|
448 |
'wc_comment_list_update_timer' => $this->wc_comment_list_update_timer,
|
449 |
'wc_comment_editable_time' => $this->wc_comment_editable_time,
|
450 |
+
'wpdiscuz_redirect_page' => $this->wpdiscuz_redirect_page,
|
451 |
'wc_is_guest_can_vote' => $this->wc_is_guest_can_vote,
|
452 |
'wc_load_all_comments' => $this->wc_load_all_comments,
|
453 |
'wc_voting_buttons_show_hide' => $this->wc_voting_buttons_show_hide,
|
493 |
'wc_comment_list_update_type' => '0',
|
494 |
'wc_comment_list_update_timer' => '30',
|
495 |
'wc_comment_editable_time' => '900',
|
496 |
+
'wpdiscuz_redirect_page' => '0',
|
497 |
'wc_is_guest_can_vote' => '1',
|
498 |
'wc_load_all_comments' => '0',
|
499 |
'wc_voting_buttons_show_hide' => '0',
|
options/wc-options.php
CHANGED
@@ -38,6 +38,7 @@ class WC_Options {
|
|
38 |
$this->wc_options_serialized->wc_comment_list_update_type = isset($_POST['wc_comment_list_update_type']) ? $_POST['wc_comment_list_update_type'] : 0;
|
39 |
$this->wc_options_serialized->wc_comment_list_update_timer = isset($_POST['wc_comment_list_update_timer']) ? $_POST['wc_comment_list_update_timer'] : 30;
|
40 |
$this->wc_options_serialized->wc_comment_editable_time = isset($_POST['wc_comment_editable_time']) ? $_POST['wc_comment_editable_time'] : 900;
|
|
|
41 |
$this->wc_options_serialized->wc_is_guest_can_vote = isset($_POST['wc_is_guest_can_vote']) ? $_POST['wc_is_guest_can_vote'] : 0;
|
42 |
$this->wc_options_serialized->wc_load_all_comments = isset($_POST['wc_load_all_comments']) ? $_POST['wc_load_all_comments'] : 0;
|
43 |
$this->wc_options_serialized->wc_voting_buttons_show_hide = isset($_POST['wc_voting_buttons_show_hide']) ? $_POST['wc_voting_buttons_show_hide'] : 0;
|
38 |
$this->wc_options_serialized->wc_comment_list_update_type = isset($_POST['wc_comment_list_update_type']) ? $_POST['wc_comment_list_update_type'] : 0;
|
39 |
$this->wc_options_serialized->wc_comment_list_update_timer = isset($_POST['wc_comment_list_update_timer']) ? $_POST['wc_comment_list_update_timer'] : 30;
|
40 |
$this->wc_options_serialized->wc_comment_editable_time = isset($_POST['wc_comment_editable_time']) ? $_POST['wc_comment_editable_time'] : 900;
|
41 |
+
$this->wc_options_serialized->wpdiscuz_redirect_page = isset($_POST['wpdiscuz_redirect_page']) ? $_POST['wpdiscuz_redirect_page'] : 0;
|
42 |
$this->wc_options_serialized->wc_is_guest_can_vote = isset($_POST['wc_is_guest_can_vote']) ? $_POST['wc_is_guest_can_vote'] : 0;
|
43 |
$this->wc_options_serialized->wc_load_all_comments = isset($_POST['wc_load_all_comments']) ? $_POST['wc_load_all_comments'] : 0;
|
44 |
$this->wc_options_serialized->wc_voting_buttons_show_hide = isset($_POST['wc_voting_buttons_show_hide']) ? $_POST['wc_voting_buttons_show_hide'] : 0;
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -127,6 +127,12 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= 2.1.8 =
|
131 |
* Added: Option to allow guests vote for comments
|
132 |
* Added: Option to load rest of all comments using the Load More Comments button
|
@@ -135,8 +141,6 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
|
|
135 |
* Fixed Bug: JS/CSS conflicts with WooDiscuz plugin
|
136 |
* Fixed Bug: Wrong comment time when Wordpress date format is turned on.
|
137 |
|
138 |
-
IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
|
139 |
-
|
140 |
= 2.1.7 =
|
141 |
* Fixed Bug: Ultimate Member Integration problem on WEB Servers w/o DomObject support
|
142 |
(SyntaxError: Unexpected token ... )
|
@@ -273,4 +277,4 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
|
|
273 |
* Fixed Bug : Layout Issues with some themes
|
274 |
|
275 |
= 1.0.0 =
|
276 |
-
Initial version
|
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.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 2.1.9 =
|
131 |
+
* Added: Option to redirect first commenters to "Thank You" page
|
132 |
+
* Fixed Bug: Issues with guest voting (more secure and stable)
|
133 |
+
|
134 |
+
IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
|
135 |
+
|
136 |
= 2.1.8 =
|
137 |
* Added: Option to allow guests vote for comments
|
138 |
* Added: Option to load rest of all comments using the Load More Comments button
|
141 |
* Fixed Bug: JS/CSS conflicts with WooDiscuz plugin
|
142 |
* Fixed Bug: Wrong comment time when Wordpress date format is turned on.
|
143 |
|
|
|
|
|
144 |
= 2.1.7 =
|
145 |
* Fixed Bug: Ultimate Member Integration problem on WEB Servers w/o DomObject support
|
146 |
(SyntaxError: Unexpected token ... )
|
277 |
* Fixed Bug : Layout Issues with some themes
|
278 |
|
279 |
= 1.0.0 =
|
280 |
+
Initial version
|
wc-css.php
CHANGED
@@ -14,7 +14,7 @@ class WC_CSS {
|
|
14 |
public function init_styles() {
|
15 |
if (is_singular()) {
|
16 |
?>
|
17 |
-
<style type="text/css"> .wc_new_comment{ background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;} #wpcomm .wc_new_comment_and_replies .wc_new_reply{background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;}#wpcomm .wc-form-wrapper{background:<?php echo isset($this->wc_options_serialized->wc_form_bg_color) ? $this->wc_options_serialized->wc_form_bg_color : '#f9f9f9'; ?>;} #wpcomm .wc_manage_subscribtions {color: <?php echo $this->wc_options_serialized->wc_author_title_color; ?>; }#wpcomm textarea{ border:<?php echo $this->wc_options_serialized->wc_input_border_color; ?> 1px solid;}#wpcomm .wc-comment .wc-comment-right{ background:<?php echo $this->wc_options_serialized->wc_comment_bg_color; ?>;} #wpcomm .wc-reply .wc-comment-right{ background:<?php echo $this->wc_options_serialized->wc_reply_bg_color; ?>; }#wpcomm .wc-comment-text{ font-size:<?php echo isset($this->wc_options_serialized->wc_comment_text_size) ? $this->wc_options_serialized->wc_comment_text_size : '14px'; ?>;color:<?php echo $this->wc_options_serialized->wc_comment_text_color; ?>;} #wpcomm .wc-comment-author{ color:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>; }#wpcomm .wc-comment-author a{ color:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;} #wpcomm .wc-comment-label{ background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>; } #wpcomm .wc-comment-footer a, #wpcomm .wc-comment-footer span.wc_editable_comment, #wpcomm .wc-comment-footer span.wc_save_edited_comment, #wpcomm span.wc_cancel_edit { color:<?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>; } #wpcomm .wc-comment-footer .wc-vote-result{ background:<?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>;} #wpcomm .wc-reply-link, #wpcomm .wc-vote-link, #wpcomm .wc-share-link {color: <?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>; }.wc-load-more-submit {border: 1px solid <?php echo $this->wc_options_serialized->wc_input_border_color; ?>;} #wc_openModalFormAction > div#wc_response_info a.close { background: url("<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/x.png'); ?>") no-repeat;}#wpcomm .wc-comment.wc-comment-right.wc_new_loaded_comment {background: <?php echo $this->wc_options_serialized->wc_new_loaded_comment_bg_color; ?>;} <?php echo stripslashes($this->wc_options_serialized->wc_custom_css); ?> </style>
|
18 |
<?php
|
19 |
}
|
20 |
}
|
14 |
public function init_styles() {
|
15 |
if (is_singular()) {
|
16 |
?>
|
17 |
+
<style type="text/css"> .wc_new_comment{ background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;} #wpcomm .wc_new_comment_and_replies .wc_new_reply{background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;}#wpcomm .wc-form-wrapper{background:<?php echo isset($this->wc_options_serialized->wc_form_bg_color) ? $this->wc_options_serialized->wc_form_bg_color : '#f9f9f9'; ?>;} #wpcomm .wc_manage_subscribtions {color: <?php echo $this->wc_options_serialized->wc_author_title_color; ?>; }#wpcomm textarea, input[type="text"], input[type="email"]{ border:<?php echo $this->wc_options_serialized->wc_input_border_color; ?> 1px solid;}#wpcomm .wc-comment .wc-comment-right{ background:<?php echo $this->wc_options_serialized->wc_comment_bg_color; ?>;} #wpcomm .wc-reply .wc-comment-right{ background:<?php echo $this->wc_options_serialized->wc_reply_bg_color; ?>; }#wpcomm .wc-comment-text{ font-size:<?php echo isset($this->wc_options_serialized->wc_comment_text_size) ? $this->wc_options_serialized->wc_comment_text_size : '14px'; ?>;color:<?php echo $this->wc_options_serialized->wc_comment_text_color; ?>;} #wpcomm .wc-comment-author{ color:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>; }#wpcomm .wc-comment-author a{ color:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>;} #wpcomm .wc-comment-label{ background:<?php echo $this->wc_options_serialized->wc_author_title_color; ?>; } #wpcomm .wc-comment-footer a, #wpcomm .wc-comment-footer span.wc_editable_comment, #wpcomm .wc-comment-footer span.wc_save_edited_comment, #wpcomm span.wc_cancel_edit { color:<?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>; } #wpcomm .wc-comment-footer .wc-vote-result{ background:<?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>;} #wpcomm .wc-reply-link, #wpcomm .wc-vote-link, #wpcomm .wc-share-link {color: <?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>; }.wc-load-more-submit {border: 1px solid <?php echo $this->wc_options_serialized->wc_input_border_color; ?>;} #wc_openModalFormAction > div#wc_response_info a.close { background: url("<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/x.png'); ?>") no-repeat;}#wpcomm .wc-comment.wc-comment-right.wc_new_loaded_comment {background: <?php echo $this->wc_options_serialized->wc_new_loaded_comment_bg_color; ?>;} <?php echo stripslashes($this->wc_options_serialized->wc_custom_css); ?> </style>
|
18 |
<?php
|
19 |
}
|
20 |
}
|
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.
|
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/
|
@@ -78,6 +78,9 @@ class WC_Core {
|
|
78 |
add_action('wp_ajax_wc_list_new_comments', array(&$this, 'wc_list_new_comments'));
|
79 |
add_action('wp_ajax_nopriv_wc_list_new_comments', array(&$this, 'wc_list_new_comments'));
|
80 |
|
|
|
|
|
|
|
81 |
if ($this->wc_options_serialized->wc_comment_editable_time) {
|
82 |
add_action('wp_ajax_wc_get_editable_comment_content', array(&$this, 'wc_get_editable_comment_content'));
|
83 |
add_action('wp_ajax_nopriv_wc_get_editable_comment_content', array(&$this, 'wc_get_editable_comment_content'));
|
@@ -385,6 +388,26 @@ class WC_Core {
|
|
385 |
exit;
|
386 |
}
|
387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
/**
|
389 |
* vote on comment via ajax
|
390 |
*/
|
@@ -400,7 +423,7 @@ class WC_Core {
|
|
400 |
$messageArray = array();
|
401 |
$messageArray['code'] = -1;
|
402 |
$comment_id = '';
|
403 |
-
if (!$this->wc_options_serialized->wc_is_guest_can_vote) {
|
404 |
$messageArray['message'] = $this->wc_options_serialized->wc_phrases['wc_login_to_vote'];
|
405 |
echo json_encode($messageArray);
|
406 |
exit();
|
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.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/
|
78 |
add_action('wp_ajax_wc_list_new_comments', array(&$this, 'wc_list_new_comments'));
|
79 |
add_action('wp_ajax_nopriv_wc_list_new_comments', array(&$this, 'wc_list_new_comments'));
|
80 |
|
81 |
+
add_action('wp_ajax_wpdiscuz_comment_redirect', array(&$this, 'wpdiscuz_comment_redirect'));
|
82 |
+
add_action('wp_ajax_nopriv_wpdiscuz_comment_redirect', array(&$this, 'wpdiscuz_comment_redirect'));
|
83 |
+
|
84 |
if ($this->wc_options_serialized->wc_comment_editable_time) {
|
85 |
add_action('wp_ajax_wc_get_editable_comment_content', array(&$this, 'wc_get_editable_comment_content'));
|
86 |
add_action('wp_ajax_nopriv_wc_get_editable_comment_content', array(&$this, 'wc_get_editable_comment_content'));
|
388 |
exit;
|
389 |
}
|
390 |
|
391 |
+
/**
|
392 |
+
* redirect first commenter to the selected page from options
|
393 |
+
*/
|
394 |
+
public function wpdiscuz_comment_redirect() {
|
395 |
+
$message_array = array();
|
396 |
+
$wc_comment_id = intval(filter_input(INPUT_POST, 'wc_new_comment_id'));
|
397 |
+
if ($wc_comment_id) {
|
398 |
+
$comment = get_comment($wc_comment_id);
|
399 |
+
if ($comment->comment_ID) {
|
400 |
+
$wc_user_comment_count = get_comments(array('author_email' => $comment->comment_author_email, 'count' => true));
|
401 |
+
if ($wc_user_comment_count == 1) {
|
402 |
+
$message_array['code'] = 1;
|
403 |
+
$message_array['redirect_to'] = get_permalink($this->wc_options_serialized->wpdiscuz_redirect_page);
|
404 |
+
}
|
405 |
+
}
|
406 |
+
}
|
407 |
+
echo json_encode($message_array);
|
408 |
+
exit();
|
409 |
+
}
|
410 |
+
|
411 |
/**
|
412 |
* vote on comment via ajax
|
413 |
*/
|
423 |
$messageArray = array();
|
424 |
$messageArray['code'] = -1;
|
425 |
$comment_id = '';
|
426 |
+
if (!$this->wc_options_serialized->wc_is_guest_can_vote && !is_user_logged_in()) {
|
427 |
$messageArray['message'] = $this->wc_options_serialized->wc_phrases['wc_login_to_vote'];
|
428 |
echo json_encode($messageArray);
|
429 |
exit();
|