Version Description
- Added: Text character countdown if the max limit is set by admin
- Added: Option to on/off certain notification types in subscription bar
- Added: Option to enable "new reply to my comment notifications" by default
- Added: Front-end Hungarian (hu_HU) translation, thanks to Balazs E. Pataki
- Fixed Bug: Back-slashing issue with apostrophes and quotes
- Fixed Bug: Small bugs with live update
- Fixed Bug: Problems with Lazy load on some servers
- Fixed Bug: Lost "Notify of new replies to this comment" subscription option
- Fixed Bug: Solution to avoid ultimate member upload avatar issue
- Fixed Bug: On some cases Read More function was not working after [Load More]
- Fixed Bug: Ultimate member avatar issue after deleting account
- New Addon: wpDiscuz - Emoticons
- New Addon: wpDiscuz - Media Uploader
IMPORTANT:
- If you have JetPack installed please deactivate Jetpack comments, it affects wpDiscuz
- If you have a Cache Plugin and CDN, please delete all caches and purge CDN after wpDiscuz update.
Download this release
Release Info
Developer | AdvancedCoding |
Plugin | Comments – wpDiscuz |
Version | 3.2.6 |
Comparing to | |
See all releases |
Code changes from version 3.2.5 to 3.2.6
- assets/addons/emoticons/header-off.png +0 -0
- assets/addons/emoticons/header.png +0 -0
- assets/addons/fileuploader/file-uploader.png +0 -0
- assets/addons/uploader/header-off.png +0 -0
- assets/addons/uploader/header.png +0 -0
- assets/css/options-css.min.css +1 -1
- assets/css/wpdiscuz-rtl.min.css +2 -0
- assets/css/wpdiscuz.min.css +13 -3
- assets/js/wpdiscuz.js +140 -69
- assets/js/wpdiscuz.min.js +1 -1
- assets/third-party/validator/validator.js +5 -0
- assets/third-party/validator/validator.min.css +30 -1
- assets/third-party/validator/validator.min.js +2 -2
- class.WpdiscuzCore.php +51 -47
- includes/class.WpdiscuzCss.php +5 -3
- languages/wpdiscuz-hu_HU.mo +0 -0
- languages/wpdiscuz-hu_HU.po +1286 -0
- manager/class.WpdiscuzDBManager.php +12 -12
- options/class.WpdiscuzOptions.php +16 -14
- options/class.WpdiscuzOptionsSerialized.php +24 -0
- options/html-addons.php +6 -12
- options/html-options.php +2 -0
- options/options-layouts/settings-subscription.php +58 -28
- readme.txt +25 -2
- templates/comment/class.WpdiscuzWalker.php +21 -17
- templates/comment/comment-form.php +23 -12
- utils/class.WpdiscuzHelper.php +31 -16
- utils/class.WpdiscuzOptimizationHelper.php +13 -2
assets/addons/emoticons/header-off.png
ADDED
Binary file
|
assets/addons/emoticons/header.png
ADDED
Binary file
|
assets/addons/fileuploader/file-uploader.png
DELETED
Binary file
|
assets/addons/uploader/header-off.png
ADDED
Binary file
|
assets/addons/uploader/header.png
ADDED
Binary file
|
assets/css/options-css.min.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.wc-form tr:nth-child(even){background:#fff}.wc-form tr:nth-child(odd){background:#
|
2 |
.wpdiscuz-share-buttons {display: inline-block; width: 18px; height: 18px;}
|
3 |
.wc-form input.wc_share_button {display: none;}
|
4 |
.wc-form input[type="text"].regular-text{ width:160px; }
|
1 |
+
.wc-form tr:nth-child(even){background:#fff}.wc-form tr:nth-child(odd){background:#f9f9f9}.form-table.wc-form-table tr{background:transparent}.wpdiscuz_options_page .wc-phrases-settings-form input[type="text"],.wpdiscuz_options_page .wc-phrases-settings-form textarea{width:300px}.wpdiscuz_wrap { height: 50px;width: 100%;}.wpdiscuz_progressbar {height: 50px;text-align: center;background: #f00;width: 0;}
|
2 |
.wpdiscuz-share-buttons {display: inline-block; width: 18px; height: 18px;}
|
3 |
.wc-form input.wc_share_button {display: none;}
|
4 |
.wc-form input[type="text"].regular-text{ width:160px; }
|
assets/css/wpdiscuz-rtl.min.css
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
#wpcomm .wc-comment-title{ text-align:left;}
|
2 |
#wpcomm .wc-field-comment .wc-field-textarea{margin-left:2px;margin-right:65px}
|
|
|
3 |
#wpcomm .wc-form-wrapper .avatar{margin-top:0}
|
4 |
#wpcomm .wc-field-comment .wc-field-avatararea{float:right}
|
5 |
#wpcomm .wc-form-footer { margin-right: 65px; margin-left: 0px; }
|
@@ -58,3 +59,4 @@
|
|
58 |
}
|
59 |
.wpdiscuz_clear_right{ clear:left; }
|
60 |
.wpdiscuz_clear_left{ clear:right; }
|
|
1 |
#wpcomm .wc-comment-title{ text-align:left;}
|
2 |
#wpcomm .wc-field-comment .wc-field-textarea{margin-left:2px;margin-right:65px}
|
3 |
+
#wpcomm .wc-field-comment .wc-field-textarea .commentTextMaxLength{left:5px; right:inherit; }
|
4 |
#wpcomm .wc-form-wrapper .avatar{margin-top:0}
|
5 |
#wpcomm .wc-field-comment .wc-field-avatararea{float:right}
|
6 |
#wpcomm .wc-form-footer { margin-right: 65px; margin-left: 0px; }
|
59 |
}
|
60 |
.wpdiscuz_clear_right{ clear:left; }
|
61 |
.wpdiscuz_clear_left{ clear:right; }
|
62 |
+
#wpcomm .wpdiscuz-textarea-wrap .wpdiscuz-textarea-foot{ text-align:left; }
|
assets/css/wpdiscuz.min.css
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
.wpdiscuz-item input {border-radius: 0;height: auto;width: auto}
|
8 |
#wpcomm form {margin: 0!important;padding: 0!important;background: none;border: 0;width: auto!important}
|
9 |
#wpcomm form div {margin: 0}
|
10 |
-
#wc_show_hide_loggedin_username {padding: 10px 5px 5px 5px;font-size: 13px}
|
11 |
#wpcomm .wc_new_comment_and_replies {margin: 0;padding: 0;width: 100%;height: auto;background: transparent}
|
12 |
#wpcomm .wc_new_comment_and_replies .wc_new_comment {float: right;display: none;padding: 3px 10px;font-size: 12px;margin: 1px 0 1px 3px;cursor: pointer;color: #fff;line-height: 15px}
|
13 |
#wpcomm .wc_new_comment_and_replies .wc_new_reply {float: right;display: none;padding: 3px 10px;font-size: 12px;margin: 1px 0 1px 1px;cursor: pointer;color: #fff;line-height: 15px}
|
@@ -16,7 +16,17 @@
|
|
16 |
#wpcomm .wc-form-wrapper {padding: 10px;margin-top: 0px;border: 1px solid #f1f1f1;clear: both;}
|
17 |
#wpcomm .wc-field-comment {margin: 5px auto 1px auto}
|
18 |
#wpcomm .wc-field-comment .wc-field-avatararea {width: 60px;float: left}
|
19 |
-
#wpcomm .wc-field-comment .wc-field-textarea {margin-left: 65px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
#wpcomm .wc-field-name input[type="text"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
21 |
#wpcomm .wc-field-website input[type="url"], #wpcomm .wc-field-website input[type="text"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
22 |
#wpcomm .wc-field-email input[type="email"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
@@ -107,7 +117,7 @@
|
|
107 |
.wpdiscuz-nofollow, .wpdiscuz-nofollow:hover {text-decoration: none!important;}
|
108 |
#wpcomm .wc-field-comment textarea, #wpcomm .wc-comment .wc-comment-right textarea {display: inline;}
|
109 |
#wpcomm .input-text, #wpcomm input[type="text"], #wpcomm input[type="input"], #wpcomm input[type="password"], #wpcomm input[type="email"], #wpcomm input[type="number"], #wpcomm input[type="url"], #wpcomm input[type="tel"], #wpcomm input[type="search"], #wpcomm textarea, #wpcomm select {margin: 0px;}
|
110 |
-
.wc_msg_required_fields, .wc_invalid_field, .wc_invalid_captcha, .wc_error_url_text, .wc_error_email_text, .wpdiscuz-sendmail-error, .wc_msg_input_min_length, .wc_msg_input_max_length, .wc_login_to_vote, .wc_deny_voting_from_same_ip, .wc_self_vote, .wc_vote_only_one_time, .wc_voting_error, .wc_comment_edit_not_possible, .wc_comment_not_updated, .wc_comment_not_edited {background-color: #FCE8E8 !important;font-size: 14px;text-align: center;color: #CE4A66;border: #F2D3D2 1px solid;padding: 5px 10px;width: 100%;box-sizing: border-box;margin: 5px 0px;border-radius: 3px;}
|
111 |
.wc_held_for_moderate {background-color: #FCE6BF;font-size: 14px;text-align: center;color: #D3760C;border: #F9C975 1px solid;padding: 5px 10px;width: 100%;box-sizing: border-box;margin: 5px 0px;border-radius: 3px;}
|
112 |
.wpdiscuz-loading-bar {position: fixed;text-align: center;right: 0;width: 50px;border: none;background: transparent;z-index: 999999;display: none;}
|
113 |
.wpdiscuz-loading-bar-auth {top: 32px;}
|
7 |
.wpdiscuz-item input {border-radius: 0;height: auto;width: auto}
|
8 |
#wpcomm form {margin: 0!important;padding: 0!important;background: none;border: 0;width: auto!important}
|
9 |
#wpcomm form div {margin: 0}
|
10 |
+
#wc_show_hide_loggedin_username {padding: 10px 5px 5px 5px; font-size: 13px; margin: 0 auto; max-width: 950px;}
|
11 |
#wpcomm .wc_new_comment_and_replies {margin: 0;padding: 0;width: 100%;height: auto;background: transparent}
|
12 |
#wpcomm .wc_new_comment_and_replies .wc_new_comment {float: right;display: none;padding: 3px 10px;font-size: 12px;margin: 1px 0 1px 3px;cursor: pointer;color: #fff;line-height: 15px}
|
13 |
#wpcomm .wc_new_comment_and_replies .wc_new_reply {float: right;display: none;padding: 3px 10px;font-size: 12px;margin: 1px 0 1px 1px;cursor: pointer;color: #fff;line-height: 15px}
|
16 |
#wpcomm .wc-form-wrapper {padding: 10px;margin-top: 0px;border: 1px solid #f1f1f1;clear: both;}
|
17 |
#wpcomm .wc-field-comment {margin: 5px auto 1px auto}
|
18 |
#wpcomm .wc-field-comment .wc-field-avatararea {width: 60px;float: left}
|
19 |
+
#wpcomm .wc-field-comment .wc-field-textarea {margin-left: 65px; position:relative;}
|
20 |
+
#wpcomm .wc-field-comment .wc-field-textarea textarea { border:none!important; resize: none; padding:10px; }
|
21 |
+
#wpcomm .wc-field-comment .wc-field-textarea .commentTextMaxLength{ display:none; font-size:11px; color:#aaa; position:absolute; top:3px; right:5px; }
|
22 |
+
#wpcomm .wc-field-comment .wc-field-textarea .commentTextMaxLength.left10{color:#f00};
|
23 |
+
|
24 |
+
#wpcomm .wpdiscuz-textarea-wrap{ padding:0px; margin:0px; background:transparent; }
|
25 |
+
#wpcomm .wpdiscuz-textarea-foot{ border:none; padding:3px 0px; width:97%; text-align:right; line-height:14px; margin:0px auto; border-top:1px dotted #ddd; }
|
26 |
+
#wpcomm .wpdiscuz-textarea-foot .wpdiscuz-button{line-height:14px;display:inline-block;min-width:20px; width:auto; height:20px;padding:0px;margin:2px 3px;cursor:pointer;border:none;float:none;}
|
27 |
+
#wpcomm .wpdiscuz-textarea-foot label{ float:none; display:inline-block;}
|
28 |
+
|
29 |
+
|
30 |
#wpcomm .wc-field-name input[type="text"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
31 |
#wpcomm .wc-field-website input[type="url"], #wpcomm .wc-field-website input[type="text"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
32 |
#wpcomm .wc-field-email input[type="email"] {width: 100%;max-width: 100%;padding: 3px 5px;font-size: 14px;margin: 0;height: 29px}
|
117 |
.wpdiscuz-nofollow, .wpdiscuz-nofollow:hover {text-decoration: none!important;}
|
118 |
#wpcomm .wc-field-comment textarea, #wpcomm .wc-comment .wc-comment-right textarea {display: inline;}
|
119 |
#wpcomm .input-text, #wpcomm input[type="text"], #wpcomm input[type="input"], #wpcomm input[type="password"], #wpcomm input[type="email"], #wpcomm input[type="number"], #wpcomm input[type="url"], #wpcomm input[type="tel"], #wpcomm input[type="search"], #wpcomm textarea, #wpcomm select {margin: 0px;}
|
120 |
+
.wc_msg_required_fields, .wc_invalid_field, .wc_invalid_captcha, .wc_error_url_text, .wc_error_email_text, .wpdiscuz-sendmail-error, .wc_msg_input_min_length, .wc_msg_input_max_length, .wc_login_to_vote, .wc_deny_voting_from_same_ip, .wc_self_vote, .wc_vote_only_one_time, .wc_voting_error, .wc_comment_edit_not_possible, .wc_comment_not_updated, .wc_comment_not_edited, .msgNotAllowedFiles, msgMaxFileCount, .msgMaxFileSize, .msgPostMaxSize {background-color: #FCE8E8 !important;font-size: 14px;text-align: center;color: #CE4A66;border: #F2D3D2 1px solid;padding: 5px 10px;width: 100%;box-sizing: border-box;margin: 5px 0px;border-radius: 3px;}
|
121 |
.wc_held_for_moderate {background-color: #FCE6BF;font-size: 14px;text-align: center;color: #D3760C;border: #F9C975 1px solid;padding: 5px 10px;width: 100%;box-sizing: border-box;margin: 5px 0px;border-radius: 3px;}
|
122 |
.wpdiscuz-loading-bar {position: fixed;text-align: center;right: 0;width: 50px;border: none;background: transparent;z-index: 999999;display: none;}
|
123 |
.wpdiscuz-loading-bar-auth {top: 32px;}
|
assets/js/wpdiscuz.js
CHANGED
@@ -1,32 +1,33 @@
|
|
1 |
jQuery(document).ready(function ($) {
|
2 |
-
$('body').addClass('wpdiscuz_' +
|
3 |
-
wpdiscuzValidator.message['invalid'] =
|
4 |
-
wpdiscuzValidator.message['empty'] =
|
5 |
-
wpdiscuzValidator.message['email'] =
|
6 |
-
wpdiscuzValidator.message['url'] =
|
7 |
-
wpdiscuzValidator.message['min'] =
|
8 |
-
wpdiscuzValidator.message['max'] =
|
9 |
-
|
10 |
-
var isUserLoggedIn =
|
11 |
-
var isShowCaptchaForGuests =
|
12 |
-
var isShowCaptchaForMembers =
|
13 |
-
var isCaptchaInSession =
|
14 |
-
var commentListLoadType =
|
15 |
-
var wordpressIsPaginate =
|
16 |
-
var wpdiscuzPostId =
|
17 |
-
var commentListUpdateType =
|
18 |
-
var commentListUpdateTimer =
|
19 |
-
var disableGuestsLiveUpdate =
|
20 |
-
var loadLastCommentId =
|
21 |
-
var wpdiscuzCommentOrder =
|
22 |
-
var commentsVoteOrder =
|
23 |
-
var storeCommenterData =
|
24 |
var wpdiscuzLoadCount = 1;
|
25 |
var wpdiscuzCommentOrderBy = 'comment_date_gmt';
|
26 |
var wpdiscuzReplyArray = [];
|
27 |
var wpdiscuzCommentArray = [];
|
28 |
-
var wpdiscuzRecaptcha =
|
29 |
-
var wpdiscuzUploader =
|
|
|
30 |
|
31 |
addTooltipster();
|
32 |
loginButtonsClone();
|
@@ -37,7 +38,7 @@ jQuery(document).ready(function ($) {
|
|
37 |
} else {
|
38 |
$('.wpdiscuz-date-sort-' + wpdiscuzCommentOrder).addClass('wpdiscuz-sort-button-active');
|
39 |
}
|
40 |
-
$('#wc_unsubscribe_message').delay(
|
41 |
$(this).remove();
|
42 |
location.href = location.href.substring(0, location.href.indexOf('subscribeAnchor') - 1);
|
43 |
});
|
@@ -59,9 +60,23 @@ jQuery(document).ready(function ($) {
|
|
59 |
$(this).autoGrow();
|
60 |
}
|
61 |
var parent = $(this).parents('.wc-form-wrapper');
|
|
|
62 |
$('.wc-form-footer', parent).slideDown(700);
|
63 |
});
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
$(document).delegate('.wc-share-link', 'click', function () {
|
66 |
var parent = $(this).parents('.wc-comment-right');
|
67 |
$('.share_buttons_box', parent).slideToggle(1000);
|
@@ -76,18 +91,18 @@ jQuery(document).ready(function ($) {
|
|
76 |
var toggleSpan = $(this);
|
77 |
$('#wc-comm-' + uniqueID + '> .wc-reply').slideToggle(700, function () {
|
78 |
if ($(this).is(':hidden')) {
|
79 |
-
toggleSpan.html(
|
80 |
} else {
|
81 |
-
toggleSpan.html(
|
82 |
}
|
83 |
});
|
84 |
});
|
85 |
|
86 |
$(document).delegate('.wc-new-loaded-comment', 'mouseenter', function () {
|
87 |
if ($(this).hasClass('wc-reply')) {
|
88 |
-
$('>.wc-comment-right', this).css('backgroundColor',
|
89 |
} else {
|
90 |
-
$('>.wc-comment-right', this).css('backgroundColor',
|
91 |
}
|
92 |
});
|
93 |
//============================== CAPTCHA ============================== //
|
@@ -151,11 +166,11 @@ jQuery(document).ready(function ($) {
|
|
151 |
if (!wcForm.hasClass('wc_main_comm_form')) {
|
152 |
depth = getCommentDepth($(this).parents('.wc-comment'));
|
153 |
}
|
154 |
-
if (!
|
155 |
$('.wc_email', wcForm).attr('required', 'required');
|
156 |
}
|
157 |
|
158 |
-
if (!
|
159 |
$('.wc_email', wcForm).removeAttr('required');
|
160 |
$('.wc_email', wcForm).next('.alert').html('');
|
161 |
}
|
@@ -163,37 +178,53 @@ jQuery(document).ready(function ($) {
|
|
163 |
if (wpdiscuzValidator.checkAll(wcForm)) {
|
164 |
var data = new FormData();
|
165 |
data.append('action', 'addComment');
|
166 |
-
var inputs = $(
|
167 |
inputs.each(function () {
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
});
|
170 |
|
171 |
data.append('wc_comment_depth', depth);
|
172 |
-
if ($('input[name="wpdiscuz_notification_type"]', wcForm).is(':checked')) {
|
173 |
-
data.append('wpdiscuz_notification_type', $('input[name="wpdiscuz_notification_type"]', wcForm).val());
|
174 |
-
}
|
175 |
|
176 |
if (wpdiscuzUploader == 1) {
|
177 |
var images = $(wcForm).find('input.wmu-image');
|
178 |
-
var
|
179 |
var files = $(wcForm).find('input.wmu-file');
|
180 |
-
|
181 |
-
$.each(
|
182 |
-
|
|
|
|
|
|
|
|
|
183 |
});
|
184 |
-
}
|
185 |
|
186 |
-
|
187 |
-
$.each(
|
188 |
-
|
|
|
|
|
|
|
|
|
189 |
});
|
190 |
-
}
|
191 |
|
192 |
-
|
193 |
-
$.each(
|
194 |
-
|
|
|
|
|
|
|
|
|
195 |
});
|
196 |
-
}
|
197 |
}
|
198 |
|
199 |
if (!wpdiscuzRecaptcha && (isShowCaptchaForGuests || isShowCaptchaForMembers) && !isCaptchaInSession) {
|
@@ -212,8 +243,8 @@ jQuery(document).ready(function ($) {
|
|
212 |
data.append('wc_email', $.cookie('wc_author_email'));
|
213 |
}
|
214 |
|
215 |
-
if (
|
216 |
-
data.append('wpdiscuz_zs',
|
217 |
}
|
218 |
|
219 |
getAjaxObj(data).done(function (response) {
|
@@ -242,11 +273,19 @@ jQuery(document).ready(function ($) {
|
|
242 |
wcForm.get(0).reset();
|
243 |
setCookieInForm();
|
244 |
displayShowHideReplies();
|
245 |
-
$('.wc_comment', wcForm)
|
|
|
|
|
246 |
$('.wmu-preview-wrap', wcForm).remove();
|
|
|
|
|
|
|
247 |
} else {
|
248 |
-
message =
|
249 |
-
|
|
|
|
|
|
|
250 |
}
|
251 |
} catch (e) {
|
252 |
if (response.indexOf('<') >= 0 && response.indexOf('>') >= 0) {
|
@@ -254,7 +293,7 @@ jQuery(document).ready(function ($) {
|
|
254 |
} else {
|
255 |
message = response;
|
256 |
}
|
257 |
-
|
258 |
}
|
259 |
addTooltipster();
|
260 |
$('.wpdiscuz-loading-bar').hide();
|
@@ -361,8 +400,8 @@ jQuery(document).ready(function ($) {
|
|
361 |
$('#wc-comm-' + uniqueID + ' > .wc-comment-right .wc-comment-footer .wc_editable_comment').hide();
|
362 |
$('#wc-comm-' + uniqueID + ' > .wc-comment-right .wc-comment-footer .wc_cancel_edit').show();
|
363 |
} else {
|
364 |
-
message =
|
365 |
-
|
366 |
}
|
367 |
} catch (e) {
|
368 |
console.log(e);
|
@@ -390,8 +429,8 @@ jQuery(document).ready(function ($) {
|
|
390 |
if (parseInt(messageKey) >= 0) {
|
391 |
wcCancelOrSave(uniqueID, obj.message);
|
392 |
} else {
|
393 |
-
message =
|
394 |
-
|
395 |
}
|
396 |
editableTextarea = '';
|
397 |
commentContent = '';
|
@@ -424,7 +463,12 @@ jQuery(document).ready(function ($) {
|
|
424 |
//============================== EDIT COMMENT FUNCTION ============================== //
|
425 |
//============================== LOAD MORE ============================== //
|
426 |
$(document).delegate('.wc-load-more-submit', 'click', function () {
|
427 |
-
|
|
|
|
|
|
|
|
|
|
|
428 |
});
|
429 |
|
430 |
var wpdiscuzHasMoreComments = $('#wpdiscuzHasMoreComments').val();
|
@@ -435,12 +479,14 @@ jQuery(document).ready(function ($) {
|
|
435 |
var scrollHeight = document.getElementById('wcThreadWrapper').scrollHeight;
|
436 |
if ($(window).scrollTop() >= scrollHeight && isRun === false && wpdiscuzHasMoreComments == 1) {
|
437 |
isRun = true;
|
438 |
-
wpdiscuzLoadComments();
|
439 |
}
|
440 |
});
|
441 |
}
|
442 |
|
443 |
-
function wpdiscuzLoadComments() {
|
|
|
|
|
444 |
var data = new FormData();
|
445 |
data.append('action', 'loadMoreComments');
|
446 |
data.append('offset', wpdiscuzLoadCount);
|
@@ -462,6 +508,8 @@ jQuery(document).ready(function ($) {
|
|
462 |
addTooltipster();
|
463 |
$('.wpdiscuz-loading-bar').hide();
|
464 |
$('.wc-load-more-submit').blur();
|
|
|
|
|
465 |
});
|
466 |
}
|
467 |
|
@@ -508,8 +556,8 @@ jQuery(document).ready(function ($) {
|
|
508 |
var voteCountDiv = $('.wc-comment-footer .wc-vote-result', $('#comment-' + commentID));
|
509 |
$(voteCountDiv).text(parseInt($(voteCountDiv).text()) + voteType);
|
510 |
} else {
|
511 |
-
message =
|
512 |
-
|
513 |
}
|
514 |
} catch (e) {
|
515 |
console.log(e);
|
@@ -626,14 +674,14 @@ jQuery(document).ready(function ($) {
|
|
626 |
var newRepliesArrayLength = wpdiscuzReplyArray.length;
|
627 |
if (newCommentArrayLength > 0) {
|
628 |
var newCommentText = newCommentArrayLength + ' ';
|
629 |
-
newCommentText += newCommentArrayLength > 1 ?
|
630 |
$('.wc_new_comment').html(newCommentText).show();
|
631 |
} else {
|
632 |
$('.wc_new_comment').hide();
|
633 |
}
|
634 |
if (newRepliesArrayLength > 0) {
|
635 |
var newReplyText = newRepliesArrayLength + ' ';
|
636 |
-
newReplyText += newRepliesArrayLength > 1 ?
|
637 |
$('.wc_new_reply').html(newReplyText).show();
|
638 |
} else {
|
639 |
$('.wc_new_reply').hide();
|
@@ -713,8 +761,13 @@ jQuery(document).ready(function ($) {
|
|
713 |
});
|
714 |
//============================== READ MORE ============================== //
|
715 |
//============================== FUNCTIONS ============================== //
|
716 |
-
|
717 |
-
|
|
|
|
|
|
|
|
|
|
|
718 |
var msgContainer;
|
719 |
var parentContainer;
|
720 |
if (isFormError) {
|
@@ -723,6 +776,8 @@ jQuery(document).ready(function ($) {
|
|
723 |
parentContainer = field.closest('.wc-comment');
|
724 |
}
|
725 |
msgContainer = parentContainer.children('.wpdiscuz-comment-message');
|
|
|
|
|
726 |
msgContainer.addClass(messageKey);
|
727 |
msgContainer.html(message);
|
728 |
msgContainer.show().delay(4000).fadeOut(1000, function () {
|
@@ -862,7 +917,7 @@ jQuery(document).ready(function ($) {
|
|
862 |
data.append('postId', wpdiscuzPostId);
|
863 |
return $.ajax({
|
864 |
type: 'POST',
|
865 |
-
url:
|
866 |
data: data,
|
867 |
contentType: false,
|
868 |
processData: false,
|
@@ -872,5 +927,21 @@ jQuery(document).ready(function ($) {
|
|
872 |
function wpdiscuzReset() {
|
873 |
$('.wpdiscuz_reset').val("");
|
874 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
875 |
//============================== FUNCTIONS ============================== //
|
876 |
});
|
1 |
jQuery(document).ready(function ($) {
|
2 |
+
$('body').addClass('wpdiscuz_' + wpdiscuzAjaxObj.wpdiscuz_options.version);
|
3 |
+
wpdiscuzValidator.message['invalid'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_invalid_field;
|
4 |
+
wpdiscuzValidator.message['empty'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_error_empty_text;
|
5 |
+
wpdiscuzValidator.message['email'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_error_email_text;
|
6 |
+
wpdiscuzValidator.message['url'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_error_url_text;
|
7 |
+
wpdiscuzValidator.message['min'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_msg_input_min_length;
|
8 |
+
wpdiscuzValidator.message['max'] = wpdiscuzAjaxObj.wpdiscuz_options.wc_msg_input_max_length;
|
9 |
+
|
10 |
+
var isUserLoggedIn = wpdiscuzAjaxObj.wpdiscuz_options.is_user_logged_in;
|
11 |
+
var isShowCaptchaForGuests = wpdiscuzAjaxObj.wpdiscuz_options.wc_captcha_show_hide == 0 && !isUserLoggedIn;
|
12 |
+
var isShowCaptchaForMembers = wpdiscuzAjaxObj.wpdiscuz_options.wc_captcha_show_hide_for_members > 0 && isUserLoggedIn;
|
13 |
+
var isCaptchaInSession = wpdiscuzAjaxObj.wpdiscuz_options.isCaptchaInSession;
|
14 |
+
var commentListLoadType = wpdiscuzAjaxObj.wpdiscuz_options.commentListLoadType;
|
15 |
+
var wordpressIsPaginate = wpdiscuzAjaxObj.wpdiscuz_options.wordpressIsPaginate;
|
16 |
+
var wpdiscuzPostId = wpdiscuzAjaxObj.wpdiscuz_options.wc_post_id;
|
17 |
+
var commentListUpdateType = wpdiscuzAjaxObj.wpdiscuz_options.commentListUpdateType;
|
18 |
+
var commentListUpdateTimer = wpdiscuzAjaxObj.wpdiscuz_options.commentListUpdateTimer;
|
19 |
+
var disableGuestsLiveUpdate = wpdiscuzAjaxObj.wpdiscuz_options.liveUpdateGuests;
|
20 |
+
var loadLastCommentId = wpdiscuzAjaxObj.wpdiscuz_options.loadLastCommentId;
|
21 |
+
var wpdiscuzCommentOrder = wpdiscuzAjaxObj.wpdiscuz_options.wordpress_comment_order;
|
22 |
+
var commentsVoteOrder = wpdiscuzAjaxObj.wpdiscuz_options.commentsVoteOrder;
|
23 |
+
var storeCommenterData = wpdiscuzAjaxObj.wpdiscuz_options.storeCommenterData;
|
24 |
var wpdiscuzLoadCount = 1;
|
25 |
var wpdiscuzCommentOrderBy = 'comment_date_gmt';
|
26 |
var wpdiscuzReplyArray = [];
|
27 |
var wpdiscuzCommentArray = [];
|
28 |
+
var wpdiscuzRecaptcha = wpdiscuzAjaxObj.wpdiscuz_options.wpDiscuzReCaptcha;
|
29 |
+
var wpdiscuzUploader = wpdiscuzAjaxObj.wpdiscuz_options.uploader;
|
30 |
+
var commentTextMaxLength = wpdiscuzAjaxObj.wpdiscuz_options.commentTextMaxLength;
|
31 |
|
32 |
addTooltipster();
|
33 |
loginButtonsClone();
|
38 |
} else {
|
39 |
$('.wpdiscuz-date-sort-' + wpdiscuzCommentOrder).addClass('wpdiscuz-sort-button-active');
|
40 |
}
|
41 |
+
$('#wc_unsubscribe_message').delay(4000).fadeOut(1500, function () {
|
42 |
$(this).remove();
|
43 |
location.href = location.href.substring(0, location.href.indexOf('subscribeAnchor') - 1);
|
44 |
});
|
60 |
$(this).autoGrow();
|
61 |
}
|
62 |
var parent = $(this).parents('.wc-form-wrapper');
|
63 |
+
$('.commentTextMaxLength', parent).show();
|
64 |
$('.wc-form-footer', parent).slideDown(700);
|
65 |
});
|
66 |
|
67 |
+
$(document).delegate('textarea.wc_comment', 'blur', function () {
|
68 |
+
var parent = $(this).parents('.wc-form-wrapper');
|
69 |
+
$('.commentTextMaxLength', parent).hide();
|
70 |
+
});
|
71 |
+
|
72 |
+
$(document).delegate('textarea.wc_comment', 'keyup', function () {
|
73 |
+
setTextareaCharCount($(this), commentTextMaxLength);
|
74 |
+
});
|
75 |
+
|
76 |
+
$.each($('textarea.wc_comment'), function () {
|
77 |
+
setTextareaCharCount($(this), commentTextMaxLength);
|
78 |
+
});
|
79 |
+
|
80 |
$(document).delegate('.wc-share-link', 'click', function () {
|
81 |
var parent = $(this).parents('.wc-comment-right');
|
82 |
$('.share_buttons_box', parent).slideToggle(1000);
|
91 |
var toggleSpan = $(this);
|
92 |
$('#wc-comm-' + uniqueID + '> .wc-reply').slideToggle(700, function () {
|
93 |
if ($(this).is(':hidden')) {
|
94 |
+
toggleSpan.html(wpdiscuzAjaxObj.wpdiscuz_options.wc_show_replies_text + ' ∨');
|
95 |
} else {
|
96 |
+
toggleSpan.html(wpdiscuzAjaxObj.wpdiscuz_options.wc_hide_replies_text + ' ∧');
|
97 |
}
|
98 |
});
|
99 |
});
|
100 |
|
101 |
$(document).delegate('.wc-new-loaded-comment', 'mouseenter', function () {
|
102 |
if ($(this).hasClass('wc-reply')) {
|
103 |
+
$('>.wc-comment-right', this).css('backgroundColor', wpdiscuzAjaxObj.wpdiscuz_options.wc_reply_bg_color);
|
104 |
} else {
|
105 |
+
$('>.wc-comment-right', this).css('backgroundColor', wpdiscuzAjaxObj.wpdiscuz_options.wc_comment_bg_color);
|
106 |
}
|
107 |
});
|
108 |
//============================== CAPTCHA ============================== //
|
166 |
if (!wcForm.hasClass('wc_main_comm_form')) {
|
167 |
depth = getCommentDepth($(this).parents('.wc-comment'));
|
168 |
}
|
169 |
+
if (!wpdiscuzAjaxObj.wpdiscuz_options.is_email_field_required && $('.wc_email', wcForm).val()) {
|
170 |
$('.wc_email', wcForm).attr('required', 'required');
|
171 |
}
|
172 |
|
173 |
+
if (!wpdiscuzAjaxObj.wpdiscuz_options.is_email_field_required && !($('.wc_email', wcForm).val())) {
|
174 |
$('.wc_email', wcForm).removeAttr('required');
|
175 |
$('.wc_email', wcForm).next('.alert').html('');
|
176 |
}
|
178 |
if (wpdiscuzValidator.checkAll(wcForm)) {
|
179 |
var data = new FormData();
|
180 |
data.append('action', 'addComment');
|
181 |
+
var inputs = $(":input", wcForm);
|
182 |
inputs.each(function () {
|
183 |
+
if (this.name != '' && this.type != 'checkbox' && this.type != 'radio') {
|
184 |
+
data.append(this.name + '', $(this).val());
|
185 |
+
}
|
186 |
+
if (this.type == 'checkbox' || this.type == 'radio') {
|
187 |
+
if ($(this).is(':checked')) {
|
188 |
+
data.append(this.name + '', $(this).val());
|
189 |
+
}
|
190 |
+
}
|
191 |
});
|
192 |
|
193 |
data.append('wc_comment_depth', depth);
|
|
|
|
|
|
|
194 |
|
195 |
if (wpdiscuzUploader == 1) {
|
196 |
var images = $(wcForm).find('input.wmu-image');
|
197 |
+
var videos = $(wcForm).find('input.wmu-video');
|
198 |
var files = $(wcForm).find('input.wmu-file');
|
199 |
+
if (images.length > 0) {
|
200 |
+
$.each($(images), function (i, imageFile) {
|
201 |
+
if (imageFile.files.length > 0) {
|
202 |
+
$.each(imageFile.files, function (j, imageObj) {
|
203 |
+
data.append('wmu_images[' + i + ']', imageObj);
|
204 |
+
});
|
205 |
+
}
|
206 |
});
|
207 |
+
}
|
208 |
|
209 |
+
if (videos.length > 0) {
|
210 |
+
$.each($(videos), function (i, videoFile) {
|
211 |
+
if (videoFile.files.length > 0) {
|
212 |
+
$.each(videoFile.files, function (j, videoObj) {
|
213 |
+
data.append('wmu_videos[' + i + ']', videoObj);
|
214 |
+
});
|
215 |
+
}
|
216 |
});
|
217 |
+
}
|
218 |
|
219 |
+
if (files.length > 0) {
|
220 |
+
$.each($(files), function (i, file) {
|
221 |
+
if (file.files.length > 0) {
|
222 |
+
$.each(file.files, function (j, fileObj) {
|
223 |
+
data.append('wmu_files[' + i + ']', fileObj);
|
224 |
+
});
|
225 |
+
}
|
226 |
});
|
227 |
+
}
|
228 |
}
|
229 |
|
230 |
if (!wpdiscuzRecaptcha && (isShowCaptchaForGuests || isShowCaptchaForMembers) && !isCaptchaInSession) {
|
243 |
data.append('wc_email', $.cookie('wc_author_email'));
|
244 |
}
|
245 |
|
246 |
+
if (wpdiscuzAjaxObj.wpdiscuz_options.wpdiscuz_zs) {
|
247 |
+
data.append('wpdiscuz_zs', wpdiscuzAjaxObj.wpdiscuz_options.wpdiscuz_zs);
|
248 |
}
|
249 |
|
250 |
getAjaxObj(data).done(function (response) {
|
273 |
wcForm.get(0).reset();
|
274 |
setCookieInForm();
|
275 |
displayShowHideReplies();
|
276 |
+
var currTArea = $('.wc_comment', wcForm);
|
277 |
+
currTArea.css('height', '45.6px');
|
278 |
+
setTextareaCharCount(currTArea, commentTextMaxLength);
|
279 |
$('.wmu-preview-wrap', wcForm).remove();
|
280 |
+
if (wpdiscuzUploader == 1) {
|
281 |
+
$(wcForm).wmuHideAll();
|
282 |
+
}
|
283 |
} else {
|
284 |
+
message = wpdiscuzAjaxObj.wpdiscuz_options[messageKey];
|
285 |
+
if (obj.typeError != 'undefined' && obj.typeError != null) {
|
286 |
+
message += ' ' + obj.typeError;
|
287 |
+
}
|
288 |
+
wpdiscuzAjaxObj.setCommentMessage(wcForm, messageKey, message, true);
|
289 |
}
|
290 |
} catch (e) {
|
291 |
if (response.indexOf('<') >= 0 && response.indexOf('>') >= 0) {
|
293 |
} else {
|
294 |
message = response;
|
295 |
}
|
296 |
+
wpdiscuzAjaxObj.setCommentMessage(wcForm, 'wc_invalid_field', message, true);
|
297 |
}
|
298 |
addTooltipster();
|
299 |
$('.wpdiscuz-loading-bar').hide();
|
400 |
$('#wc-comm-' + uniqueID + ' > .wc-comment-right .wc-comment-footer .wc_editable_comment').hide();
|
401 |
$('#wc-comm-' + uniqueID + ' > .wc-comment-right .wc-comment-footer .wc_cancel_edit').show();
|
402 |
} else {
|
403 |
+
message = wpdiscuzAjaxObj.wpdiscuz_options[messageKey];
|
404 |
+
wpdiscuzAjaxObj.setCommentMessage(editButton, messageKey, message, false);
|
405 |
}
|
406 |
} catch (e) {
|
407 |
console.log(e);
|
429 |
if (parseInt(messageKey) >= 0) {
|
430 |
wcCancelOrSave(uniqueID, obj.message);
|
431 |
} else {
|
432 |
+
message = wpdiscuzAjaxObj.wpdiscuz_options[messageKey];
|
433 |
+
wpdiscuzAjaxObj.setCommentMessage(saveButton, messageKey, message, false);
|
434 |
}
|
435 |
editableTextarea = '';
|
436 |
commentContent = '';
|
463 |
//============================== EDIT COMMENT FUNCTION ============================== //
|
464 |
//============================== LOAD MORE ============================== //
|
465 |
$(document).delegate('.wc-load-more-submit', 'click', function () {
|
466 |
+
var loadButton = $(this);
|
467 |
+
var loaded = 'wc-loaded';
|
468 |
+
var loading = 'wc-loading';
|
469 |
+
if (loadButton.hasClass(loaded)) {
|
470 |
+
wpdiscuzLoadComments(loadButton, loaded, loading);
|
471 |
+
}
|
472 |
});
|
473 |
|
474 |
var wpdiscuzHasMoreComments = $('#wpdiscuzHasMoreComments').val();
|
479 |
var scrollHeight = document.getElementById('wcThreadWrapper').scrollHeight;
|
480 |
if ($(window).scrollTop() >= scrollHeight && isRun === false && wpdiscuzHasMoreComments == 1) {
|
481 |
isRun = true;
|
482 |
+
wpdiscuzLoadComments($('.wc-load-more-submit'));
|
483 |
}
|
484 |
});
|
485 |
}
|
486 |
|
487 |
+
function wpdiscuzLoadComments(loadButton, loaded, loading) {
|
488 |
+
loadButton.toggleClass(loaded);
|
489 |
+
loadButton.toggleClass(loading);
|
490 |
var data = new FormData();
|
491 |
data.append('action', 'loadMoreComments');
|
492 |
data.append('offset', wpdiscuzLoadCount);
|
508 |
addTooltipster();
|
509 |
$('.wpdiscuz-loading-bar').hide();
|
510 |
$('.wc-load-more-submit').blur();
|
511 |
+
loadButton.toggleClass(loaded);
|
512 |
+
loadButton.toggleClass(loading);
|
513 |
});
|
514 |
}
|
515 |
|
556 |
var voteCountDiv = $('.wc-comment-footer .wc-vote-result', $('#comment-' + commentID));
|
557 |
$(voteCountDiv).text(parseInt($(voteCountDiv).text()) + voteType);
|
558 |
} else {
|
559 |
+
message = wpdiscuzAjaxObj.wpdiscuz_options[messageKey];
|
560 |
+
wpdiscuzAjaxObj.setCommentMessage(currentVoteBtn, messageKey, message, false);
|
561 |
}
|
562 |
} catch (e) {
|
563 |
console.log(e);
|
674 |
var newRepliesArrayLength = wpdiscuzReplyArray.length;
|
675 |
if (newCommentArrayLength > 0) {
|
676 |
var newCommentText = newCommentArrayLength + ' ';
|
677 |
+
newCommentText += newCommentArrayLength > 1 ? wpdiscuzAjaxObj.wpdiscuz_options.wc_new_comments_button_text : wpdiscuzAjaxObj.wpdiscuz_options.wc_new_comment_button_text;
|
678 |
$('.wc_new_comment').html(newCommentText).show();
|
679 |
} else {
|
680 |
$('.wc_new_comment').hide();
|
681 |
}
|
682 |
if (newRepliesArrayLength > 0) {
|
683 |
var newReplyText = newRepliesArrayLength + ' ';
|
684 |
+
newReplyText += newRepliesArrayLength > 1 ? wpdiscuzAjaxObj.wpdiscuz_options.wc_new_replies_button_text : wpdiscuzAjaxObj.wpdiscuz_options.wc_new_reply_button_text;
|
685 |
$('.wc_new_reply').html(newReplyText).show();
|
686 |
} else {
|
687 |
$('.wc_new_reply').hide();
|
761 |
});
|
762 |
//============================== READ MORE ============================== //
|
763 |
//============================== FUNCTIONS ============================== //
|
764 |
+
/**
|
765 |
+
* field - the clicked element
|
766 |
+
* messagekey - the key for adding class on message container
|
767 |
+
* message - the message to add
|
768 |
+
* isformerror - whether the error is form or not
|
769 |
+
*/
|
770 |
+
wpdiscuzAjaxObj.setCommentMessage = function (field, messageKey, message, isFormError) {
|
771 |
var msgContainer;
|
772 |
var parentContainer;
|
773 |
if (isFormError) {
|
776 |
parentContainer = field.closest('.wc-comment');
|
777 |
}
|
778 |
msgContainer = parentContainer.children('.wpdiscuz-comment-message');
|
779 |
+
msgContainer.removeClass();
|
780 |
+
msgContainer.addClass('wpdiscuz-comment-message');
|
781 |
msgContainer.addClass(messageKey);
|
782 |
msgContainer.html(message);
|
783 |
msgContainer.show().delay(4000).fadeOut(1000, function () {
|
917 |
data.append('postId', wpdiscuzPostId);
|
918 |
return $.ajax({
|
919 |
type: 'POST',
|
920 |
+
url: wpdiscuzAjaxObj.url,
|
921 |
data: data,
|
922 |
contentType: false,
|
923 |
processData: false,
|
927 |
function wpdiscuzReset() {
|
928 |
$('.wpdiscuz_reset').val("");
|
929 |
}
|
930 |
+
|
931 |
+
function setTextareaCharCount(elem, count) {
|
932 |
+
if (commentTextMaxLength != null) {
|
933 |
+
var currLength = elem.val().length;
|
934 |
+
var textareaWrap = elem.parents('.wc_comm_form');
|
935 |
+
var charCountDiv = $('.commentTextMaxLength', textareaWrap);
|
936 |
+
var left = commentTextMaxLength - currLength;
|
937 |
+
if (left <= 10) {
|
938 |
+
charCountDiv.addClass('left10');
|
939 |
+
} else {
|
940 |
+
charCountDiv.removeClass('left10');
|
941 |
+
}
|
942 |
+
charCountDiv.html(left);
|
943 |
+
}
|
944 |
+
}
|
945 |
+
|
946 |
//============================== FUNCTIONS ============================== //
|
947 |
});
|
assets/js/wpdiscuz.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
|
2 |
-
jQuery(document).ready(function(H){H("body").addClass("wpdiscuz_"+wpdiscuz_ajax_obj.wpdiscuz_options.version);wpdiscuzValidator.message.invalid=wpdiscuz_ajax_obj.wpdiscuz_options.wc_invalid_field;wpdiscuzValidator.message.empty=wpdiscuz_ajax_obj.wpdiscuz_options.wc_error_empty_text;wpdiscuzValidator.message.email=wpdiscuz_ajax_obj.wpdiscuz_options.wc_error_email_text;wpdiscuzValidator.message.url=wpdiscuz_ajax_obj.wpdiscuz_options.wc_error_url_text;wpdiscuzValidator.message.min=wpdiscuz_ajax_obj.wpdiscuz_options.wc_msg_input_min_length;wpdiscuzValidator.message.max=wpdiscuz_ajax_obj.wpdiscuz_options.wc_msg_input_max_length;var W=wpdiscuz_ajax_obj.wpdiscuz_options.is_user_logged_in;var t=wpdiscuz_ajax_obj.wpdiscuz_options.wc_captcha_show_hide==0&&!W;var V=wpdiscuz_ajax_obj.wpdiscuz_options.wc_captcha_show_hide_for_members>0&&W;var B=wpdiscuz_ajax_obj.wpdiscuz_options.isCaptchaInSession;var F=wpdiscuz_ajax_obj.wpdiscuz_options.commentListLoadType;var aa=wpdiscuz_ajax_obj.wpdiscuz_options.wordpressIsPaginate;var q=wpdiscuz_ajax_obj.wpdiscuz_options.wc_post_id;var l=wpdiscuz_ajax_obj.wpdiscuz_options.commentListUpdateType;var j=wpdiscuz_ajax_obj.wpdiscuz_options.commentListUpdateTimer;var A=wpdiscuz_ajax_obj.wpdiscuz_options.liveUpdateGuests;var X=wpdiscuz_ajax_obj.wpdiscuz_options.loadLastCommentId;var a=wpdiscuz_ajax_obj.wpdiscuz_options.wordpress_comment_order;var L=wpdiscuz_ajax_obj.wpdiscuz_options.commentsVoteOrder;var D=wpdiscuz_ajax_obj.wpdiscuz_options.storeCommenterData;var b=1;var o="comment_date_gmt";var Q=[];var x=[];var n=wpdiscuz_ajax_obj.wpdiscuz_options.wpDiscuzReCaptcha;var k=wpdiscuz_ajax_obj.wpdiscuz_options.uploader;I();g();e();if(L){H(".wpdiscuz-vote-sort-up").addClass("wpdiscuz-sort-button-active");o="by_vote"}else{H(".wpdiscuz-date-sort-"+a).addClass("wpdiscuz-sort-button-active")}H("#wc_unsubscribe_message").delay(7000).fadeOut(1500,function(){H(this).remove();location.href=location.href.substring(0,location.href.indexOf("subscribeAnchor")-1)});if(H(".wc_main_comm_form").length){d()}H(document).delegate(".wc-reply-link","click",function(){if(H(this).hasClass("wpdiscuz-clonned")){H("#wc-secondary-form-wrapper-"+p(H(this),0)).slideToggle(700)}else{h(H(this))}d()});H(document).delegate("textarea.wc_comment","focus",function(){if(!(H(this).next(".autogrow-textarea-mirror").length)){H(this).autoGrow()}var ad=H(this).parents(".wc-form-wrapper");H(".wc-form-footer",ad).slideDown(700)});H(document).delegate(".wc-share-link","click",function(){var ad=H(this).parents(".wc-comment-right");H(".share_buttons_box",ad).slideToggle(1000)});H(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wc-toggle,.wc-load-more-link","click",function(ad){ad.preventDefault()});H(document).delegate(".wc-toggle","click",function(){var ae=p(H(this),0);var ad=H(this);H("#wc-comm-"+ae+"> .wc-reply").slideToggle(700,function(){if(H(this).is(":hidden")){ad.html(wpdiscuz_ajax_obj.wpdiscuz_options.wc_show_replies_text+" ∨")}else{ad.html(wpdiscuz_ajax_obj.wpdiscuz_options.wc_hide_replies_text+" ∧")}})});H(document).delegate(".wc-new-loaded-comment","mouseenter",function(){if(H(this).hasClass("wc-reply")){H(">.wc-comment-right",this).css("backgroundColor",wpdiscuz_ajax_obj.wpdiscuz_options.wc_reply_bg_color)}else{H(">.wc-comment-right",this).css("backgroundColor",wpdiscuz_ajax_obj.wpdiscuz_options.wc_comment_bg_color)}});H(document).delegate(".wc_captcha_refresh_img","click",function(){T(H(this))});function T(am){if(!n&&(t||V)){var ae=am.parents(".wc-form-wrapper");var ag=H(".wpdiscuz-cnonce",ae);if(B){var af=f();var an=H(am).prev().children(".wc_captcha_img");var ad=an.attr("src");var ak=ad.substring(0,ad.indexOf("=")+1);an.attr("src",ak+af+"&r="+Math.random());ag.attr("id",af);ag.attr("value",af)}else{var ah=new FormData();ah.append("action","generateCaptcha");var aj=ae.hasClass("wc-secondary-form-wrapper")?0:1;var ai=p(am,aj);ah.append("wpdiscuz_unique_id",ai);var al=U(ah);al.done(function(ap){try{var au=H.parseJSON(ap);if(au.code==1){var ar=H(am).prev().children(".wc_captcha_img");var av=ar.attr("src");var ao=av.lastIndexOf("/")+1;var aq=av.substring(0,ao)+au.message;ar.attr("src",aq);ag.attr("id",au.key);ag.attr("value",au.key)}}catch(at){console.log(at)}H(".wpdiscuz-loading-bar").hide()})}}}function f(){var ad="123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var ae="c";for(i=0;i<13;i++){ae+=ad[Math.floor(Math.random()*(ad.length-1)+1)]}return ae}H(document).delegate(".wc_comm_submit","click",function(){var aj=1;var ah=H(this).parents("form");if(!ah.hasClass("wc_main_comm_form")){aj=G(H(this).parents(".wc-comment"))}if(!wpdiscuz_ajax_obj.wpdiscuz_options.is_email_field_required&&H(".wc_email",ah).val()){H(".wc_email",ah).attr("required","required")}if(!wpdiscuz_ajax_obj.wpdiscuz_options.is_email_field_required&&!(H(".wc_email",ah).val())){H(".wc_email",ah).removeAttr("required");H(".wc_email",ah).next(".alert").html("")}if(wpdiscuzValidator.checkAll(ah)){var ak=new FormData();ak.append("action","addComment");var am=H(':input:not([type="checkbox"])',ah);am.each(function(){ak.append(this.name+"",H(this).val())});ak.append("wc_comment_depth",aj);if(H('input[name="wpdiscuz_notification_type"]',ah).is(":checked")){ak.append("wpdiscuz_notification_type",H('input[name="wpdiscuz_notification_type"]',ah).val())}if(k==1){var an=H(ah).find("input.wmu-image");var af=H(ah).find("input.wmu-video-audio");var ae=H(ah).find("input.wmu-file");H.each(H(an),function(ao,ap){H.each(ap.files,function(aq,ar){ak.append("wmu_images["+aq+"]",ar)})});H.each(H(af),function(ap,ao){H.each(ao.files,function(aq,ar){ak.append("wmu_videos_audios["+aq+"]",ar)})});H.each(H(ae),function(ap,ao){H.each(ao.files,function(aq,ar){ak.append("wmu_files["+aq+"]",ar)})})}if(!n&&(t||V)&&!B){var ag=H(".wc_captcha_img",ah);var ad=ag.attr("src");var al=ad.lastIndexOf("/")+1;var ai=ad.substring(al);ak.append("fileName",ai)}if(H.cookie("wc_author_name")&&!H(".wc_name",ah).val()){ak.append("wc_name",H.cookie("wc_author_name"))}if(H.cookie("wc_author_email")&&!H(".wc_email",ah).val()){ak.append("wc_email",H.cookie("wc_author_email"))}if(wpdiscuz_ajax_obj.wpdiscuz_options.wpdiscuz_zs){ak.append("wpdiscuz_zs",wpdiscuz_ajax_obj.wpdiscuz_options.wpdiscuz_zs)}U(ak).done(function(ap){var aq="";var ar="";try{var au=H.parseJSON(ap);aq=au.code;if(parseInt(aq)>=0){var ao=au.is_main;ar=au.message;H(".wc_header_text_count").html(au.wc_all_comments_count_new);if(ao){H(".wc-thread-wrapper").prepend(ar)}else{H("#wc-secondary-form-wrapper-"+aq).slideToggle(700);if(au.is_in_same_container==1){H("#wc-secondary-form-wrapper-"+aq).after(ar)}else{H("#wc-secondary-form-wrapper-"+aq).after(ar.replace("wc-reply","wc-reply wc-no-left-margin"))}}r(au);Z(au);w(ah,au);ah.get(0).reset();d();e();H(".wc_comment",ah).css("height","45.6px");H(".wmu-preview-wrap",ah).remove()}else{ar=wpdiscuz_ajax_obj.wpdiscuz_options[aq];v(ah,aq,ar,true)}}catch(at){if(ap.indexOf("<")>=0&&ap.indexOf(">")>=0){ar=at}else{ar=ap}v(ah,"wc_invalid_field",ar,true)}I();H(".wpdiscuz-loading-bar").hide()})}T(H(".wc_captcha_refresh_img",ah));P()});function r(af){if(!af.held_moderate){var ae=new FormData();ae.append("action","checkNotificationType");ae.append("comment_id",af.new_comment_id);ae.append("email",af.user_email);ae.append("isParent",af.is_main);var ad=U(ae);ad.done(function(ag){try{af=H.parseJSON(ag)}catch(ah){console.log(ah)}})}}function Z(af){if(af.redirect>0&&af.new_comment_id){var ae=new FormData();ae.append("action","redirect");ae.append("commentId",af.new_comment_id);var ad=U(ae);ad.done(function(ag){af=H.parseJSON(ag);if(af.code==1){setTimeout(function(){window.location.href=af.redirect_to},5000)}})}}function d(){if(H.cookie("wc_author_name")&&H.cookie("wc_author_name").indexOf("Anonymous")<0){H(".wc_comm_form .wc_name").val(H.cookie("wc_author_name"))}if(H.cookie("wc_author_email")&&H.cookie("wc_author_email").indexOf("@example.com")<0){H(".wc_comm_form .wc_email").val(H.cookie("wc_author_email"))}if(H.cookie("wc_author_website")){H(".wc_comm_form .wc_website").val(H.cookie("wc_author_website"))}}function w(af,ag){var ae="";var ad="";if(H(".wc_email",af).val()){ae=H(".wc_email",af).val()}else{ae=ag.user_email}if(H(".wc_name",af).val()){ad=H(".wc_name",af).val()}else{ad=ag.user_name}if(D==null){H.cookie("wc_author_email",ae);H.cookie("wc_author_name",ad);H.cookie("wc_author_website",H(".wc_website",af).val())}else{D=parseInt(D);H.cookie("wc_author_email",ae,{expires:D,path:"/"});H.cookie("wc_author_name",ad,{expires:D,path:"/"});H.cookie("wc_author_website",H(".wc_website",af).val(),{expires:D,path:"/"})}}var Y;H(document).delegate(".wc_editable_comment","click",function(){var ag=p(H(this),0);var ad=ab(ag);var af=H(this);var ae=new FormData();ae.append("action","editComment");ae.append("commentId",ad);Y=H("#wc-comm-"+ag+" .wc-comment-text").html();U(ae).done(function(ai){try{var am=H.parseJSON(ai);var ak="";var aj=am.code;if(parseInt(aj)>=0){var ah='<textarea required="required" name="wc_comment" class="wc_comment wc_field_input wc_edit_comment" id="wc_edit_comment-'+ag+'" style="min-height: 2em;">'+am.message+"</textarea>";H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-text").replaceWith(ah);document.getElementById("wc_edit_comment-"+ag).focus();H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_save_edited_comment").show();ah="";H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_editable_comment").hide();H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_cancel_edit").show()}else{ak=wpdiscuz_ajax_obj.wpdiscuz_options[aj];v(af,aj,ak,false)}}catch(al){console.log(al)}H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wc_save_edited_comment","click",function(){var ai=p(H(this));var ae=ab(ai);var ad=H("#wc-comm-"+ai+" textarea#wc_edit_comment-"+ai);var af=ad.val();var ah=H(this);if(H.trim(af).length>0){var ag=new FormData();ag.append("action","saveEditedComment");ag.append("commentId",ae);ag.append("commentContent",af);U(ag).done(function(aj){try{var an=H.parseJSON(aj);var ak=an.code;var al="";if(parseInt(ak)>=0){M(ai,an.message)}else{al=wpdiscuz_ajax_obj.wpdiscuz_options[ak];v(ah,ak,al,false)}ad="";af=""}catch(am){console.log(am)}H(".wpdiscuz-loading-bar").hide()})}});H(document).delegate(".wc_cancel_edit","click",function(){var ad=p(H(this));M(ad,Y)});function M(af,ae){H("#wc-comm-"+af+" > .wc-comment-right .wc-comment-footer .wc_editable_comment").show();H("#wc-comm-"+af+" > .wc-comment-right .wc-comment-footer .wc_cancel_edit").hide();H("#wc-comm-"+af+" > .wc-comment-right .wc-comment-footer .wc_save_edited_comment").hide();var ad='<div class="wc-comment-text">'+m(ae)+"</div>";H("#wc-comm-"+af+" #wc_edit_comment-"+af).replaceWith(ad)}function m(ag,af){var ae=(af||typeof af==="undefined")?"<br/>":"<br>";var ad=(ag+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+ae+"$2");return ad.replace("<br><br>","<br/>")}H(document).delegate(".wc-load-more-submit","click",function(){K()});var s=H("#wpdiscuzHasMoreComments").val();var J=false;if(F==2&&!aa){H(".wc-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();H(window).scroll(function(){var ad=document.getElementById("wcThreadWrapper").scrollHeight;if(H(window).scrollTop()>=ad&&J===false&&s==1){J=true;K()}})}function K(){var ad=new FormData();ad.append("action","loadMoreComments");ad.append("offset",b);ad.append("orderBy",o);ad.append("order",a);ad.append("lastParentId",y());b++;U(ad).done(function(ae){try{var ag=H.parseJSON(ae);H(".wpdiscuz-comment-pagination").before(ag.comment_list);u(ag);H(".wpdiscuz_single").remove();J=false;e()}catch(af){console.log(af)}I();H(".wpdiscuz-loading-bar").hide();H(".wc-load-more-submit").blur()})}function u(ae){var ad=0;if(ae.is_show_load_more==false){ad=0;s=0;H(".wc-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()}else{S(ae.last_parent_id);s=1;ad=1}H("#wpdiscuzHasMoreComments").val(ad)}H(document).delegate(".wc_vote.wc_not_clicked","click",function(){var ad=H(this);H(ad).removeClass("wc_not_clicked");var ag="";var ah="";var ae=H(this).parents(".wc-comment-right").attr("id");ae=ae.substring(ae.lastIndexOf("-")+1);var af;if(H(this).hasClass("wc-up")){af=1}else{af=-1}var ai=new FormData();ai.append("action","voteOnComment");ai.append("commentId",ae);ai.append("voteType",af);U(ai).done(function(aj){H(ad).addClass("wc_not_clicked");try{var al=H.parseJSON(aj);ag=al.code;if(parseInt(ag)>=0){var am=H(".wc-comment-footer .wc-vote-result",H("#comment-"+ae));H(am).text(parseInt(H(am).text())+af)}else{ah=wpdiscuz_ajax_obj.wpdiscuz_options[ag];v(ad,ag,ah,false)}}catch(ak){console.log(ak)}H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wpdiscuz-sort-button","click",function(){s=H("#wpdiscuzHasMoreComments").val();if(!(H(this).hasClass("wpdiscuz-sort-button-active"))){var ag=H(this);if(H(this).hasClass("wpdiscuz-vote-sort-up")){o="by_vote";a="desc"}else{o="comment_date_gmt";a=H(this).hasClass("wpdiscuz-date-sort-desc")?"desc":"asc"}var af=new FormData();af.append("action","wpdiscuzSorting");af.append("orderBy",o);af.append("order",a);var ad="";var ae="";U(af).done(function(ah){try{var aj=H.parseJSON(ah);ad=aj.code;ae=aj.message;if(parseInt(ad)>0){H("#wpcomm .wc-thread-wrapper .wc-comment").each(function(){H(this).remove()});H("#wpcomm .wc-thread-wrapper").prepend(ae);b=parseInt(aj.loadCount)}else{}O(ag);u(aj)}catch(ai){console.log(ai)}e();I();H(".wpdiscuz-loading-bar").hide()})}});function O(ad){H(".wpdiscuz-sort-buttons .wpdiscuz-sort-button").each(function(){H(this).removeClass("wpdiscuz-sort-button-active")});ad.addClass("wpdiscuz-sort-button-active")}function ac(){var ah=location.href;var ag=ah.match(/#comment\-(\d+)/);if(ag!==null){var ae=ag[1];if(!H("#comment-"+ae).length){var af=new FormData();af.append("action","getSingleComment");af.append("commentId",ae);var ad=U(af);ad.done(function(ai){try{var ak=H.parseJSON(ai);H(".wc-thread-wrapper").prepend(ak.message);H("html, body").animate({scrollTop:H(".wc-thread-wrapper").offset().top},1000)}catch(aj){console.log(aj)}I();H(".wpdiscuz-loading-bar").hide()})}}}ac();if(l>0&&X&&(W||(!W&&!A))){setInterval(R,parseInt(j)*1000)}function R(){var ag=E();var ae=(H.cookie("wc_author_email")!=undefined&&H.cookie("wc_author_email")!="")?H.cookie("wc_author_email"):"";var af=new FormData();af.append("action","updateAutomatically");af.append("loadLastCommentId",X);af.append("visibleCommentIds",ag);af.append("email",ae);var ad=U(af);ad.done(function(ai){try{var an=H.parseJSON(ai);if(an.code==1){if(l==1){C(an)}else{x=x.concat(an.message.comments);Q=Q.concat(an.message.author_replies);var aj=x.length;var ah=Q.length;if(aj>0){var al=aj+" ";al+=aj>1?wpdiscuz_ajax_obj.wpdiscuz_options.wc_new_comments_button_text:wpdiscuz_ajax_obj.wpdiscuz_options.wc_new_comment_button_text;H(".wc_new_comment").html(al).show()}else{H(".wc_new_comment").hide()}if(ah>0){var ak=ah+" ";ak+=ah>1?wpdiscuz_ajax_obj.wpdiscuz_options.wc_new_replies_button_text:wpdiscuz_ajax_obj.wpdiscuz_options.wc_new_reply_button_text;H(".wc_new_reply").html(ak).show()}else{H(".wc_new_reply").hide()}}H(".wc_header_text_count").html(an.wc_all_comments_count_new);X=an.loadLastCommentId}}catch(am){console.log(am)}I();H(".wpdiscuz-loading-bar").hide()})}function C(ag){if(ag.message!==undefined){var ad;var af=ag.message;for(var ae=0;ae<af.length;ae++){ad=af[ae];z(ad.comment_parent,ad.comment_html)}e()}}H(document).delegate(".wc-update-on-click","click",function(){var ad=new FormData();ad.append("action","updateOnClick");var ae=H(this);if(ae.hasClass("wc_new_comment")){ad.append("newCommentIds",x.join())}else{ad.append("newCommentIds",Q.join())}U(ad).done(function(af){try{var ah=H.parseJSON(af);C(ah);if(ae.hasClass("wc_new_comment")){x=[];H(".wc_new_comment").hide()}else{Q=[];H(".wc_new_reply").hide()}}catch(ag){console.log(ag)}I();H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wpdiscuz-readmore","click",function(){var af=p(H(this));var ad=ab(af);var ae=new FormData();ae.append("action","readMore");ae.append("commentId",ad);U(ae).done(function(ag){try{var ai=H.parseJSON(ag);if(ai.code){H("#comment-"+ad+" > .wc-comment-text").html(" "+ai.message);H("#wpdiscuz-readmore-"+af).remove()}}catch(ah){console.log(ah)}H(".wpdiscuz-loading-bar").hide()})});function v(ah,ae,ag,af){var ad;var ai;if(af){ai=ah.parents(".wc-form-wrapper")}else{ai=ah.closest(".wc-comment")}ad=ai.children(".wpdiscuz-comment-message");ad.addClass(ae);ad.html(ag);ad.show().delay(4000).fadeOut(1000,function(){ad.removeClass();ad.addClass("wpdiscuz-comment-message");ad.html("")})}function h(ae){var af=p(ae,0);H("#wpdiscuz_form_anchor-"+af).before(N(af));var ad=H("#wc-secondary-form-wrapper-"+af);ad.slideToggle(700,function(){ae.addClass("wpdiscuz-clonned")});T(H(".wc_captcha_refresh_img",ad))}function N(ae){var ad=H("#wpdiscuz_hidden_secondary_form").html();return ad.replace(/wpdiscuzuniqueid/g,ae)}function p(af,ae){var ad="";if(ae){ad=af.parents(".wc-main-form-wrapper").attr("id")}else{ad=af.parents(".wc-comment").attr("id")}var ag=ad.substring(ad.lastIndexOf("-")+1);return ag}function ab(ad){return ad.substring(0,ad.indexOf("_"))}function y(){var ad=H(".wc-load-more-link").attr("href");return ad.substring(ad.lastIndexOf("=")+1)}function S(ad){var ae=H(".wc-load-more-link").attr("href");H(".wc-load-more-link").attr("href",ae.replace(/[\d]+$/m,ad));if(F!=2){H(".wpdiscuz-comment-pagination").show()}}function G(af){var ae=af.attr("class");var ad=ae.split(" ");var ag="";H.each(ad,function(ah,ai){if("wc_comment_level"===c(ai,false)){ag=c(ai,true)}});return parseInt(ag)+1}function c(ad,ae){var af="";if(ae){af=ad.substring(ad.indexOf("-")+1)}else{af=ad.substring(0,ad.indexOf("-"))}return af}function z(af,ae){if(af==0){H(".wc-thread-wrapper").prepend(ae)}else{var ad=p(H("#comment-"+af),0);H("#wpdiscuz_form_anchor-"+ad).after(ae)}}function E(){var af;var ad;var ae="";H(".wc-comment-right").each(function(){af=p(H(this),0);ad=ab(af);ae+=ad+","});return ae}function I(){H(".wc-comment-img-link").tooltipster({trigger:"click",contentAsHTML:true,interactive:true,multiple:true});H(".wc_tooltipster").tooltipster({offsetY:2,multiple:true})}function g(){if(H(".wc_social_plugin_wrapper .wp-social-login-provider-list").length){H(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .the_champ_login_container").length){H(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .social_connect_form").length){H(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .oneall_social_login_providers").length){H(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}}}}}function e(){H("#wcThreadWrapper .wc-comment").each(function(ad){if(H("> .wc-reply",this).length){H("> .wc-comment-right .wc-comment-footer .wc-toggle",this).removeClass("wpdiscuz-hidden")}})}function U(ad){if(ad.action!=="liveUpdate"){H(".wpdiscuz-loading-bar").show()}ad.append("postId",q);return H.ajax({type:"POST",url:wpdiscuz_ajax_obj.url,data:ad,contentType:false,processData:false,})}function P(){H(".wpdiscuz_reset").val("")}});
|
1 |
|
2 |
+
jQuery(document).ready(function(H){H("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.wpdiscuz_options.version);wpdiscuzValidator.message.invalid=wpdiscuzAjaxObj.wpdiscuz_options.wc_invalid_field;wpdiscuzValidator.message.empty=wpdiscuzAjaxObj.wpdiscuz_options.wc_error_empty_text;wpdiscuzValidator.message.email=wpdiscuzAjaxObj.wpdiscuz_options.wc_error_email_text;wpdiscuzValidator.message.url=wpdiscuzAjaxObj.wpdiscuz_options.wc_error_url_text;wpdiscuzValidator.message.min=wpdiscuzAjaxObj.wpdiscuz_options.wc_msg_input_min_length;wpdiscuzValidator.message.max=wpdiscuzAjaxObj.wpdiscuz_options.wc_msg_input_max_length;var W=wpdiscuzAjaxObj.wpdiscuz_options.is_user_logged_in;var t=wpdiscuzAjaxObj.wpdiscuz_options.wc_captcha_show_hide==0&&!W;var V=wpdiscuzAjaxObj.wpdiscuz_options.wc_captcha_show_hide_for_members>0&&W;var A=wpdiscuzAjaxObj.wpdiscuz_options.isCaptchaInSession;var F=wpdiscuzAjaxObj.wpdiscuz_options.commentListLoadType;var aa=wpdiscuzAjaxObj.wpdiscuz_options.wordpressIsPaginate;var q=wpdiscuzAjaxObj.wpdiscuz_options.wc_post_id;var l=wpdiscuzAjaxObj.wpdiscuz_options.commentListUpdateType;var j=wpdiscuzAjaxObj.wpdiscuz_options.commentListUpdateTimer;var z=wpdiscuzAjaxObj.wpdiscuz_options.liveUpdateGuests;var X=wpdiscuzAjaxObj.wpdiscuz_options.loadLastCommentId;var a=wpdiscuzAjaxObj.wpdiscuz_options.wordpress_comment_order;var L=wpdiscuzAjaxObj.wpdiscuz_options.commentsVoteOrder;var C=wpdiscuzAjaxObj.wpdiscuz_options.storeCommenterData;var b=1;var o="comment_date_gmt";var Q=[];var w=[];var n=wpdiscuzAjaxObj.wpdiscuz_options.wpDiscuzReCaptcha;var k=wpdiscuzAjaxObj.wpdiscuz_options.uploader;var ab=wpdiscuzAjaxObj.wpdiscuz_options.commentTextMaxLength;I();g();e();if(L){H(".wpdiscuz-vote-sort-up").addClass("wpdiscuz-sort-button-active");o="by_vote"}else{H(".wpdiscuz-date-sort-"+a).addClass("wpdiscuz-sort-button-active")}H("#wc_unsubscribe_message").delay(4000).fadeOut(1500,function(){H(this).remove();location.href=location.href.substring(0,location.href.indexOf("subscribeAnchor")-1)});if(H(".wc_main_comm_form").length){d()}H(document).delegate(".wc-reply-link","click",function(){if(H(this).hasClass("wpdiscuz-clonned")){H("#wc-secondary-form-wrapper-"+p(H(this),0)).slideToggle(700)}else{h(H(this))}d()});H(document).delegate("textarea.wc_comment","focus",function(){if(!(H(this).next(".autogrow-textarea-mirror").length)){H(this).autoGrow()}var ae=H(this).parents(".wc-form-wrapper");H(".commentTextMaxLength",ae).show();H(".wc-form-footer",ae).slideDown(700)});H(document).delegate("textarea.wc_comment","blur",function(){var ae=H(this).parents(".wc-form-wrapper");H(".commentTextMaxLength",ae).hide()});H(document).delegate("textarea.wc_comment","keyup",function(){D(H(this),ab)});H.each(H("textarea.wc_comment"),function(){D(H(this),ab)});H(document).delegate(".wc-share-link","click",function(){var ae=H(this).parents(".wc-comment-right");H(".share_buttons_box",ae).slideToggle(1000)});H(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wc-toggle,.wc-load-more-link","click",function(ae){ae.preventDefault()});H(document).delegate(".wc-toggle","click",function(){var af=p(H(this),0);var ae=H(this);H("#wc-comm-"+af+"> .wc-reply").slideToggle(700,function(){if(H(this).is(":hidden")){ae.html(wpdiscuzAjaxObj.wpdiscuz_options.wc_show_replies_text+" ∨")}else{ae.html(wpdiscuzAjaxObj.wpdiscuz_options.wc_hide_replies_text+" ∧")}})});H(document).delegate(".wc-new-loaded-comment","mouseenter",function(){if(H(this).hasClass("wc-reply")){H(">.wc-comment-right",this).css("backgroundColor",wpdiscuzAjaxObj.wpdiscuz_options.wc_reply_bg_color)}else{H(">.wc-comment-right",this).css("backgroundColor",wpdiscuzAjaxObj.wpdiscuz_options.wc_comment_bg_color)}});H(document).delegate(".wc_captcha_refresh_img","click",function(){T(H(this))});function T(an){if(!n&&(t||V)){var af=an.parents(".wc-form-wrapper");var ah=H(".wpdiscuz-cnonce",af);if(A){var ag=f();var ao=H(an).prev().children(".wc_captcha_img");var ae=ao.attr("src");var al=ae.substring(0,ae.indexOf("=")+1);ao.attr("src",al+ag+"&r="+Math.random());ah.attr("id",ag);ah.attr("value",ag)}else{var ai=new FormData();ai.append("action","generateCaptcha");var ak=af.hasClass("wc-secondary-form-wrapper")?0:1;var aj=p(an,ak);ai.append("wpdiscuz_unique_id",aj);var am=U(ai);am.done(function(aq){try{var av=H.parseJSON(aq);if(av.code==1){var at=H(an).prev().children(".wc_captcha_img");var aw=at.attr("src");var ap=aw.lastIndexOf("/")+1;var ar=aw.substring(0,ap)+av.message;at.attr("src",ar);ah.attr("id",av.key);ah.attr("value",av.key)}}catch(au){console.log(au)}H(".wpdiscuz-loading-bar").hide()})}}}function f(){var ae="123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var af="c";for(i=0;i<13;i++){af+=ae[Math.floor(Math.random()*(ae.length-1)+1)]}return af}H(document).delegate(".wc_comm_submit","click",function(){var ak=1;var ai=H(this).parents("form");if(!ai.hasClass("wc_main_comm_form")){ak=G(H(this).parents(".wc-comment"))}if(!wpdiscuzAjaxObj.wpdiscuz_options.is_email_field_required&&H(".wc_email",ai).val()){H(".wc_email",ai).attr("required","required")}if(!wpdiscuzAjaxObj.wpdiscuz_options.is_email_field_required&&!(H(".wc_email",ai).val())){H(".wc_email",ai).removeAttr("required");H(".wc_email",ai).next(".alert").html("")}if(wpdiscuzValidator.checkAll(ai)){var al=new FormData();al.append("action","addComment");var an=H(":input",ai);an.each(function(){if(this.name!=""&&this.type!="checkbox"&&this.type!="radio"){al.append(this.name+"",H(this).val())}if(this.type=="checkbox"||this.type=="radio"){if(H(this).is(":checked")){al.append(this.name+"",H(this).val())}}});al.append("wc_comment_depth",ak);if(k==1){var ao=H(ai).find("input.wmu-image");var ah=H(ai).find("input.wmu-video");var af=H(ai).find("input.wmu-file");if(ao.length>0){H.each(H(ao),function(ap,aq){if(aq.files.length>0){H.each(aq.files,function(ar,at){al.append("wmu_images["+ap+"]",at)})}})}if(ah.length>0){H.each(H(ah),function(aq,ap){if(ap.files.length>0){H.each(ap.files,function(at,ar){al.append("wmu_videos["+aq+"]",ar)})}})}if(af.length>0){H.each(H(af),function(aq,ap){if(ap.files.length>0){H.each(ap.files,function(ar,at){al.append("wmu_files["+aq+"]",at)})}})}}if(!n&&(t||V)&&!A){var ag=H(".wc_captcha_img",ai);var ae=ag.attr("src");var am=ae.lastIndexOf("/")+1;var aj=ae.substring(am);al.append("fileName",aj)}if(H.cookie("wc_author_name")&&!H(".wc_name",ai).val()){al.append("wc_name",H.cookie("wc_author_name"))}if(H.cookie("wc_author_email")&&!H(".wc_email",ai).val()){al.append("wc_email",H.cookie("wc_author_email"))}if(wpdiscuzAjaxObj.wpdiscuz_options.wpdiscuz_zs){al.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_options.wpdiscuz_zs)}U(al).done(function(ar){var at="";var au="";try{var aw=H.parseJSON(ar);at=aw.code;if(parseInt(at)>=0){var aq=aw.is_main;au=aw.message;H(".wc_header_text_count").html(aw.wc_all_comments_count_new);if(aq){H(".wc-thread-wrapper").prepend(au)}else{H("#wc-secondary-form-wrapper-"+at).slideToggle(700);if(aw.is_in_same_container==1){H("#wc-secondary-form-wrapper-"+at).after(au)}else{H("#wc-secondary-form-wrapper-"+at).after(au.replace("wc-reply","wc-reply wc-no-left-margin"))}}r(aw);Z(aw);v(ai,aw);ai.get(0).reset();d();e();var ap=H(".wc_comment",ai);ap.css("height","45.6px");D(ap,ab);H(".wmu-preview-wrap",ai).remove();if(k==1){H(ai).wmuHideAll()}}else{au=wpdiscuzAjaxObj.wpdiscuz_options[at];if(aw.typeError!="undefined"&&aw.typeError!=null){au+=" "+aw.typeError}wpdiscuzAjaxObj.setCommentMessage(ai,at,au,true)}}catch(av){if(ar.indexOf("<")>=0&&ar.indexOf(">")>=0){au=av}else{au=ar}wpdiscuzAjaxObj.setCommentMessage(ai,"wc_invalid_field",au,true)}I();H(".wpdiscuz-loading-bar").hide()})}T(H(".wc_captcha_refresh_img",ai));P()});function r(ag){if(!ag.held_moderate){var af=new FormData();af.append("action","checkNotificationType");af.append("comment_id",ag.new_comment_id);af.append("email",ag.user_email);af.append("isParent",ag.is_main);var ae=U(af);ae.done(function(ah){try{ag=H.parseJSON(ah)}catch(ai){console.log(ai)}})}}function Z(ag){if(ag.redirect>0&&ag.new_comment_id){var af=new FormData();af.append("action","redirect");af.append("commentId",ag.new_comment_id);var ae=U(af);ae.done(function(ah){ag=H.parseJSON(ah);if(ag.code==1){setTimeout(function(){window.location.href=ag.redirect_to},5000)}})}}function d(){if(H.cookie("wc_author_name")&&H.cookie("wc_author_name").indexOf("Anonymous")<0){H(".wc_comm_form .wc_name").val(H.cookie("wc_author_name"))}if(H.cookie("wc_author_email")&&H.cookie("wc_author_email").indexOf("@example.com")<0){H(".wc_comm_form .wc_email").val(H.cookie("wc_author_email"))}if(H.cookie("wc_author_website")){H(".wc_comm_form .wc_website").val(H.cookie("wc_author_website"))}}function v(ag,ah){var af="";var ae="";if(H(".wc_email",ag).val()){af=H(".wc_email",ag).val()}else{af=ah.user_email}if(H(".wc_name",ag).val()){ae=H(".wc_name",ag).val()}else{ae=ah.user_name}if(C==null){H.cookie("wc_author_email",af);H.cookie("wc_author_name",ae);H.cookie("wc_author_website",H(".wc_website",ag).val())}else{C=parseInt(C);H.cookie("wc_author_email",af,{expires:C,path:"/"});H.cookie("wc_author_name",ae,{expires:C,path:"/"});H.cookie("wc_author_website",H(".wc_website",ag).val(),{expires:C,path:"/"})}}var Y;H(document).delegate(".wc_editable_comment","click",function(){var ah=p(H(this),0);var ae=ac(ah);var ag=H(this);var af=new FormData();af.append("action","editComment");af.append("commentId",ae);Y=H("#wc-comm-"+ah+" .wc-comment-text").html();U(af).done(function(aj){try{var an=H.parseJSON(aj);var al="";var ak=an.code;if(parseInt(ak)>=0){var ai='<textarea required="required" name="wc_comment" class="wc_comment wc_field_input wc_edit_comment" id="wc_edit_comment-'+ah+'" style="min-height: 2em;">'+an.message+"</textarea>";H("#wc-comm-"+ah+" > .wc-comment-right .wc-comment-text").replaceWith(ai);document.getElementById("wc_edit_comment-"+ah).focus();H("#wc-comm-"+ah+" > .wc-comment-right .wc-comment-footer .wc_save_edited_comment").show();ai="";H("#wc-comm-"+ah+" > .wc-comment-right .wc-comment-footer .wc_editable_comment").hide();H("#wc-comm-"+ah+" > .wc-comment-right .wc-comment-footer .wc_cancel_edit").show()}else{al=wpdiscuzAjaxObj.wpdiscuz_options[ak];wpdiscuzAjaxObj.setCommentMessage(ag,ak,al,false)}}catch(am){console.log(am)}H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wc_save_edited_comment","click",function(){var aj=p(H(this));var af=ac(aj);var ae=H("#wc-comm-"+aj+" textarea#wc_edit_comment-"+aj);var ag=ae.val();var ai=H(this);if(H.trim(ag).length>0){var ah=new FormData();ah.append("action","saveEditedComment");ah.append("commentId",af);ah.append("commentContent",ag);U(ah).done(function(ak){try{var ao=H.parseJSON(ak);var al=ao.code;var am="";if(parseInt(al)>=0){M(aj,ao.message)}else{am=wpdiscuzAjaxObj.wpdiscuz_options[al];wpdiscuzAjaxObj.setCommentMessage(ai,al,am,false)}ae="";ag=""}catch(an){console.log(an)}H(".wpdiscuz-loading-bar").hide()})}});H(document).delegate(".wc_cancel_edit","click",function(){var ae=p(H(this));M(ae,Y)});function M(ag,af){H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_editable_comment").show();H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_cancel_edit").hide();H("#wc-comm-"+ag+" > .wc-comment-right .wc-comment-footer .wc_save_edited_comment").hide();var ae='<div class="wc-comment-text">'+m(af)+"</div>";H("#wc-comm-"+ag+" #wc_edit_comment-"+ag).replaceWith(ae)}function m(ah,ag){var af=(ag||typeof ag==="undefined")?"<br/>":"<br>";var ae=(ah+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+af+"$2");return ae.replace("<br><br>","<br/>")}H(document).delegate(".wc-load-more-submit","click",function(){var af=H(this);var ae="wc-loaded";var ag="wc-loading";if(af.hasClass(ae)){K(af,ae,ag)}});var s=H("#wpdiscuzHasMoreComments").val();var J=false;if(F==2&&!aa){H(".wc-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();H(window).scroll(function(){var ae=document.getElementById("wcThreadWrapper").scrollHeight;if(H(window).scrollTop()>=ae&&J===false&&s==1){J=true;K(H(".wc-load-more-submit"))}})}function K(ag,ae,ah){ag.toggleClass(ae);ag.toggleClass(ah);var af=new FormData();af.append("action","loadMoreComments");af.append("offset",b);af.append("orderBy",o);af.append("order",a);af.append("lastParentId",x());b++;U(af).done(function(ai){try{var ak=H.parseJSON(ai);H(".wpdiscuz-comment-pagination").before(ak.comment_list);u(ak);H(".wpdiscuz_single").remove();J=false;e()}catch(aj){console.log(aj)}I();H(".wpdiscuz-loading-bar").hide();H(".wc-load-more-submit").blur();ag.toggleClass(ae);ag.toggleClass(ah)})}function u(af){var ae=0;if(af.is_show_load_more==false){ae=0;s=0;H(".wc-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()}else{S(af.last_parent_id);s=1;ae=1}H("#wpdiscuzHasMoreComments").val(ae)}H(document).delegate(".wc_vote.wc_not_clicked","click",function(){var ae=H(this);H(ae).removeClass("wc_not_clicked");var ah="";var ai="";var af=H(this).parents(".wc-comment-right").attr("id");af=af.substring(af.lastIndexOf("-")+1);var ag;if(H(this).hasClass("wc-up")){ag=1}else{ag=-1}var aj=new FormData();aj.append("action","voteOnComment");aj.append("commentId",af);aj.append("voteType",ag);U(aj).done(function(ak){H(ae).addClass("wc_not_clicked");try{var am=H.parseJSON(ak);ah=am.code;if(parseInt(ah)>=0){var an=H(".wc-comment-footer .wc-vote-result",H("#comment-"+af));H(an).text(parseInt(H(an).text())+ag)}else{ai=wpdiscuzAjaxObj.wpdiscuz_options[ah];wpdiscuzAjaxObj.setCommentMessage(ae,ah,ai,false)}}catch(al){console.log(al)}H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wpdiscuz-sort-button","click",function(){s=H("#wpdiscuzHasMoreComments").val();if(!(H(this).hasClass("wpdiscuz-sort-button-active"))){var ah=H(this);if(H(this).hasClass("wpdiscuz-vote-sort-up")){o="by_vote";a="desc"}else{o="comment_date_gmt";a=H(this).hasClass("wpdiscuz-date-sort-desc")?"desc":"asc"}var ag=new FormData();ag.append("action","wpdiscuzSorting");ag.append("orderBy",o);ag.append("order",a);var ae="";var af="";U(ag).done(function(ai){try{var ak=H.parseJSON(ai);ae=ak.code;af=ak.message;if(parseInt(ae)>0){H("#wpcomm .wc-thread-wrapper .wc-comment").each(function(){H(this).remove()});H("#wpcomm .wc-thread-wrapper").prepend(af);b=parseInt(ak.loadCount)}else{}O(ah);u(ak)}catch(aj){console.log(aj)}e();I();H(".wpdiscuz-loading-bar").hide()})}});function O(ae){H(".wpdiscuz-sort-buttons .wpdiscuz-sort-button").each(function(){H(this).removeClass("wpdiscuz-sort-button-active")});ae.addClass("wpdiscuz-sort-button-active")}function ad(){var ai=location.href;var ah=ai.match(/#comment\-(\d+)/);if(ah!==null){var af=ah[1];if(!H("#comment-"+af).length){var ag=new FormData();ag.append("action","getSingleComment");ag.append("commentId",af);var ae=U(ag);ae.done(function(aj){try{var al=H.parseJSON(aj);H(".wc-thread-wrapper").prepend(al.message);H("html, body").animate({scrollTop:H(".wc-thread-wrapper").offset().top},1000)}catch(ak){console.log(ak)}I();H(".wpdiscuz-loading-bar").hide()})}}}ad();if(l>0&&X&&(W||(!W&&!z))){setInterval(R,parseInt(j)*1000)}function R(){var ah=E();var af=(H.cookie("wc_author_email")!=undefined&&H.cookie("wc_author_email")!="")?H.cookie("wc_author_email"):"";var ag=new FormData();ag.append("action","updateAutomatically");ag.append("loadLastCommentId",X);ag.append("visibleCommentIds",ah);ag.append("email",af);var ae=U(ag);ae.done(function(aj){try{var ao=H.parseJSON(aj);if(ao.code==1){if(l==1){B(ao)}else{w=w.concat(ao.message.comments);Q=Q.concat(ao.message.author_replies);var ak=w.length;var ai=Q.length;if(ak>0){var am=ak+" ";am+=ak>1?wpdiscuzAjaxObj.wpdiscuz_options.wc_new_comments_button_text:wpdiscuzAjaxObj.wpdiscuz_options.wc_new_comment_button_text;H(".wc_new_comment").html(am).show()}else{H(".wc_new_comment").hide()}if(ai>0){var al=ai+" ";al+=ai>1?wpdiscuzAjaxObj.wpdiscuz_options.wc_new_replies_button_text:wpdiscuzAjaxObj.wpdiscuz_options.wc_new_reply_button_text;H(".wc_new_reply").html(al).show()}else{H(".wc_new_reply").hide()}}H(".wc_header_text_count").html(ao.wc_all_comments_count_new);X=ao.loadLastCommentId}}catch(an){console.log(an)}I();H(".wpdiscuz-loading-bar").hide()})}function B(ah){if(ah.message!==undefined){var ae;var ag=ah.message;for(var af=0;af<ag.length;af++){ae=ag[af];y(ae.comment_parent,ae.comment_html)}e()}}H(document).delegate(".wc-update-on-click","click",function(){var ae=new FormData();ae.append("action","updateOnClick");var af=H(this);if(af.hasClass("wc_new_comment")){ae.append("newCommentIds",w.join())}else{ae.append("newCommentIds",Q.join())}U(ae).done(function(ag){try{var ai=H.parseJSON(ag);B(ai);if(af.hasClass("wc_new_comment")){w=[];H(".wc_new_comment").hide()}else{Q=[];H(".wc_new_reply").hide()}}catch(ah){console.log(ah)}I();H(".wpdiscuz-loading-bar").hide()})});H(document).delegate(".wpdiscuz-readmore","click",function(){var ag=p(H(this));var ae=ac(ag);var af=new FormData();af.append("action","readMore");af.append("commentId",ae);U(af).done(function(ah){try{var aj=H.parseJSON(ah);if(aj.code){H("#comment-"+ae+" > .wc-comment-text").html(" "+aj.message);H("#wpdiscuz-readmore-"+ag).remove()}}catch(ai){console.log(ai)}H(".wpdiscuz-loading-bar").hide()})});wpdiscuzAjaxObj.setCommentMessage=function(ai,af,ah,ag){var ae;var aj;if(ag){aj=ai.parents(".wc-form-wrapper")}else{aj=ai.closest(".wc-comment")}ae=aj.children(".wpdiscuz-comment-message");ae.removeClass();ae.addClass("wpdiscuz-comment-message");ae.addClass(af);ae.html(ah);ae.show().delay(4000).fadeOut(1000,function(){ae.removeClass();ae.addClass("wpdiscuz-comment-message");ae.html("")})};function h(af){var ag=p(af,0);H("#wpdiscuz_form_anchor-"+ag).before(N(ag));var ae=H("#wc-secondary-form-wrapper-"+ag);ae.slideToggle(700,function(){af.addClass("wpdiscuz-clonned")});T(H(".wc_captcha_refresh_img",ae))}function N(af){var ae=H("#wpdiscuz_hidden_secondary_form").html();return ae.replace(/wpdiscuzuniqueid/g,af)}function p(ag,af){var ae="";if(af){ae=ag.parents(".wc-main-form-wrapper").attr("id")}else{ae=ag.parents(".wc-comment").attr("id")}var ah=ae.substring(ae.lastIndexOf("-")+1);return ah}function ac(ae){return ae.substring(0,ae.indexOf("_"))}function x(){var ae=H(".wc-load-more-link").attr("href");return ae.substring(ae.lastIndexOf("=")+1)}function S(ae){var af=H(".wc-load-more-link").attr("href");H(".wc-load-more-link").attr("href",af.replace(/[\d]+$/m,ae));if(F!=2){H(".wpdiscuz-comment-pagination").show()}}function G(ag){var af=ag.attr("class");var ae=af.split(" ");var ah="";H.each(ae,function(ai,aj){if("wc_comment_level"===c(aj,false)){ah=c(aj,true)}});return parseInt(ah)+1}function c(ae,af){var ag="";if(af){ag=ae.substring(ae.indexOf("-")+1)}else{ag=ae.substring(0,ae.indexOf("-"))}return ag}function y(ag,af){if(ag==0){H(".wc-thread-wrapper").prepend(af)}else{var ae=p(H("#comment-"+ag),0);H("#wpdiscuz_form_anchor-"+ae).after(af)}}function E(){var ag;var ae;var af="";H(".wc-comment-right").each(function(){ag=p(H(this),0);ae=ac(ag);af+=ae+","});return af}function I(){H(".wc-comment-img-link").tooltipster({trigger:"click",contentAsHTML:true,interactive:true,multiple:true});H(".wc_tooltipster").tooltipster({offsetY:2,multiple:true})}function g(){if(H(".wc_social_plugin_wrapper .wp-social-login-provider-list").length){H(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .the_champ_login_container").length){H(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .social_connect_form").length){H(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}else{if(H(".wc_social_plugin_wrapper .oneall_social_login_providers").length){H(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wc-form-wrapper > .wc-secondary-forms-social-content")}}}}}function e(){H("#wcThreadWrapper .wc-comment").each(function(ae){if(H("> .wc-reply",this).length){H("> .wc-comment-right .wc-comment-footer .wc-toggle",this).removeClass("wpdiscuz-hidden")}})}function U(ae){if(ae.action!=="liveUpdate"){H(".wpdiscuz-loading-bar").show()}ae.append("postId",q);return H.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:ae,contentType:false,processData:false,})}function P(){H(".wpdiscuz_reset").val("")}function D(ag,af){if(ab!=null){var aj=ag.val().length;var ai=ag.parents(".wc_comm_form");var ae=H(".commentTextMaxLength",ai);var ah=ab-aj;if(ah<=10){ae.addClass("left10")}else{ae.removeClass("left10")}ae.html(ah)}}});
|
assets/third-party/validator/validator.js
CHANGED
@@ -235,6 +235,7 @@ var wpdiscuzValidator = (function ($) {
|
|
235 |
item.find('.alert').html(text);
|
236 |
}
|
237 |
else if (defaults.alerts) {
|
|
|
238 |
warning = $('<div class="alert">').html(text);
|
239 |
item.append(warning);
|
240 |
}
|
@@ -244,6 +245,10 @@ var wpdiscuzValidator = (function ($) {
|
|
244 |
setTimeout(function () {
|
245 |
item.addClass('bad');
|
246 |
}, 0);
|
|
|
|
|
|
|
|
|
247 |
};
|
248 |
/* un-marks invalid fields
|
249 |
*/
|
235 |
item.find('.alert').html(text);
|
236 |
}
|
237 |
else if (defaults.alerts) {
|
238 |
+
$('div.alert', item).remove();
|
239 |
warning = $('<div class="alert">').html(text);
|
240 |
item.append(warning);
|
241 |
}
|
245 |
setTimeout(function () {
|
246 |
item.addClass('bad');
|
247 |
}, 0);
|
248 |
+
|
249 |
+
setTimeout(function() {
|
250 |
+
item.removeClass('bad');
|
251 |
+
}, 4000);
|
252 |
};
|
253 |
/* un-marks invalid fields
|
254 |
*/
|
assets/third-party/validator/validator.min.css
CHANGED
@@ -1,2 +1,31 @@
|
|
1 |
|
2 |
-
.wpdiscuz-item .tooltip{float:left;top:2px;left:7px;position:relative;z-index:2}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
+
.wpdiscuz-item .tooltip{float:left;top:2px;left:7px;position:relative;z-index:2}
|
3 |
+
.wpdiscuz-item .tooltip:hover{z-index:3}
|
4 |
+
.wpdiscuz-item .tooltip>span{display:inline-block;width:15px;height:15px;line-height:15px;font-size:.9em;font-weight:bold;text-align:center;color:#FFF;cursor:help;background-color:#00aeef;position:relative;border-radius:10px}
|
5 |
+
.wpdiscuz-item .tooltip .content{opacity:0;width:200px;background-color:#333;color:#FFF;font-size:.9em;position:absolute;top:0;left:20px;padding:8px;border-radius:6px;pointer-events:none;transition:.2s cubic-bezier(0.1,0.1,0.25,2);-webkit-transition:.3s cubic-bezier(0.1,0.2,0.5,2.2);-moz-transition:.3s cubic-bezier(0.1,0.2,0.5,2.2)}
|
6 |
+
.wpdiscuz-item .tooltip p{padding:0}
|
7 |
+
.wpdiscuz-item .tooltip.down .content{left:auto;right:0;top:30px}
|
8 |
+
.wpdiscuz-item .tooltip:hover .content{opacity:1;left:36px}
|
9 |
+
.wpdiscuz-item .tooltip .content b{height:0;width:0;border-color:#333 #333 transparent transparent;border-style:solid;border-width:9px 7px;position:absolute;left:-14px;top:8px}
|
10 |
+
.wpdiscuz-item .tooltip.down .content b{left:auto;right:6px;top:-10px;border-width:5px;border-color:transparent #333 #333 transparent}
|
11 |
+
.wpdiscuz-item .alert{float:left;margin:0;padding:2px 10px;color:#d00;border-radius:3px 4px 4px 3px;background-color:#ffe8e8;white-space:pre;position:relative;left:-15px;opacity:0;z-index:1;transition:.15s ease-out}
|
12 |
+
.wpdiscuz-item .alert{max-width:100%;position:absolute;top:-5px;font-size:12px}
|
13 |
+
.wpdiscuz-item.bad .alert{left:0;opacity:1;padding:2px 4px;line-height:14px}@keyframes shake{15%{transform:translateX(-5px)}30%{transform:translateX(5px)}45%{transform:translateX(-3px)}60%{transform:translateX(3px)}75%{transform:translateX(2px)}100%{transform:none}}@-webkit-keyframes shake{25%{-webkit-transform:translateX(-6px)}75%{-webkit-transform:translateX(6px)}}form fieldset{clear:both;margin:0 0 10px 0}form .wpdiscuz-item{padding:3px 0;position:relative;height:2em;font-family:Lato,sans-serif}form .wpdiscuz-item.wpdiscuz-items{height:auto}
|
14 |
+
.wpdiscuz-item label,.wpdiscuz-item .label{float:left;cursor:pointer}
|
15 |
+
.wpdiscuz-item label span,.wpdiscuz-item .label{float:left;width:160px;text-transform:capitalize;line-height:2em}
|
16 |
+
.wpdiscuz-item input,.wpdiscuz-item textarea{float:left;padding:3px 4px;width:210px;-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}
|
17 |
+
.wpdiscuz-item input[type=checkbox]{width:auto}
|
18 |
+
.label ~ label{vertical-align:middle;margin:.3em 1.2em 0 0}
|
19 |
+
.wpdiscuz-item input.short{width:90px}
|
20 |
+
.wpdiscuz-item input:focus:not([type="checkbox"]){box-shadow:0 0 4px #bcbcbc;border:1px solid #bcbcbc}
|
21 |
+
|
22 |
+
|
23 |
+
.wpdiscuz-item select{float:left;width:220px;padding:2px 0;margin:0;border:1px solid #CCC;text-transform:capitalize}
|
24 |
+
.wpdiscuz-item select option{padding:1px}
|
25 |
+
.wpdiscuz-item>.extra{float:left;font-size:.9em;color:#999;line-height:2em;margin-left:13px}
|
26 |
+
.wpdiscuz-item.multi .input{float:left}
|
27 |
+
.wpdiscuz-item.multi input{float:left;margin-right:5px;width:35px;text-align:center}form .wpdiscuz-item.multi input:nth-last-child(-n+2){margin:0}
|
28 |
+
.wpdiscuz-item.wpdiscuz-items input{border-top:5px solid #e1e1e1;margin:0 0 0 160px}
|
29 |
+
.bad input,.bad select,.bad textarea{box-shadow:0 0 4px -2px #ffffff;position:relative;left:0}
|
30 |
+
.wc_comm_form input{box-shadow:0 0 4px -2px #d4d0ba}
|
31 |
+
.wc_comm_form textarea{box-shadow:0 0 4px -2px #ffffff;}
|
assets/third-party/validator/validator.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
|
2 |
-
var wpdiscuzValidator=(function(c){var l,e,o,q,h,s,b,g,j,r,m,t,u,f,v,a=/[\(\)\<\>\,\;\:\\\/\"\[\]]/,d=/^.+@.+\..{2,50}$/;l={invalid:"invalid input",empty:"please put something here",min:"input is too short",max:"input is too long",number_min:"too low",number_max:"too high",url:"invalid URL",number:"not a number",email:"email address is invalid",email_repeat:"emails do not match",password_repeat:"passwords do not match",repeat:"no match",complete:"input is not complete",select:"Please select an option"};if(!window.console){console={};console.log=console.warn=function(){return}}j={alerts:true};e={sameAsPlaceholder:function(w){return c.fn.placeholder&&w.attr("placeholder")!==undefined&&v.val==w.prop("placeholder")},hasValue:function(w){if(!w){f=l.empty;return false}return true},linked:function(x,w){if(w!=x){f=l[v.type+"_repeat"]||l.no_match;return false}return true},email:function(w){if(!d.test(w)||w.match(a)){f=w?l.email:l.empty;return false}return true},text:function(x){if(r){var C=x.split(" ");var B=function(D){for(var E=C.length;E--;){if(C[E].length<D){return false}}return true};if(C.length<r||!B(2)){f=l.complete;return false}return true}if(m&&x.length<m[0]){f=l.min;return false}if(m&&m[1]&&x.length>m[1]){f=l.max;return false}if(t&&t.length){var A=false;while(t.length){if(t.pop()==x.length){A=true}}if(!A){f=l.complete;return false}}if(u){var z,w;switch(u){case"alphanumeric":z=/^[a-z0-9]+$/i;break;case"numeric":z=/^[0-9]+$/i;break;case"phone":z=/^\+?([0-9]|[-|' '])+$/i;break;default:z=u}try{w=new RegExp(z).test(x);if(x&&!w){return false}}catch(y){console.log(y,b,"regex is invalid");return false}}return true},number:function(w){if(isNaN(parseFloat(w))&&!isFinite(w)){f=l.number;return false}else{if(m&&w.length<m[0]){f=l.min;return false}else{if(m&&m[1]&&w.length>m[1]){f=l.max;return false}else{if(g[0]&&(w|0)<g[0]){f=l.number_min;return false}else{if(g[1]&&(w|0)>g[1]){f=l.number_max;return false}}}}}return true},date:function(x){var y,w=x.split(/[-./]/g),z;if(b[0].valueAsNumber){return true}for(z=w.length;z--;){if(isNaN(parseFloat(x))&&!isFinite(x)){return false}}try{y=new Date(w[2],w[1]-1,w[0]);if(y.getMonth()+1==w[1]&&y.getDate()==w[0]){return y}return false}catch(B){console.log("date test: ",err);return false}},url:function(w){function x(y){return/^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i.test(y)}if(!x(w)){console.log(w);f=w?l.url:l.empty;return false}return true},hidden:function(w){if(m&&w.length<m[0]){f=l.min;return false}if(u){var x;if(u=="alphanumeric"){x=/^[a-z0-9]+$/i;if(!x.test(w)){return false}}}return true},select:function(w){if(!e.hasValue(w)){f=l.select;return false}return true}};h=function(y,z){if(!z||!y||!y.length){return false}var x=y.parents(".wpdiscuz-item"),w;if(x.hasClass("bad")){if(j.alerts){x.find(".alert").html(z)}}else{if(j.alerts){w=c('<div class="alert">').html(z);x.append(w)}}x.removeClass("bad");setTimeout(function(){x.addClass("bad")},0)};s=function(w){if(!w||!w.length){console.warn('no "field" argument, null or DOM object not found');return false}w.parents(".wpdiscuz-item").removeClass("bad").find(".alert").remove()};function k(w,x){if(w=="tel"){u=u||"phone"}if(!w||w=="password"||w=="tel"){w="text"}return e[w](x)}function p(w){b=c(w);b.data("valid",true);b.data("type",b.attr("type"));u=b.attr("pattern")}function i(w){p(this);if(w.charCode){return k(this.type,String.fromCharCode(w.charCode))}}function o(){if(this.type!="hidden"&&c(this).is(":hidden")){return true}p(this);b.data("val",b[0].value.replace(/^\s+|\s+$/g,""));v=b.data();f=l[b.prop("name")]||l.invalid;if(b[0].nodeName.toLowerCase()==="select"){v.type="select"}if(b[0].nodeName.toLowerCase()==="textarea"){v.type="text"}r=v.validateWords||0;m=v.validateLengthRange?(v.validateLengthRange+"").split(","):[1];t=v.validateLength?(v.validateLength+"").split(","):false;g=v.validateMinmax?(v.validateMinmax+"").split(","):"";v.valid=e.hasValue(v.val);if(v.valid){if(e.sameAsPlaceholder(b)){f=l.empty;v.valid=false}if(v.validateLinked){var w=v.validateLinked.indexOf("#")==0?c(v.validateLinked):c(":input[name="+v.validateLinked+"]");v.valid=e.linked(v.val,w.val())}else{if(v.valid||v.type=="select"){v.valid=k(v.type,v.val)}}}if(b.hasClass("wpdiscuz_optional")&&!v.val){v.valid=true}if(v.valid){s(b)}else{h(b,f);submit=false}return v.valid}function n(w){w=c(w);if(w.length==0){console.warn("element not found");return false}var y=this,z=true,x=w.find(":input").filter("[required=required], .required, .wpdiscuz_optional").not("[disabled=disabled]");x.each(function(){z=z*o.apply(this)});return !!z}return{defaults:j,checkField:o,keypress:i,checkAll:n,mark:h,unmark:s,message:l,tests:e}})(jQuery);
|
1 |
+
|
2 |
+
var wpdiscuzValidator=(function(c){var l,e,o,q,h,s,b,g,j,r,m,t,u,f,v,a=/[\(\)\<\>\,\;\:\\\/\"\[\]]/,d=/^.+@.+\..{2,50}$/;l={invalid:"invalid input",empty:"please put something here",min:"input is too short",max:"input is too long",number_min:"too low",number_max:"too high",url:"invalid URL",number:"not a number",email:"email address is invalid",email_repeat:"emails do not match",password_repeat:"passwords do not match",repeat:"no match",complete:"input is not complete",select:"Please select an option"};if(!window.console){console={};console.log=console.warn=function(){return}}j={alerts:true};e={sameAsPlaceholder:function(w){return c.fn.placeholder&&w.attr("placeholder")!==undefined&&v.val==w.prop("placeholder")},hasValue:function(w){if(!w){f=l.empty;return false}return true},linked:function(x,w){if(w!=x){f=l[v.type+"_repeat"]||l.no_match;return false}return true},email:function(w){if(!d.test(w)||w.match(a)){f=w?l.email:l.empty;return false}return true},text:function(x){if(r){var C=x.split(" ");var B=function(D){for(var E=C.length;E--;){if(C[E].length<D){return false}}return true};if(C.length<r||!B(2)){f=l.complete;return false}return true}if(m&&x.length<m[0]){f=l.min;return false}if(m&&m[1]&&x.length>m[1]){f=l.max;return false}if(t&&t.length){var A=false;while(t.length){if(t.pop()==x.length){A=true}}if(!A){f=l.complete;return false}}if(u){var z,w;switch(u){case"alphanumeric":z=/^[a-z0-9]+$/i;break;case"numeric":z=/^[0-9]+$/i;break;case"phone":z=/^\+?([0-9]|[-|' '])+$/i;break;default:z=u}try{w=new RegExp(z).test(x);if(x&&!w){return false}}catch(y){console.log(y,b,"regex is invalid");return false}}return true},number:function(w){if(isNaN(parseFloat(w))&&!isFinite(w)){f=l.number;return false}else{if(m&&w.length<m[0]){f=l.min;return false}else{if(m&&m[1]&&w.length>m[1]){f=l.max;return false}else{if(g[0]&&(w|0)<g[0]){f=l.number_min;return false}else{if(g[1]&&(w|0)>g[1]){f=l.number_max;return false}}}}}return true},date:function(x){var y,w=x.split(/[-./]/g),z;if(b[0].valueAsNumber){return true}for(z=w.length;z--;){if(isNaN(parseFloat(x))&&!isFinite(x)){return false}}try{y=new Date(w[2],w[1]-1,w[0]);if(y.getMonth()+1==w[1]&&y.getDate()==w[0]){return y}return false}catch(B){console.log("date test: ",err);return false}},url:function(w){function x(y){return/^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i.test(y)}if(!x(w)){console.log(w);f=w?l.url:l.empty;return false}return true},hidden:function(w){if(m&&w.length<m[0]){f=l.min;return false}if(u){var x;if(u=="alphanumeric"){x=/^[a-z0-9]+$/i;if(!x.test(w)){return false}}}return true},select:function(w){if(!e.hasValue(w)){f=l.select;return false}return true}};h=function(y,z){if(!z||!y||!y.length){return false}var x=y.parents(".wpdiscuz-item"),w;if(x.hasClass("bad")){if(j.alerts){x.find(".alert").html(z)}}else{if(j.alerts){c("div.alert",x).remove();w=c('<div class="alert">').html(z);x.append(w)}}x.removeClass("bad");setTimeout(function(){x.addClass("bad")},0);setTimeout(function(){x.removeClass("bad")},4000)};s=function(w){if(!w||!w.length){console.warn('no "field" argument, null or DOM object not found');return false}w.parents(".wpdiscuz-item").removeClass("bad").find(".alert").remove()};function k(w,x){if(w=="tel"){u=u||"phone"}if(!w||w=="password"||w=="tel"){w="text"}return e[w](x)}function p(w){b=c(w);b.data("valid",true);b.data("type",b.attr("type"));u=b.attr("pattern")}function i(w){p(this);if(w.charCode){return k(this.type,String.fromCharCode(w.charCode))}}function o(){if(this.type!="hidden"&&c(this).is(":hidden")){return true}p(this);b.data("val",b[0].value.replace(/^\s+|\s+$/g,""));v=b.data();f=l[b.prop("name")]||l.invalid;if(b[0].nodeName.toLowerCase()==="select"){v.type="select"}if(b[0].nodeName.toLowerCase()==="textarea"){v.type="text"}r=v.validateWords||0;m=v.validateLengthRange?(v.validateLengthRange+"").split(","):[1];t=v.validateLength?(v.validateLength+"").split(","):false;g=v.validateMinmax?(v.validateMinmax+"").split(","):"";v.valid=e.hasValue(v.val);if(v.valid){if(e.sameAsPlaceholder(b)){f=l.empty;v.valid=false}if(v.validateLinked){var w=v.validateLinked.indexOf("#")==0?c(v.validateLinked):c(":input[name="+v.validateLinked+"]");v.valid=e.linked(v.val,w.val())}else{if(v.valid||v.type=="select"){v.valid=k(v.type,v.val)}}}if(b.hasClass("wpdiscuz_optional")&&!v.val){v.valid=true}if(v.valid){s(b)}else{h(b,f);submit=false}return v.valid}function n(w){w=c(w);if(w.length==0){console.warn("element not found");return false}var y=this,z=true,x=w.find(":input").filter("[required=required], .required, .wpdiscuz_optional").not("[disabled=disabled]");x.each(function(){z=z*o.apply(this)});return !!z}return{defaults:j,checkField:o,keypress:i,checkAll:n,mark:h,unmark:s,message:l,tests:e}})(jQuery);
|
class.WpdiscuzCore.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
* Plugin Name: wpDiscuz - Supercharged native comments
|
5 |
* Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
|
8 |
* Author URI: http://gvectors.com/
|
9 |
* Plugin URI: http://wpdiscuz.com/
|
@@ -34,12 +34,12 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
34 |
public $dbManager;
|
35 |
public $optionsSerialized;
|
36 |
public $wpdiscuzOptionsJs;
|
|
|
37 |
private $css;
|
38 |
private $options;
|
39 |
private $emailHelper;
|
40 |
private $wpdiscuzWalker;
|
41 |
-
|
42 |
-
private $commentsArgs;
|
43 |
private $version;
|
44 |
|
45 |
public function __construct() {
|
@@ -53,7 +53,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
53 |
$this->helper = new WpdiscuzHelper($this->optionsSerialized, $this->dbManager);
|
54 |
$this->emailHelper = new WpdiscuzEmailHelper($this->optionsSerialized, $this->dbManager);
|
55 |
$this->optimizationHelper = new WpdiscuzOptimizationHelper($this->optionsSerialized, $this->dbManager, $this->emailHelper);
|
56 |
-
$this->css = new WpdiscuzCss($this->optionsSerialized);
|
57 |
$this->wpdiscuzWalker = new WpdiscuzWalker($this->helper, $this->optimizationHelper, $this->dbManager, $this->optionsSerialized);
|
58 |
register_activation_hook(__FILE__, array($this->dbManager, 'dbCreateTables'));
|
59 |
register_deactivation_hook(__FILE__, array(&$this->helper, 'removeAllFiles'));
|
@@ -61,10 +61,10 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
61 |
add_action('wp_head', array(&$this->css, 'initCustomCss'));
|
62 |
|
63 |
add_action('plugins_loaded', array(&$this, 'wpdiscuzTextDomain'));
|
64 |
-
add_action('admin_init', array(&$this, 'pluginNewVersion'),
|
65 |
-
add_action('admin_enqueue_scripts', array(&$this, 'adminPageStylesScripts'),
|
66 |
-
add_action('wp_enqueue_scripts', array(&$this, 'frontEndStylesScripts'));
|
67 |
-
add_action('admin_menu', array(&$this, 'addPluginOptionsPage'),
|
68 |
|
69 |
$wp_version = get_bloginfo('version');
|
70 |
if (version_compare($wp_version, '4.2.0', '>=')) {
|
@@ -93,6 +93,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
93 |
add_action('wp_ajax_redirect', array(&$this, 'redirect'));
|
94 |
add_action('wp_ajax_nopriv_redirect', array(&$this, 'redirect'));
|
95 |
add_action('admin_post_clearChildrenData', array(&$this->optimizationHelper, 'clearChildrenData'));
|
|
|
96 |
add_action('wp_insert_comment', array(&$this->optimizationHelper, 'addCommentToTree'), 2689, 2);
|
97 |
add_action('transition_comment_status', array(&$this->optimizationHelper, 'statusEventHandler'), 265, 3);
|
98 |
add_action('delete_comment', array(&$this->optimizationHelper, 'initSubComments'), 266);
|
@@ -128,13 +129,13 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
128 |
public function updateAutomatically() {
|
129 |
global $currentUser;
|
130 |
get_currentuserinfo();
|
131 |
-
$messageArray = array();
|
132 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
133 |
$loadLastCommentId = isset($_POST['loadLastCommentId']) ? intval($_POST['loadLastCommentId']) : 0;
|
134 |
$visibleCommentIds = isset($_POST['visibleCommentIds']) ? trim($_POST['visibleCommentIds'], ',') : '';
|
135 |
$sentEmail = isset($_POST['email']) ? trim($_POST['email']) : '';
|
136 |
$email = $currentUser && $currentUser->ID ? $currentUser->user_email : $sentEmail;
|
137 |
-
if ($visibleCommentIds && $postId && $loadLastCommentId
|
138 |
$lastCommentId = $this->dbManager->getLastCommentId($postId);
|
139 |
if ($lastCommentId > $loadLastCommentId) {
|
140 |
$messageArray['code'] = 1;
|
@@ -178,15 +179,13 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
178 |
asort($messageArray['message']['author_replies']);
|
179 |
}
|
180 |
$messageArray['wc_all_comments_count_new'] = $this->dbManager->getCommentsCount($postId);
|
181 |
-
} else {
|
182 |
-
$messageArray['code'] = 0;
|
183 |
}
|
184 |
-
wp_die(json_encode($messageArray));
|
185 |
}
|
186 |
-
wp_die();
|
187 |
}
|
188 |
|
189 |
public function updateOnClick() {
|
|
|
190 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
191 |
$newCommentIds = isset($_POST['newCommentIds']) ? trim($_POST['newCommentIds']) : '';
|
192 |
|
@@ -206,16 +205,15 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
206 |
$commentObject = array('comment_parent' => $comment->comment_parent, 'comment_html' => $commentHtml);
|
207 |
$messageArray['message'][] = $commentObject;
|
208 |
}
|
209 |
-
wp_die(json_encode($messageArray));
|
210 |
}
|
211 |
-
wp_die();
|
212 |
}
|
213 |
|
214 |
public function addComment() {
|
215 |
$messageArray = array();
|
216 |
$isAnonymous = false;
|
217 |
$uniqueId = isset($_POST['wpdiscuz_unique_id']) ? trim($_POST['wpdiscuz_unique_id']) : '';
|
218 |
-
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : '';
|
219 |
if ($uniqueId && $postId) {
|
220 |
do_action('wpdiscuz_add_comment');
|
221 |
if (function_exists('zerospam_get_key') && isset($_POST['wpdiscuz_zs']) && ($wpdiscuzZS = $_POST['wpdiscuz_zs'])) {
|
@@ -365,7 +363,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
365 |
* get comment text from db
|
366 |
*/
|
367 |
public function editComment() {
|
368 |
-
$messageArray = array();
|
369 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
370 |
if ($commentId) {
|
371 |
$comment = get_comment($commentId);
|
@@ -394,7 +392,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
394 |
* save edited comment via ajax
|
395 |
*/
|
396 |
public function saveEditedComment() {
|
397 |
-
$messageArray = array();
|
398 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
399 |
$trimmedContent = isset($_POST['commentContent']) ? trim($_POST['commentContent']) : '';
|
400 |
if ($commentId && $trimmedContent) {
|
@@ -403,7 +401,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
403 |
$isCurrentUserCanEdit = $current_user && ($comment->user_id == $current_user->ID || current_user_can('edit_comment', $comment->comment_ID));
|
404 |
if ($this->helper->isContentInRange($trimmedContent) && $isCurrentUserCanEdit) {
|
405 |
if ($trimmedContent != $comment->comment_content) {
|
406 |
-
$commentContent = wp_kses(
|
407 |
$author_ip = $this->helper->getRealIPAddr();
|
408 |
$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
|
409 |
$commentarr = array(
|
@@ -413,15 +411,16 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
413 |
'comment_agent' => apply_filters('pre_comment_user_agent', $userAgent),
|
414 |
'comment_approved' => $comment->comment_approved
|
415 |
);
|
416 |
-
if (wp_update_comment(
|
417 |
$uniqueId = $comment->comment_ID . '_' . $comment->comment_parent;
|
418 |
$messageArray['code'] = 1;
|
|
|
|
|
|
|
419 |
if ($this->optionsSerialized->commentReadMoreLimit && count(explode(' ', strip_tags($commentContent))) > $this->optionsSerialized->commentReadMoreLimit) {
|
420 |
$commentContent = $this->helper->getCommentExcerpt($commentContent, $uniqueId);
|
421 |
}
|
422 |
-
$
|
423 |
-
$commentContent = $this->helper->makeClickable($commentContent);
|
424 |
-
$messageArray['message'] = $commentContent;
|
425 |
} else {
|
426 |
$messageArray['code'] = 'wc_comment_not_updated';
|
427 |
}
|
@@ -438,7 +437,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
438 |
public function getSingleComment() {
|
439 |
global $current_user;
|
440 |
get_currentuserinfo();
|
441 |
-
$messageArray = array();
|
442 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
443 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
444 |
if ($commentId && $postId) {
|
@@ -454,16 +453,15 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
454 |
$commentListArgs['current_user'] = $current_user;
|
455 |
$messageArray['message'] = wp_list_comments($commentListArgs, $comments);
|
456 |
$this->commentsArgs['caller'] = '';
|
457 |
-
wp_die(json_encode($messageArray));
|
458 |
}
|
459 |
-
wp_die();
|
460 |
}
|
461 |
|
462 |
/**
|
463 |
* redirect first commenter to the selected page from options
|
464 |
*/
|
465 |
public function redirect() {
|
466 |
-
$messageArray = array();
|
467 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
468 |
if ($this->optionsSerialized->redirectPage && $commentId) {
|
469 |
$comment = get_comment($commentId);
|
@@ -500,10 +498,10 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
500 |
}
|
501 |
|
502 |
public function voteOnComment() {
|
|
|
503 |
if ($this->optionsSerialized->votingButtonsShowHide) {
|
504 |
-
wp_die();
|
505 |
}
|
506 |
-
$messageArray = array();
|
507 |
$isUserLoggedIn = is_user_logged_in();
|
508 |
if (!$this->optionsSerialized->isGuestCanVote && !$isUserLoggedIn) {
|
509 |
$messageArray['code'] = 'wc_login_to_vote';
|
@@ -551,7 +549,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
551 |
}
|
552 |
|
553 |
public function wpdiscuzSorting() {
|
554 |
-
$messageArray = array();
|
555 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
556 |
$orderBy = isset($_POST['orderBy']) ? trim($_POST['orderBy']) : '';
|
557 |
$order = isset($_POST['order']) ? trim($_POST['order']) : '';
|
@@ -569,28 +567,27 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
569 |
$messageArray['last_parent_id'] = $commentData['last_parent_id'];
|
570 |
$messageArray['is_show_load_more'] = $commentData['is_show_load_more'];
|
571 |
$messageArray['message'] = $commentData['comment_list'];
|
572 |
-
wp_die(json_encode($messageArray));
|
573 |
}
|
574 |
-
wp_die();
|
575 |
}
|
576 |
|
577 |
/**
|
578 |
* loads the comment content on click via ajax
|
579 |
*/
|
580 |
public function readMore() {
|
581 |
-
$messageArray = array();
|
582 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
583 |
if ($commentId) {
|
584 |
$comment = get_comment($commentId);
|
585 |
$commentContent = wp_kses($comment->comment_content, $this->helper->wc_allowed_tags);
|
586 |
-
$commentContent = apply_filters('
|
587 |
$commentContent = $this->helper->makeClickable($commentContent);
|
|
|
588 |
$messageArray['code'] = 1;
|
589 |
$messageArray['message'] = $commentContent;
|
590 |
-
|
|
|
591 |
}
|
592 |
-
$messageArray['code'] = 0;
|
593 |
-
$messageArray['message'] = 'error';
|
594 |
wp_die(json_encode($messageArray));
|
595 |
}
|
596 |
|
@@ -636,11 +633,15 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
636 |
public function getCommentsArgs($args) {
|
637 |
global $wpdb;
|
638 |
if ($this->commentsArgs['caller'] === 'wpdiscuz' && $this->commentsArgs['wc_comments']) {
|
|
|
|
|
639 |
$comments = implode(',', $this->commentsArgs['wc_comments']);
|
640 |
$commentIds = trim($comments, ',');
|
641 |
-
$args['
|
642 |
-
|
643 |
-
|
|
|
|
|
644 |
if ($this->commentsArgs['orderby'] == 'by_vote') {
|
645 |
$orderby = $wpdb->commentmeta . ".meta_value+0 DESC, ";
|
646 |
}
|
@@ -720,13 +721,13 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
720 |
*/
|
721 |
public function frontEndStylesScripts() {
|
722 |
global $post;
|
723 |
-
if ($
|
724 |
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
725 |
wp_register_style('wpdiscuz-frontend-css', plugins_url(WPDISCUZ_DIR_NAME . '/assets/css/wpdiscuz.min.css'), null, $this->version);
|
726 |
wp_enqueue_style('wpdiscuz-frontend-css');
|
727 |
|
728 |
if (is_rtl()) {
|
729 |
-
wp_register_style('wpdiscuz-frontend-rtl-css', plugins_url(WPDISCUZ_DIR_NAME . '/assets/css/wpdiscuz-rtl.min.css'));
|
730 |
wp_enqueue_style('wpdiscuz-frontend-rtl-css');
|
731 |
}
|
732 |
if (preg_match('/MSIE/i', $u_agent)) {
|
@@ -754,14 +755,14 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
754 |
wp_enqueue_script('jquery-form');
|
755 |
wp_register_script('wpdiscuz-ajax-js', plugins_url(WPDISCUZ_DIR_NAME . '/assets/js/wpdiscuz.min.js'), array('jquery'), $this->version);
|
756 |
wp_enqueue_script('wpdiscuz-ajax-js');
|
757 |
-
wp_localize_script('wpdiscuz-ajax-js', '
|
758 |
do_action('wpdiscuz_front_scripts');
|
759 |
}
|
760 |
}
|
761 |
|
762 |
public function pluginNewVersion() {
|
763 |
$this->dbManager->createEmailNotificationTable();
|
764 |
-
$wc_plugin_data = get_plugin_data(__FILE__);
|
765 |
if (version_compare($wc_plugin_data['Version'], $this->version, '>')) {
|
766 |
$options = $this->changeOldOptions(get_option(self::OPTION_SLUG_OPTIONS));
|
767 |
$this->addNewOptions($options);
|
@@ -783,6 +784,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
783 |
$this->dbManager->alterNotificationTable();
|
784 |
}
|
785 |
}
|
|
|
786 |
}
|
787 |
|
788 |
/**
|
@@ -842,7 +844,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
842 |
|
843 |
public function initCurrentPostType() {
|
844 |
global $post;
|
845 |
-
if ($
|
846 |
add_filter('comments_template', array(&$this, 'addCommentForm'), 10);
|
847 |
}
|
848 |
}
|
@@ -855,7 +857,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
855 |
private function getCommentListArgs($postId) {
|
856 |
$postsAuthors = $this->dbManager->getPostsAuthors();
|
857 |
$post = get_post($postId);
|
858 |
-
|
859 |
'style' => 'div',
|
860 |
'echo' => false,
|
861 |
'isSingle' => false,
|
@@ -864,6 +866,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
864 |
'posts_authors' => $postsAuthors,
|
865 |
'walker' => $this->wpdiscuzWalker,
|
866 |
);
|
|
|
867 |
}
|
868 |
|
869 |
public function addNewRoles() {
|
@@ -891,3 +894,4 @@ class WpdiscuzCore implements WpDiscuzConstants {
|
|
891 |
}
|
892 |
|
893 |
$wpdiscuz = new WpdiscuzCore();
|
|
3 |
/*
|
4 |
* Plugin Name: wpDiscuz - Supercharged native comments
|
5 |
* Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
6 |
+
* Version: 3.2.6
|
7 |
* Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
|
8 |
* Author URI: http://gvectors.com/
|
9 |
* Plugin URI: http://wpdiscuz.com/
|
34 |
public $dbManager;
|
35 |
public $optionsSerialized;
|
36 |
public $wpdiscuzOptionsJs;
|
37 |
+
public $optimizationHelper;
|
38 |
private $css;
|
39 |
private $options;
|
40 |
private $emailHelper;
|
41 |
private $wpdiscuzWalker;
|
42 |
+
public $commentsArgs;
|
|
|
43 |
private $version;
|
44 |
|
45 |
public function __construct() {
|
53 |
$this->helper = new WpdiscuzHelper($this->optionsSerialized, $this->dbManager);
|
54 |
$this->emailHelper = new WpdiscuzEmailHelper($this->optionsSerialized, $this->dbManager);
|
55 |
$this->optimizationHelper = new WpdiscuzOptimizationHelper($this->optionsSerialized, $this->dbManager, $this->emailHelper);
|
56 |
+
$this->css = new WpdiscuzCss($this->optionsSerialized, $this->helper);
|
57 |
$this->wpdiscuzWalker = new WpdiscuzWalker($this->helper, $this->optimizationHelper, $this->dbManager, $this->optionsSerialized);
|
58 |
register_activation_hook(__FILE__, array($this->dbManager, 'dbCreateTables'));
|
59 |
register_deactivation_hook(__FILE__, array(&$this->helper, 'removeAllFiles'));
|
61 |
add_action('wp_head', array(&$this->css, 'initCustomCss'));
|
62 |
|
63 |
add_action('plugins_loaded', array(&$this, 'wpdiscuzTextDomain'));
|
64 |
+
add_action('admin_init', array(&$this, 'pluginNewVersion'), 1);
|
65 |
+
add_action('admin_enqueue_scripts', array(&$this, 'adminPageStylesScripts'), 100);
|
66 |
+
add_action('wp_enqueue_scripts', array(&$this, 'frontEndStylesScripts'), 100);
|
67 |
+
add_action('admin_menu', array(&$this, 'addPluginOptionsPage'), 100);
|
68 |
|
69 |
$wp_version = get_bloginfo('version');
|
70 |
if (version_compare($wp_version, '4.2.0', '>=')) {
|
93 |
add_action('wp_ajax_redirect', array(&$this, 'redirect'));
|
94 |
add_action('wp_ajax_nopriv_redirect', array(&$this, 'redirect'));
|
95 |
add_action('admin_post_clearChildrenData', array(&$this->optimizationHelper, 'clearChildrenData'));
|
96 |
+
add_action('admin_post_removeVoteData', array(&$this->optimizationHelper, 'removeVoteData'));
|
97 |
add_action('wp_insert_comment', array(&$this->optimizationHelper, 'addCommentToTree'), 2689, 2);
|
98 |
add_action('transition_comment_status', array(&$this->optimizationHelper, 'statusEventHandler'), 265, 3);
|
99 |
add_action('delete_comment', array(&$this->optimizationHelper, 'initSubComments'), 266);
|
129 |
public function updateAutomatically() {
|
130 |
global $currentUser;
|
131 |
get_currentuserinfo();
|
132 |
+
$messageArray = array('code' => 0);
|
133 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
134 |
$loadLastCommentId = isset($_POST['loadLastCommentId']) ? intval($_POST['loadLastCommentId']) : 0;
|
135 |
$visibleCommentIds = isset($_POST['visibleCommentIds']) ? trim($_POST['visibleCommentIds'], ',') : '';
|
136 |
$sentEmail = isset($_POST['email']) ? trim($_POST['email']) : '';
|
137 |
$email = $currentUser && $currentUser->ID ? $currentUser->user_email : $sentEmail;
|
138 |
+
if ($visibleCommentIds && $postId && $loadLastCommentId) {
|
139 |
$lastCommentId = $this->dbManager->getLastCommentId($postId);
|
140 |
if ($lastCommentId > $loadLastCommentId) {
|
141 |
$messageArray['code'] = 1;
|
179 |
asort($messageArray['message']['author_replies']);
|
180 |
}
|
181 |
$messageArray['wc_all_comments_count_new'] = $this->dbManager->getCommentsCount($postId);
|
|
|
|
|
182 |
}
|
|
|
183 |
}
|
184 |
+
wp_die(json_encode($messageArray));
|
185 |
}
|
186 |
|
187 |
public function updateOnClick() {
|
188 |
+
$messageArray = array('code' => 0);
|
189 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
190 |
$newCommentIds = isset($_POST['newCommentIds']) ? trim($_POST['newCommentIds']) : '';
|
191 |
|
205 |
$commentObject = array('comment_parent' => $comment->comment_parent, 'comment_html' => $commentHtml);
|
206 |
$messageArray['message'][] = $commentObject;
|
207 |
}
|
|
|
208 |
}
|
209 |
+
wp_die(json_encode($messageArray));
|
210 |
}
|
211 |
|
212 |
public function addComment() {
|
213 |
$messageArray = array();
|
214 |
$isAnonymous = false;
|
215 |
$uniqueId = isset($_POST['wpdiscuz_unique_id']) ? trim($_POST['wpdiscuz_unique_id']) : '';
|
216 |
+
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : '';
|
217 |
if ($uniqueId && $postId) {
|
218 |
do_action('wpdiscuz_add_comment');
|
219 |
if (function_exists('zerospam_get_key') && isset($_POST['wpdiscuz_zs']) && ($wpdiscuzZS = $_POST['wpdiscuz_zs'])) {
|
363 |
* get comment text from db
|
364 |
*/
|
365 |
public function editComment() {
|
366 |
+
$messageArray = array('code' => 0);
|
367 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
368 |
if ($commentId) {
|
369 |
$comment = get_comment($commentId);
|
392 |
* save edited comment via ajax
|
393 |
*/
|
394 |
public function saveEditedComment() {
|
395 |
+
$messageArray = array('code' => 0);
|
396 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
397 |
$trimmedContent = isset($_POST['commentContent']) ? trim($_POST['commentContent']) : '';
|
398 |
if ($commentId && $trimmedContent) {
|
401 |
$isCurrentUserCanEdit = $current_user && ($comment->user_id == $current_user->ID || current_user_can('edit_comment', $comment->comment_ID));
|
402 |
if ($this->helper->isContentInRange($trimmedContent) && $isCurrentUserCanEdit) {
|
403 |
if ($trimmedContent != $comment->comment_content) {
|
404 |
+
$commentContent = wp_kses($trimmedContent, $this->helper->wc_allowed_tags);
|
405 |
$author_ip = $this->helper->getRealIPAddr();
|
406 |
$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
|
407 |
$commentarr = array(
|
411 |
'comment_agent' => apply_filters('pre_comment_user_agent', $userAgent),
|
412 |
'comment_approved' => $comment->comment_approved
|
413 |
);
|
414 |
+
if (wp_update_comment($commentarr)) {
|
415 |
$uniqueId = $comment->comment_ID . '_' . $comment->comment_parent;
|
416 |
$messageArray['code'] = 1;
|
417 |
+
$commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
|
418 |
+
$commentContent = $this->helper->makeClickable($commentContent);
|
419 |
+
$commentContent = apply_filters('comment_text', $commentContent, $comment);
|
420 |
if ($this->optionsSerialized->commentReadMoreLimit && count(explode(' ', strip_tags($commentContent))) > $this->optionsSerialized->commentReadMoreLimit) {
|
421 |
$commentContent = $this->helper->getCommentExcerpt($commentContent, $uniqueId);
|
422 |
}
|
423 |
+
$messageArray['message'] = stripslashes($commentContent);
|
|
|
|
|
424 |
} else {
|
425 |
$messageArray['code'] = 'wc_comment_not_updated';
|
426 |
}
|
437 |
public function getSingleComment() {
|
438 |
global $current_user;
|
439 |
get_currentuserinfo();
|
440 |
+
$messageArray = array('code' => 0);
|
441 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
442 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
443 |
if ($commentId && $postId) {
|
453 |
$commentListArgs['current_user'] = $current_user;
|
454 |
$messageArray['message'] = wp_list_comments($commentListArgs, $comments);
|
455 |
$this->commentsArgs['caller'] = '';
|
|
|
456 |
}
|
457 |
+
wp_die(json_encode($messageArray));
|
458 |
}
|
459 |
|
460 |
/**
|
461 |
* redirect first commenter to the selected page from options
|
462 |
*/
|
463 |
public function redirect() {
|
464 |
+
$messageArray = array('code' => 0);
|
465 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
466 |
if ($this->optionsSerialized->redirectPage && $commentId) {
|
467 |
$comment = get_comment($commentId);
|
498 |
}
|
499 |
|
500 |
public function voteOnComment() {
|
501 |
+
$messageArray = array('code' => 0);
|
502 |
if ($this->optionsSerialized->votingButtonsShowHide) {
|
503 |
+
wp_die(json_encode($messageArray));
|
504 |
}
|
|
|
505 |
$isUserLoggedIn = is_user_logged_in();
|
506 |
if (!$this->optionsSerialized->isGuestCanVote && !$isUserLoggedIn) {
|
507 |
$messageArray['code'] = 'wc_login_to_vote';
|
549 |
}
|
550 |
|
551 |
public function wpdiscuzSorting() {
|
552 |
+
$messageArray = array('code' => 0);
|
553 |
$postId = isset($_POST['postId']) ? intval($_POST['postId']) : 0;
|
554 |
$orderBy = isset($_POST['orderBy']) ? trim($_POST['orderBy']) : '';
|
555 |
$order = isset($_POST['order']) ? trim($_POST['order']) : '';
|
567 |
$messageArray['last_parent_id'] = $commentData['last_parent_id'];
|
568 |
$messageArray['is_show_load_more'] = $commentData['is_show_load_more'];
|
569 |
$messageArray['message'] = $commentData['comment_list'];
|
|
|
570 |
}
|
571 |
+
wp_die(json_encode($messageArray));
|
572 |
}
|
573 |
|
574 |
/**
|
575 |
* loads the comment content on click via ajax
|
576 |
*/
|
577 |
public function readMore() {
|
578 |
+
$messageArray = array('code' => 0);
|
579 |
$commentId = isset($_POST['commentId']) ? intval($_POST['commentId']) : 0;
|
580 |
if ($commentId) {
|
581 |
$comment = get_comment($commentId);
|
582 |
$commentContent = wp_kses($comment->comment_content, $this->helper->wc_allowed_tags);
|
583 |
+
$commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
|
584 |
$commentContent = $this->helper->makeClickable($commentContent);
|
585 |
+
$commentContent = apply_filters('comment_text', $commentContent, $comment);
|
586 |
$messageArray['code'] = 1;
|
587 |
$messageArray['message'] = $commentContent;
|
588 |
+
} else {
|
589 |
+
$messageArray['message'] = 'error';
|
590 |
}
|
|
|
|
|
591 |
wp_die(json_encode($messageArray));
|
592 |
}
|
593 |
|
633 |
public function getCommentsArgs($args) {
|
634 |
global $wpdb;
|
635 |
if ($this->commentsArgs['caller'] === 'wpdiscuz' && $this->commentsArgs['wc_comments']) {
|
636 |
+
$orderby = '';
|
637 |
+
$args['caller'] = 'wpdiscuz-';
|
638 |
$comments = implode(',', $this->commentsArgs['wc_comments']);
|
639 |
$commentIds = trim($comments, ',');
|
640 |
+
$args['where'] .= " AND " . $wpdb->comments . ".comment_ID IN ($commentIds) ";
|
641 |
+
if (!$this->optionsSerialized->votingButtonsShowHide) {
|
642 |
+
$args['join'] .= "INNER JOIN " . $wpdb->commentmeta . " ON " . $wpdb->comments . ".comment_ID = " . $wpdb->commentmeta . ".comment_id";
|
643 |
+
$args['where'] .= "AND (" . $wpdb->commentmeta . ".meta_key = '" . self::META_KEY_VOTES . "')";
|
644 |
+
}
|
645 |
if ($this->commentsArgs['orderby'] == 'by_vote') {
|
646 |
$orderby = $wpdb->commentmeta . ".meta_value+0 DESC, ";
|
647 |
}
|
721 |
*/
|
722 |
public function frontEndStylesScripts() {
|
723 |
global $post;
|
724 |
+
if ($this->helper->isLoadWpdiscuz($post)) {
|
725 |
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
726 |
wp_register_style('wpdiscuz-frontend-css', plugins_url(WPDISCUZ_DIR_NAME . '/assets/css/wpdiscuz.min.css'), null, $this->version);
|
727 |
wp_enqueue_style('wpdiscuz-frontend-css');
|
728 |
|
729 |
if (is_rtl()) {
|
730 |
+
wp_register_style('wpdiscuz-frontend-rtl-css', plugins_url(WPDISCUZ_DIR_NAME . '/assets/css/wpdiscuz-rtl.min.css'), null, $this->version);
|
731 |
wp_enqueue_style('wpdiscuz-frontend-rtl-css');
|
732 |
}
|
733 |
if (preg_match('/MSIE/i', $u_agent)) {
|
755 |
wp_enqueue_script('jquery-form');
|
756 |
wp_register_script('wpdiscuz-ajax-js', plugins_url(WPDISCUZ_DIR_NAME . '/assets/js/wpdiscuz.min.js'), array('jquery'), $this->version);
|
757 |
wp_enqueue_script('wpdiscuz-ajax-js');
|
758 |
+
wp_localize_script('wpdiscuz-ajax-js', 'wpdiscuzAjaxObj', array('url' => admin_url('admin-ajax.php'), 'wpdiscuz_options' => $this->wpdiscuzOptionsJs));
|
759 |
do_action('wpdiscuz_front_scripts');
|
760 |
}
|
761 |
}
|
762 |
|
763 |
public function pluginNewVersion() {
|
764 |
$this->dbManager->createEmailNotificationTable();
|
765 |
+
$wc_plugin_data = get_plugin_data(__FILE__);
|
766 |
if (version_compare($wc_plugin_data['Version'], $this->version, '>')) {
|
767 |
$options = $this->changeOldOptions(get_option(self::OPTION_SLUG_OPTIONS));
|
768 |
$this->addNewOptions($options);
|
784 |
$this->dbManager->alterNotificationTable();
|
785 |
}
|
786 |
}
|
787 |
+
do_action('wpdiscuz_check_version');
|
788 |
}
|
789 |
|
790 |
/**
|
844 |
|
845 |
public function initCurrentPostType() {
|
846 |
global $post;
|
847 |
+
if ($this->helper->isLoadWpdiscuz($post)) {
|
848 |
add_filter('comments_template', array(&$this, 'addCommentForm'), 10);
|
849 |
}
|
850 |
}
|
857 |
private function getCommentListArgs($postId) {
|
858 |
$postsAuthors = $this->dbManager->getPostsAuthors();
|
859 |
$post = get_post($postId);
|
860 |
+
$args = array(
|
861 |
'style' => 'div',
|
862 |
'echo' => false,
|
863 |
'isSingle' => false,
|
866 |
'posts_authors' => $postsAuthors,
|
867 |
'walker' => $this->wpdiscuzWalker,
|
868 |
);
|
869 |
+
return $args;
|
870 |
}
|
871 |
|
872 |
public function addNewRoles() {
|
894 |
}
|
895 |
|
896 |
$wpdiscuz = new WpdiscuzCore();
|
897 |
+
$GLOBALS['wpdiscuz'] = $wpdiscuz;
|
includes/class.WpdiscuzCss.php
CHANGED
@@ -7,9 +7,11 @@ if (!defined('ABSPATH')) {
|
|
7 |
class WpdiscuzCss {
|
8 |
|
9 |
private $optionsSerialized;
|
|
|
10 |
|
11 |
-
function __construct($optionsSerialized) {
|
12 |
$this->optionsSerialized = $optionsSerialized;
|
|
|
13 |
}
|
14 |
|
15 |
/**
|
@@ -17,9 +19,9 @@ class WpdiscuzCss {
|
|
17 |
*/
|
18 |
public function initCustomCss() {
|
19 |
global $post;
|
20 |
-
if ($
|
21 |
?>
|
22 |
-
<style type="text/css">#wpcomm .wc_new_comment{background:<?php echo $this->optionsSerialized->primaryColor; ?>;}#wpcomm .wc_new_reply{background:<?php echo $this->optionsSerialized->primaryColor; ?>;}#wpcomm .wc-form-wrapper{background:<?php echo isset($this->optionsSerialized->formBGColor)?$this->optionsSerialized->formBGColor:'#f9f9f9'; ?>;}#wpcomm select,#wpcomm
|
23 |
<?php
|
24 |
}
|
25 |
}
|
7 |
class WpdiscuzCss {
|
8 |
|
9 |
private $optionsSerialized;
|
10 |
+
private $helper;
|
11 |
|
12 |
+
function __construct($optionsSerialized, $helper) {
|
13 |
$this->optionsSerialized = $optionsSerialized;
|
14 |
+
$this->helper = $helper;
|
15 |
}
|
16 |
|
17 |
/**
|
19 |
*/
|
20 |
public function initCustomCss() {
|
21 |
global $post;
|
22 |
+
if ($this->helper->isLoadWpdiscuz($post)) {
|
23 |
?>
|
24 |
+
<style type="text/css">#wpcomm .wc_new_comment{background:<?php echo $this->optionsSerialized->primaryColor; ?>;}#wpcomm .wc_new_reply{background:<?php echo $this->optionsSerialized->primaryColor; ?>;}#wpcomm .wc-form-wrapper{background:<?php echo isset($this->optionsSerialized->formBGColor)?$this->optionsSerialized->formBGColor:'#f9f9f9'; ?>;}#wpcomm select,#wpcomm input[type="text"],#wpcomm input[type="email"],#wpcomm input[type="url"]{border:<?php echo $this->optionsSerialized->inputBorderColor; ?> 1px solid;}#wpcomm .wc-comment .wc-comment-right{background:<?php echo $this->optionsSerialized->commentBGColor; ?>;}#wpcomm .wc-reply .wc-comment-right{background:<?php echo $this->optionsSerialized->replyBGColor; ?>;}#wpcomm .wc-comment-text{font-size:<?php echo isset($this->optionsSerialized->commentTextSize)?$this->optionsSerialized->commentTextSize:'14px'; ?>;color:<?php echo $this->optionsSerialized->commentTextColor; ?>;}<?php $blogRoles=$this->optionsSerialized->blogRoles;if(!$blogRoles){echo '.wc-comment-author a{color:#00B38F;} .wc-comment-label{background:#00B38F;}';}foreach($blogRoles as $role=>$color){echo '#wpcomm .wc-blog-'.$role.' > .wc-comment-right .wc-comment-author,#wpcomm .wc-blog-'.$role.' > .wc-comment-right .wc-comment-author a{color:'.$color.';}';echo '#wpcomm .wc-blog-'.$role.' > .wc-comment-left .wc-comment-label{background:'.$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->optionsSerialized->voteReplyColor; ?>;}#wpcomm .wc-comment-footer .wc-vote-result{background:<?php echo $this->optionsSerialized->voteReplyColor; ?>;}#wpcomm .wc-reply-link,#wpcomm .wc-vote-link,#wpcomm .wc-share-link{color:<?php echo $this->optionsSerialized->voteReplyColor; ?>;}.wc-load-more-submit{border:1px solid <?php echo $this->optionsSerialized->inputBorderColor; ?>;}#wpcomm .wc-new-loaded-comment > .wc-comment-right{background:<?php echo $this->optionsSerialized->newLoadedCommentBGColor; ?>;}<?php echo stripslashes($this->optionsSerialized->customCss); ?>.wpdiscuz-front-actions{background:<?php echo isset($this->optionsSerialized->formBGColor)?$this->optionsSerialized->formBGColor:'#f9f9f9'; ?>;}.wpdiscuz-subscribe-bar{background:<?php echo isset($this->optionsSerialized->formBGColor)?$this->optionsSerialized->formBGColor : '#f9f9f9'; ?>;}.wpdiscuz-sort-buttons{color:<?php echo $this->optionsSerialized->voteReplyColor; ?>;}.wpdiscuz-sort-button{color:<?php echo $this->optionsSerialized->voteReplyColor; ?>; cursor:pointer;}.wpdiscuz-sort-button:hover{color:<?php echo $this->optionsSerialized->primaryColor; ?>;cursor:pointer;}.wpdiscuz-sort-button-active{color:<?php echo $this->optionsSerialized->primaryColor; ?>!important;cursor:default!important;}#wpcomm .page-numbers{color:<?php echo $this->optionsSerialized->commentTextColor; ?>;border:<?php echo $this->optionsSerialized->commentTextColor; ?> 1px solid;}#wpcomm span.current{background:<?php echo $this->optionsSerialized->commentTextColor; ?>;}#wpcomm .wpdiscuz-readmore{cursor:pointer;color:<?php echo $this->optionsSerialized->primaryColor; ?>;}<?php do_action('wpdiscuz_dynamic_css'); ?> #wpcomm .wpdiscuz-textarea-wrap{border:<?php echo $this->optionsSerialized->inputBorderColor; ?> 1px solid;}</style>
|
25 |
<?php
|
26 |
}
|
27 |
}
|
languages/wpdiscuz-hu_HU.mo
ADDED
Binary file
|
languages/wpdiscuz-hu_HU.po
ADDED
@@ -0,0 +1,1286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2015 wpDiscuz - Supercharged native comments
|
2 |
+
# This file is distributed under the same license as the wpDiscuz - Supercharged native comments package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: wpDiscuz - Supercharged native comments 3.0.5\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpdiscuz\n"
|
7 |
+
"POT-Creation-Date: 2015-11-13 20:25:18+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2016-02-15 22:18+0100\n"
|
12 |
+
"Last-Translator: \n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: Poedit 1.6.10\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: hu_HU\n"
|
17 |
+
|
18 |
+
#: class.WpdiscuzCore.php:226
|
19 |
+
#: templates/comment/class.WpdiscuzTemplateBuilder.php:245
|
20 |
+
msgid "Anonymous"
|
21 |
+
msgstr "Anonim"
|
22 |
+
|
23 |
+
#: class.WpdiscuzCore.php:800 options/options-layouts/settings-social.php:12
|
24 |
+
#: options/options-layouts/settings-social.php:14
|
25 |
+
#: options/options-layouts/settings-social.php:16
|
26 |
+
#: options/options-layouts/settings-social.php:18
|
27 |
+
msgid "Settings"
|
28 |
+
msgstr "Beállítások"
|
29 |
+
|
30 |
+
#: class.WpdiscuzCore.php:802
|
31 |
+
msgid "Phrases"
|
32 |
+
msgstr "Kifejezések"
|
33 |
+
|
34 |
+
#: options/class.WpdiscuzOptions.php:37 options/class.WpdiscuzOptions.php:273
|
35 |
+
msgid "Hacker?"
|
36 |
+
msgstr "Hekker?"
|
37 |
+
|
38 |
+
#: options/class.WpdiscuzOptions.php:95
|
39 |
+
msgid "wpDiscuz General Settings"
|
40 |
+
msgstr "wpDiscuz Általános Beállítások"
|
41 |
+
|
42 |
+
#: options/class.WpdiscuzOptions.php:186
|
43 |
+
msgid "General settings"
|
44 |
+
msgstr "Általános beállítások"
|
45 |
+
|
46 |
+
#: options/class.WpdiscuzOptions.php:187
|
47 |
+
#: options/options-layouts/settings-live-update.php:7
|
48 |
+
msgid "Live Update"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: options/class.WpdiscuzOptions.php:188
|
52 |
+
#: options/options-layouts/settings-show-hide.php:7
|
53 |
+
msgid "Show/Hide Components"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: options/class.WpdiscuzOptions.php:189
|
57 |
+
msgid "Email Subscription"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: options/class.WpdiscuzOptions.php:189
|
61 |
+
msgid "and Postmatic"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: options/class.WpdiscuzOptions.php:190
|
65 |
+
#: options/options-layouts/settings-style.php:7
|
66 |
+
msgid "Background and Colors"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: options/class.WpdiscuzOptions.php:191
|
70 |
+
#: options/options-layouts/settings-social.php:91
|
71 |
+
msgid "Social Login"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: options/class.WpdiscuzOptions.php:255
|
75 |
+
msgid "Reset Options"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: options/class.WpdiscuzOptions.php:257
|
79 |
+
msgid "Refresh comment optimization"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: options/class.WpdiscuzOptions.php:258 options/class.WpdiscuzOptions.php:447
|
83 |
+
msgid "Save Changes"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: options/class.WpdiscuzOptions.php:386
|
87 |
+
msgid "WpDiscuz Front-end Phrases"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: options/class.WpdiscuzOptions.php:396
|
91 |
+
msgid "General"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: options/class.WpdiscuzOptions.php:397
|
95 |
+
msgid "Form"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: options/class.WpdiscuzOptions.php:398
|
99 |
+
#: options/class.WpdiscuzOptionsSerialized.php:444
|
100 |
+
#: options/phrases-layouts/phrases-general.php:32
|
101 |
+
msgid "Comment"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: options/class.WpdiscuzOptions.php:399
|
105 |
+
msgid "Date/Time"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: options/class.WpdiscuzOptions.php:400
|
109 |
+
#: options/class.WpdiscuzOptionsSerialized.php:449
|
110 |
+
msgid "Email"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: options/class.WpdiscuzOptions.php:401
|
114 |
+
msgid "Notification"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: options/class.WpdiscuzOptionsSerialized.php:442
|
118 |
+
#: options/phrases-layouts/phrases-general.php:12
|
119 |
+
msgid "Leave a Reply"
|
120 |
+
msgstr "Szólj hozzá!"
|
121 |
+
|
122 |
+
#: options/class.WpdiscuzOptionsSerialized.php:443
|
123 |
+
msgid "Be the First to Comment!"
|
124 |
+
msgstr "Legyél te az első hozzászóló!"
|
125 |
+
|
126 |
+
#: options/class.WpdiscuzOptionsSerialized.php:445
|
127 |
+
msgid "Comments"
|
128 |
+
msgstr "hozzászólás"
|
129 |
+
|
130 |
+
#: options/class.WpdiscuzOptionsSerialized.php:446
|
131 |
+
msgid "on"
|
132 |
+
msgstr ":"
|
133 |
+
|
134 |
+
#: options/class.WpdiscuzOptionsSerialized.php:447
|
135 |
+
msgid "Start the discussion"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: options/class.WpdiscuzOptionsSerialized.php:448
|
139 |
+
msgid "Join the discussion"
|
140 |
+
msgstr "Szólj hozzá te is!"
|
141 |
+
|
142 |
+
#: options/class.WpdiscuzOptionsSerialized.php:450
|
143 |
+
msgid "Name"
|
144 |
+
msgstr "Név"
|
145 |
+
|
146 |
+
#: options/class.WpdiscuzOptionsSerialized.php:451
|
147 |
+
msgid "WebSite URL"
|
148 |
+
msgstr "Webcím"
|
149 |
+
|
150 |
+
#: options/class.WpdiscuzOptionsSerialized.php:452
|
151 |
+
msgid "Please insert the code above to comment"
|
152 |
+
msgstr "Írd be a a kódot"
|
153 |
+
|
154 |
+
#: options/class.WpdiscuzOptionsSerialized.php:453
|
155 |
+
msgid "Post Comment"
|
156 |
+
msgstr "Hozzászólás küldése"
|
157 |
+
|
158 |
+
#: options/class.WpdiscuzOptionsSerialized.php:454
|
159 |
+
#: options/phrases-layouts/phrases-form.php:82
|
160 |
+
#: options/phrases-layouts/phrases-form.php:86
|
161 |
+
msgid "Notify of"
|
162 |
+
msgstr "Visszajelzés"
|
163 |
+
|
164 |
+
#: options/class.WpdiscuzOptionsSerialized.php:455
|
165 |
+
#: options/phrases-layouts/phrases-form.php:96
|
166 |
+
msgid "new follow-up comments"
|
167 |
+
msgstr "ha új hozzászólás érkezik"
|
168 |
+
|
169 |
+
#: options/class.WpdiscuzOptionsSerialized.php:456
|
170 |
+
msgid "new replies to my comments"
|
171 |
+
msgstr "ha válaszolnak a hozzászólásomra"
|
172 |
+
|
173 |
+
#: options/class.WpdiscuzOptionsSerialized.php:457
|
174 |
+
#: options/phrases-layouts/phrases-form.php:116
|
175 |
+
msgid "Notify of new replies to this comment"
|
176 |
+
msgstr "Visszajelzés, ha új válasz érkezik erre a hozzászólásra"
|
177 |
+
|
178 |
+
#: options/class.WpdiscuzOptionsSerialized.php:458
|
179 |
+
#: options/phrases-layouts/phrases-form.php:122
|
180 |
+
#: options/phrases-layouts/phrases-form.php:126
|
181 |
+
msgid "Sort by"
|
182 |
+
msgstr "Rendezés"
|
183 |
+
|
184 |
+
#: options/class.WpdiscuzOptionsSerialized.php:459
|
185 |
+
#: options/phrases-layouts/phrases-form.php:132
|
186 |
+
#: options/phrases-layouts/phrases-form.php:136
|
187 |
+
msgid "newest"
|
188 |
+
msgstr "legújabb"
|
189 |
+
|
190 |
+
#: options/class.WpdiscuzOptionsSerialized.php:460
|
191 |
+
#: options/phrases-layouts/phrases-form.php:142
|
192 |
+
#: options/phrases-layouts/phrases-form.php:146
|
193 |
+
msgid "oldest"
|
194 |
+
msgstr "legrégebbi"
|
195 |
+
|
196 |
+
#: options/class.WpdiscuzOptionsSerialized.php:461
|
197 |
+
#: options/phrases-layouts/phrases-form.php:152
|
198 |
+
#: options/phrases-layouts/phrases-form.php:156
|
199 |
+
msgid "most voted"
|
200 |
+
msgstr "legnépszerűbb"
|
201 |
+
|
202 |
+
#: options/class.WpdiscuzOptionsSerialized.php:462
|
203 |
+
msgid "Load More Comments"
|
204 |
+
msgstr "További hozzászólások"
|
205 |
+
|
206 |
+
#: options/class.WpdiscuzOptionsSerialized.php:463
|
207 |
+
#: options/phrases-layouts/phrases-general.php:72
|
208 |
+
msgid "Load Rest of Comments"
|
209 |
+
msgstr "További hozzászólások betöltése"
|
210 |
+
|
211 |
+
#: options/class.WpdiscuzOptionsSerialized.php:464
|
212 |
+
#: options/phrases-layouts/phrases-comment.php:12
|
213 |
+
msgid "Reply"
|
214 |
+
msgstr "Válasz"
|
215 |
+
|
216 |
+
#: options/class.WpdiscuzOptionsSerialized.php:465
|
217 |
+
#: options/phrases-layouts/phrases-comment.php:22
|
218 |
+
msgid "Share"
|
219 |
+
msgstr "Megosztás"
|
220 |
+
|
221 |
+
#: options/class.WpdiscuzOptionsSerialized.php:466
|
222 |
+
#: options/phrases-layouts/phrases-comment.php:32
|
223 |
+
#: templates/comment/class.WpdiscuzTemplateBuilder.php:182
|
224 |
+
msgid "Edit"
|
225 |
+
msgstr "Szerkesztés"
|
226 |
+
|
227 |
+
#: options/class.WpdiscuzOptionsSerialized.php:467
|
228 |
+
#: options/phrases-layouts/phrases-comment.php:42
|
229 |
+
msgid "Share On Facebook"
|
230 |
+
msgstr "Megosztás Facebook-on"
|
231 |
+
|
232 |
+
#: options/class.WpdiscuzOptionsSerialized.php:468
|
233 |
+
#: options/phrases-layouts/phrases-comment.php:52
|
234 |
+
msgid "Share On Twitter"
|
235 |
+
msgstr "Megosztás Twitter-en"
|
236 |
+
|
237 |
+
#: options/class.WpdiscuzOptionsSerialized.php:469
|
238 |
+
#: options/phrases-layouts/phrases-comment.php:62
|
239 |
+
msgid "Share On Google"
|
240 |
+
msgstr "Megosztás Google-ön"
|
241 |
+
|
242 |
+
#: options/class.WpdiscuzOptionsSerialized.php:470
|
243 |
+
#: options/phrases-layouts/phrases-comment.php:72
|
244 |
+
msgid "Share On VKontakte"
|
245 |
+
msgstr "Megosztás VKontakte-n"
|
246 |
+
|
247 |
+
#: options/class.WpdiscuzOptionsSerialized.php:471
|
248 |
+
#: options/phrases-layouts/phrases-comment.php:82
|
249 |
+
msgid "Share On Odnoklassniki"
|
250 |
+
msgstr "Megosztás Odnoklassniki-n"
|
251 |
+
|
252 |
+
#: options/class.WpdiscuzOptionsSerialized.php:472
|
253 |
+
#: options/phrases-layouts/phrases-comment.php:92
|
254 |
+
msgid "Hide Replies"
|
255 |
+
msgstr "Válaszok elrejtése"
|
256 |
+
|
257 |
+
#: options/class.WpdiscuzOptionsSerialized.php:473
|
258 |
+
#: options/phrases-layouts/phrases-comment.php:102
|
259 |
+
msgid "Show Replies"
|
260 |
+
msgstr "Válaszok mutatása"
|
261 |
+
|
262 |
+
#: options/class.WpdiscuzOptionsSerialized.php:474
|
263 |
+
msgid "Guest"
|
264 |
+
msgstr "Vendég"
|
265 |
+
|
266 |
+
#: options/class.WpdiscuzOptionsSerialized.php:475
|
267 |
+
msgid "Member"
|
268 |
+
msgstr "Tag"
|
269 |
+
|
270 |
+
#: options/class.WpdiscuzOptionsSerialized.php:476
|
271 |
+
msgid "Author"
|
272 |
+
msgstr "Szerző"
|
273 |
+
|
274 |
+
#: options/class.WpdiscuzOptionsSerialized.php:477
|
275 |
+
msgid "Admin"
|
276 |
+
msgstr "Admin"
|
277 |
+
|
278 |
+
#: options/class.WpdiscuzOptionsSerialized.php:478
|
279 |
+
#: options/phrases-layouts/phrases-general.php:86
|
280 |
+
msgid "New Comment"
|
281 |
+
msgstr "Új hozzászólás"
|
282 |
+
|
283 |
+
#: options/class.WpdiscuzOptionsSerialized.php:479
|
284 |
+
msgid "New comment on the discussion section you've been interested in"
|
285 |
+
msgstr "Új hozzászólás, ami érdekelhet"
|
286 |
+
|
287 |
+
#: options/class.WpdiscuzOptionsSerialized.php:480
|
288 |
+
#: options/phrases-layouts/phrases-email.php:36
|
289 |
+
#: options/phrases-layouts/phrases-general.php:106
|
290 |
+
#: utils/class.WpdiscuzEmailHelper.php:155
|
291 |
+
msgid "New Reply"
|
292 |
+
msgstr "Új válasz"
|
293 |
+
|
294 |
+
#: options/class.WpdiscuzOptionsSerialized.php:481
|
295 |
+
#: utils/class.WpdiscuzEmailHelper.php:156
|
296 |
+
msgid "New reply on the discussion section you've been interested in"
|
297 |
+
msgstr "Új válasz a hozzászólásokbanm, ami érdekelhet"
|
298 |
+
|
299 |
+
#: options/class.WpdiscuzOptionsSerialized.php:482
|
300 |
+
msgid "You're subscribed for new replies on this comment"
|
301 |
+
msgstr "Feliratkoztál az ehhez a hozzászóláshoz érkező új válaszokra"
|
302 |
+
|
303 |
+
#: options/class.WpdiscuzOptionsSerialized.php:483
|
304 |
+
msgid "You're subscribed for new replies on all your comments"
|
305 |
+
msgstr "Feliratkoztál az összes hozzászólásodhoz érkező új válaszokra"
|
306 |
+
|
307 |
+
#: options/class.WpdiscuzOptionsSerialized.php:484
|
308 |
+
msgid "You're subscribed for new follow-up comments on this post"
|
309 |
+
msgstr "Feliratkoztál az összes ehhez a cikkhez érkező hozzászólásra"
|
310 |
+
|
311 |
+
#: options/class.WpdiscuzOptionsSerialized.php:485
|
312 |
+
#: options/phrases-layouts/phrases-email.php:52
|
313 |
+
#: options/phrases-layouts/phrases-email.php:56
|
314 |
+
msgid "Unsubscribe"
|
315 |
+
msgstr "Leiratkozás"
|
316 |
+
|
317 |
+
#: options/class.WpdiscuzOptionsSerialized.php:486
|
318 |
+
#: options/phrases-layouts/phrases-email.php:66
|
319 |
+
msgid "Cancel subscription"
|
320 |
+
msgstr "Feliratkozás törlése"
|
321 |
+
|
322 |
+
#: options/class.WpdiscuzOptionsSerialized.php:487
|
323 |
+
#: options/phrases-layouts/phrases-notification.php:32
|
324 |
+
msgid "You've successfully unsubscribed."
|
325 |
+
msgstr "Sikeresen leiratkoztál"
|
326 |
+
|
327 |
+
#: options/class.WpdiscuzOptionsSerialized.php:488
|
328 |
+
#: options/phrases-layouts/phrases-notification.php:22
|
329 |
+
msgid "You've successfully subscribed."
|
330 |
+
msgstr "Sikeresen feliratkoztál"
|
331 |
+
|
332 |
+
#: options/class.WpdiscuzOptionsSerialized.php:489
|
333 |
+
#: options/phrases-layouts/phrases-email.php:72
|
334 |
+
#: options/phrases-layouts/phrases-email.php:76
|
335 |
+
msgid "Confirm your subscription"
|
336 |
+
msgstr "Feliratkozás visszaigazolása"
|
337 |
+
|
338 |
+
#: options/class.WpdiscuzOptionsSerialized.php:490
|
339 |
+
#: options/phrases-layouts/phrases-email.php:82
|
340 |
+
#: options/phrases-layouts/phrases-email.php:86
|
341 |
+
msgid "You've successfully confirmed your subscription."
|
342 |
+
msgstr "Sikeresen visszaigazoltad a feliratkozásod"
|
343 |
+
|
344 |
+
#: options/class.WpdiscuzOptionsSerialized.php:491
|
345 |
+
#: options/phrases-layouts/phrases-email.php:96
|
346 |
+
#: utils/class.WpdiscuzEmailHelper.php:45
|
347 |
+
msgid "Subscribe Confirmation"
|
348 |
+
msgstr "Feliratkozás visszaigazolása"
|
349 |
+
|
350 |
+
#: options/class.WpdiscuzOptionsSerialized.php:492
|
351 |
+
#: options/phrases-layouts/phrases-email.php:106
|
352 |
+
#: utils/class.WpdiscuzEmailHelper.php:46
|
353 |
+
msgid ""
|
354 |
+
"Hi, <br/> You just subscribed for new comments on our website. This means "
|
355 |
+
"you will receive an email when new comments are posted according to "
|
356 |
+
"subscription option you've chosen. <br/> To activate, click confirm below. "
|
357 |
+
"If you believe this is an error, ignore this message and we'll never bother "
|
358 |
+
"you again."
|
359 |
+
msgstr ""
|
360 |
+
"Szia! <br/> Feliratkozták az oldalunkra érkező egyes hozzászólásokra. Ez azt "
|
361 |
+
"jelenti, hogy mindig, amikor olyan hozzászólás érkezik, ami megfelel a "
|
362 |
+
"feliratkozáskor megadott feltételeknek, arról emailt küldünk neked. <br/> Ha "
|
363 |
+
"tényleg szeretnél ilyen tartalmú emaileket kapni, akkor klikkelj az alábbi "
|
364 |
+
"linkre. Ha tévedésből kaptad ezt az email, akkor nem kell tenned semmi, és "
|
365 |
+
"nem fogsz kapni a hozzászólásokról semmilyen visszajelzést."
|
366 |
+
|
367 |
+
#: options/class.WpdiscuzOptionsSerialized.php:493
|
368 |
+
msgid "please fill out this field to comment"
|
369 |
+
msgstr "Kérjük, töltsd ki ezt a mezőt a hozzászóláshoz!"
|
370 |
+
|
371 |
+
#: options/class.WpdiscuzOptionsSerialized.php:494
|
372 |
+
msgid "email address is invalid"
|
373 |
+
msgstr "érvénytelen email cín"
|
374 |
+
|
375 |
+
#: options/class.WpdiscuzOptionsSerialized.php:495
|
376 |
+
msgid "url is invalid"
|
377 |
+
msgstr "érvénytelen url"
|
378 |
+
|
379 |
+
#: options/class.WpdiscuzOptionsSerialized.php:496
|
380 |
+
msgid "year"
|
381 |
+
msgstr "éve"
|
382 |
+
|
383 |
+
#: options/class.WpdiscuzOptionsSerialized.php:497
|
384 |
+
msgid "years"
|
385 |
+
msgstr "éve"
|
386 |
+
|
387 |
+
#: options/class.WpdiscuzOptionsSerialized.php:498
|
388 |
+
msgid "month"
|
389 |
+
msgstr "hónapja"
|
390 |
+
|
391 |
+
#: options/class.WpdiscuzOptionsSerialized.php:499
|
392 |
+
msgid "months"
|
393 |
+
msgstr "hónapja"
|
394 |
+
|
395 |
+
#: options/class.WpdiscuzOptionsSerialized.php:500
|
396 |
+
msgid "day"
|
397 |
+
msgstr "napja"
|
398 |
+
|
399 |
+
#: options/class.WpdiscuzOptionsSerialized.php:501
|
400 |
+
msgid "days"
|
401 |
+
msgstr "napja"
|
402 |
+
|
403 |
+
#: options/class.WpdiscuzOptionsSerialized.php:502
|
404 |
+
msgid "hour"
|
405 |
+
msgstr "órája"
|
406 |
+
|
407 |
+
#: options/class.WpdiscuzOptionsSerialized.php:503
|
408 |
+
msgid "hours"
|
409 |
+
msgstr "órája"
|
410 |
+
|
411 |
+
#: options/class.WpdiscuzOptionsSerialized.php:504
|
412 |
+
msgid "minute"
|
413 |
+
msgstr "perce"
|
414 |
+
|
415 |
+
#: options/class.WpdiscuzOptionsSerialized.php:505
|
416 |
+
msgid "minutes"
|
417 |
+
msgstr "perce"
|
418 |
+
|
419 |
+
#: options/class.WpdiscuzOptionsSerialized.php:506
|
420 |
+
msgid "second"
|
421 |
+
msgstr "másodperce"
|
422 |
+
|
423 |
+
#: options/class.WpdiscuzOptionsSerialized.php:507
|
424 |
+
msgid "seconds"
|
425 |
+
msgstr "másodperce"
|
426 |
+
|
427 |
+
#: options/class.WpdiscuzOptionsSerialized.php:508
|
428 |
+
msgid "right now"
|
429 |
+
msgstr "most"
|
430 |
+
|
431 |
+
#: options/class.WpdiscuzOptionsSerialized.php:509
|
432 |
+
msgid "ago"
|
433 |
+
msgstr " "
|
434 |
+
|
435 |
+
#: options/class.WpdiscuzOptionsSerialized.php:510
|
436 |
+
#: options/phrases-layouts/phrases-datetime.php:156
|
437 |
+
msgid "Today"
|
438 |
+
msgstr "Ma"
|
439 |
+
|
440 |
+
#: options/class.WpdiscuzOptionsSerialized.php:511
|
441 |
+
#: options/phrases-layouts/phrases-notification.php:72
|
442 |
+
msgid "You must be"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: options/class.WpdiscuzOptionsSerialized.php:512
|
446 |
+
msgid "You are logged in as"
|
447 |
+
msgstr "Belépve, mint"
|
448 |
+
|
449 |
+
#: options/class.WpdiscuzOptionsSerialized.php:513
|
450 |
+
#: options/phrases-layouts/phrases-notification.php:92
|
451 |
+
msgid "Log out"
|
452 |
+
msgstr "Kilépés"
|
453 |
+
|
454 |
+
#: options/class.WpdiscuzOptionsSerialized.php:514
|
455 |
+
msgid "logged in"
|
456 |
+
msgstr "belépve"
|
457 |
+
|
458 |
+
#: options/class.WpdiscuzOptionsSerialized.php:515
|
459 |
+
msgid "to post a comment."
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: options/class.WpdiscuzOptionsSerialized.php:516
|
463 |
+
#: options/phrases-layouts/phrases-comment.php:152
|
464 |
+
msgid "Vote Up"
|
465 |
+
msgstr "Jóság"
|
466 |
+
|
467 |
+
#: options/class.WpdiscuzOptionsSerialized.php:517
|
468 |
+
#: options/phrases-layouts/phrases-comment.php:162
|
469 |
+
msgid "Vote Down"
|
470 |
+
msgstr "Nyee"
|
471 |
+
|
472 |
+
#: options/class.WpdiscuzOptionsSerialized.php:518
|
473 |
+
#: options/phrases-layouts/phrases-notification.php:122
|
474 |
+
msgid "Vote Counted"
|
475 |
+
msgstr "Szavazatok megszámolva"
|
476 |
+
|
477 |
+
#: options/class.WpdiscuzOptionsSerialized.php:519
|
478 |
+
msgid "You've already voted for this comment"
|
479 |
+
msgstr "Te már szavaztál erre a hozzászólásra"
|
480 |
+
|
481 |
+
#: options/class.WpdiscuzOptionsSerialized.php:520
|
482 |
+
#: options/phrases-layouts/phrases-notification.php:142
|
483 |
+
msgid "Voting Error"
|
484 |
+
msgstr "Szavazási hiba"
|
485 |
+
|
486 |
+
#: options/class.WpdiscuzOptionsSerialized.php:521
|
487 |
+
msgid "You Must Be Logged In To Vote"
|
488 |
+
msgstr "Szavazáshoz be kell lépned!"
|
489 |
+
|
490 |
+
#: options/class.WpdiscuzOptionsSerialized.php:522
|
491 |
+
msgid "You cannot vote for your comment"
|
492 |
+
msgstr "Saját hozzászólásra nem lehet szavazni."
|
493 |
+
|
494 |
+
#: options/class.WpdiscuzOptionsSerialized.php:523
|
495 |
+
msgid "You are not allowed to vote for this comment"
|
496 |
+
msgstr "Számodra nem engedélyezett a szavazás erre a hozzászólásra."
|
497 |
+
|
498 |
+
#: options/class.WpdiscuzOptionsSerialized.php:524
|
499 |
+
#: options/phrases-layouts/phrases-notification.php:182
|
500 |
+
msgid "Invalid Captcha Code"
|
501 |
+
msgstr "Hibás captcha kód"
|
502 |
+
|
503 |
+
#: options/class.WpdiscuzOptionsSerialized.php:525
|
504 |
+
#: options/phrases-layouts/phrases-notification.php:192
|
505 |
+
msgid "Some of field value is invalid"
|
506 |
+
msgstr "Néhány mezőt hibásan töltöttél ki"
|
507 |
+
|
508 |
+
#: options/class.WpdiscuzOptionsSerialized.php:526
|
509 |
+
msgid "new comment"
|
510 |
+
msgstr "új hozzászólás"
|
511 |
+
|
512 |
+
#: options/class.WpdiscuzOptionsSerialized.php:527
|
513 |
+
msgid "new comments"
|
514 |
+
msgstr "új hozzászólások"
|
515 |
+
|
516 |
+
#: options/class.WpdiscuzOptionsSerialized.php:528
|
517 |
+
msgid "Comment awaiting moderation"
|
518 |
+
msgstr "A hozzászólás moderációra vár"
|
519 |
+
|
520 |
+
#: options/class.WpdiscuzOptionsSerialized.php:529
|
521 |
+
msgid "new reply on your comment"
|
522 |
+
msgstr "új válasz a hozzászólásodre"
|
523 |
+
|
524 |
+
#: options/class.WpdiscuzOptionsSerialized.php:530
|
525 |
+
msgid "new replies on your comments"
|
526 |
+
msgstr "új válaszok a hozzászólásodra"
|
527 |
+
|
528 |
+
#: options/class.WpdiscuzOptionsSerialized.php:531
|
529 |
+
#: options/phrases-layouts/phrases-general.php:126
|
530 |
+
msgid "New"
|
531 |
+
msgstr "Új"
|
532 |
+
|
533 |
+
#: options/class.WpdiscuzOptionsSerialized.php:532
|
534 |
+
#: options/phrases-layouts/phrases-notification.php:236
|
535 |
+
msgid "Sorry, the comment was not updated"
|
536 |
+
msgstr "Bocsánat, a hozzászólás nem frissült"
|
537 |
+
|
538 |
+
#: options/class.WpdiscuzOptionsSerialized.php:533
|
539 |
+
#: options/phrases-layouts/phrases-notification.php:246
|
540 |
+
msgid "Sorry, this comment no longer possible to edit"
|
541 |
+
msgstr "Bocsánat, de ezt a hozzászólást már nem lehet szerkeszteni"
|
542 |
+
|
543 |
+
#: options/class.WpdiscuzOptionsSerialized.php:534
|
544 |
+
msgid "You've not made any changes"
|
545 |
+
msgstr "Nem változtattál meg semmit"
|
546 |
+
|
547 |
+
#: options/class.WpdiscuzOptionsSerialized.php:535
|
548 |
+
#: options/phrases-layouts/phrases-comment.php:176
|
549 |
+
msgid "Save"
|
550 |
+
msgstr "Mentés"
|
551 |
+
|
552 |
+
#: options/class.WpdiscuzOptionsSerialized.php:536
|
553 |
+
#: options/phrases-layouts/phrases-comment.php:186
|
554 |
+
msgid "Cancel"
|
555 |
+
msgstr "Mégsem"
|
556 |
+
|
557 |
+
#: options/class.WpdiscuzOptionsSerialized.php:537
|
558 |
+
msgid "Comment text is too short (minimum %d% characters)"
|
559 |
+
msgstr "A hozzászólás szöege túl rövid (minimum %d% karakter kell)"
|
560 |
+
|
561 |
+
#: options/class.WpdiscuzOptionsSerialized.php:538
|
562 |
+
msgid "Comment text is too long (maximum %d% characters allowed)"
|
563 |
+
msgstr "A hozzászólás szövege túl hosszú (maximum %d% karakter engedélyezve)"
|
564 |
+
|
565 |
+
#: options/class.WpdiscuzOptionsSerialized.php:539
|
566 |
+
#: options/phrases-layouts/phrases-notification.php:262
|
567 |
+
#: options/phrases-layouts/phrases-notification.php:266
|
568 |
+
msgid "Please fill out required fields"
|
569 |
+
msgstr "Kérjük, töltsd ki az összes kötelező mezőt"
|
570 |
+
|
571 |
+
#: options/class.WpdiscuzOptionsSerialized.php:540
|
572 |
+
#: options/phrases-layouts/phrases-form.php:192
|
573 |
+
#: options/phrases-layouts/phrases-form.php:196
|
574 |
+
msgid "Connect with"
|
575 |
+
msgstr "Belépés"
|
576 |
+
|
577 |
+
#: options/class.WpdiscuzOptionsSerialized.php:541
|
578 |
+
msgid "You're subscribed to"
|
579 |
+
msgstr "Feliratkozva"
|
580 |
+
|
581 |
+
#: options/options-layouts/settings-general.php:7
|
582 |
+
msgid "General Settings"
|
583 |
+
msgstr "Általános beállítások"
|
584 |
+
|
585 |
+
#: options/options-layouts/settings-general.php:12
|
586 |
+
msgid "Display comment form for post types:"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: options/options-layouts/settings-general.php:32
|
590 |
+
msgid "Comment author must fill out name"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: options/options-layouts/settings-general.php:42
|
594 |
+
msgid "Comment author must fill out email"
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: options/options-layouts/settings-general.php:52
|
598 |
+
msgid "Comment text min length"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: options/options-layouts/settings-general.php:62
|
602 |
+
msgid "Comment text max length"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: options/options-layouts/settings-general.php:72
|
606 |
+
msgid "Comment text size in pixels"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: options/options-layouts/settings-general.php:87
|
610 |
+
msgid "Allow comment editing for"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: options/options-layouts/settings-general.php:92
|
614 |
+
msgid "Not Allow"
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: options/options-layouts/settings-general.php:93
|
618 |
+
#: options/options-layouts/settings-general.php:94
|
619 |
+
#: options/options-layouts/settings-live-update.php:52
|
620 |
+
#: options/options-layouts/settings-live-update.php:53
|
621 |
+
#: options/options-layouts/settings-live-update.php:54
|
622 |
+
msgid "Minutes"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: options/options-layouts/settings-general.php:95
|
626 |
+
#: options/phrases-layouts/phrases-datetime.php:72
|
627 |
+
msgid "Hour"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: options/options-layouts/settings-general.php:96
|
631 |
+
#: options/options-layouts/settings-general.php:97
|
632 |
+
msgid "Hours"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: options/options-layouts/settings-general.php:98
|
636 |
+
msgid "Unlimit"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: options/options-layouts/settings-general.php:104
|
640 |
+
msgid "Redirect first commenter to"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: options/options-layouts/settings-general.php:111
|
644 |
+
msgid "Do not redirect"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: options/options-layouts/settings-general.php:119
|
648 |
+
msgid "Allow guests to vote on comments"
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: options/options-layouts/settings-general.php:129
|
652 |
+
msgid "Comments loading/pagination type"
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: options/options-layouts/settings-general.php:138
|
656 |
+
#: options/options-layouts/settings-general.php:140
|
657 |
+
msgid "[Load more] Button"
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: options/options-layouts/settings-general.php:142
|
661 |
+
#: options/options-layouts/settings-general.php:144
|
662 |
+
msgid "[Load rest of all comments] Button"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: options/options-layouts/settings-general.php:146
|
666 |
+
#: options/options-layouts/settings-general.php:148
|
667 |
+
msgid "Lazy load comments on scrolling"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: options/options-layouts/settings-general.php:155
|
671 |
+
msgid "Use WordPress Date/Time format"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: options/options-layouts/settings-general.php:156
|
675 |
+
msgid ""
|
676 |
+
"wpDiscuz shows Human Readable date format. If you check this option it'll "
|
677 |
+
"show the date/time format set in WordPress General Settings."
|
678 |
+
msgstr ""
|
679 |
+
|
680 |
+
#: options/options-layouts/settings-general.php:163
|
681 |
+
msgid "Current Wordpress date/time format"
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: options/options-layouts/settings-general.php:169
|
685 |
+
msgid "Use Plugin .PO/.MO files"
|
686 |
+
msgstr ""
|
687 |
+
|
688 |
+
#: options/options-layouts/settings-general.php:170
|
689 |
+
msgid ""
|
690 |
+
"wpDiscuz phrase system allows you to translate all front-end phrases. "
|
691 |
+
"However if you have a multi-language website it'll not allow you to add more "
|
692 |
+
"than one language translation. The only way to get it is the plugin "
|
693 |
+
"translation files (.PO / .MO). If wpDiscuz has the languages you need you "
|
694 |
+
"should check this option to disable phrase system and it'll automatically "
|
695 |
+
"translate all phrases based on language files according to current language."
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: options/options-layouts/settings-general.php:181
|
699 |
+
msgid ""
|
700 |
+
"Help wpDiscuz to grow allowing people to recognize which comment plugin you "
|
701 |
+
"use"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: options/options-layouts/settings-general.php:183
|
705 |
+
msgid ""
|
706 |
+
"Please check this option on to help wpDiscuz get more popularity as your "
|
707 |
+
"thank to the hard work we do for you totally free. This option adds a very "
|
708 |
+
"small (16x16px) icon under the comment section which will allow your site "
|
709 |
+
"visitors recognize the name of comment solution you use."
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: options/options-layouts/settings-general.php:188
|
713 |
+
msgid "Thank you!"
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
+
#: options/options-layouts/settings-live-update.php:12
|
717 |
+
msgid "Live update options"
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: options/options-layouts/settings-live-update.php:13
|
721 |
+
msgid ""
|
722 |
+
"wpDiscuz 3 live update is very smart and doesn't overload your server even "
|
723 |
+
"if you're on Shared hosting plan and even your website is very active. "
|
724 |
+
"However we recommend to monitor your server resources if you're on a Shared "
|
725 |
+
"hosting plan. There are some very weak hosting plans which may not be able "
|
726 |
+
"to perform very frequently live update requests. If you found some issue you "
|
727 |
+
"can set the option below 30 seconds or more."
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: options/options-layouts/settings-live-update.php:18
|
731 |
+
msgid "Never update"
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: options/options-layouts/settings-live-update.php:20
|
735 |
+
msgid "Turn off \"Live Update\" function"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: options/options-layouts/settings-live-update.php:22
|
739 |
+
msgid "Show new comment/reply buttons to update manualy"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: options/options-layouts/settings-live-update.php:24
|
743 |
+
msgid "Always check for new comments and show update buttons"
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: options/options-layouts/settings-live-update.php:26
|
747 |
+
msgid "Always update"
|
748 |
+
msgstr ""
|
749 |
+
|
750 |
+
#: options/options-layouts/settings-live-update.php:28
|
751 |
+
msgid "Always check for new comments and update automatically"
|
752 |
+
msgstr ""
|
753 |
+
|
754 |
+
#: options/options-layouts/settings-live-update.php:35
|
755 |
+
msgid "Disable live update for guests"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
+
#: options/options-layouts/settings-live-update.php:43
|
759 |
+
msgid "Update comment list every"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: options/options-layouts/settings-live-update.php:48
|
763 |
+
#: options/options-layouts/settings-live-update.php:49
|
764 |
+
#: options/options-layouts/settings-live-update.php:50
|
765 |
+
msgid "Seconds"
|
766 |
+
msgstr ""
|
767 |
+
|
768 |
+
#: options/options-layouts/settings-live-update.php:51
|
769 |
+
#: options/phrases-layouts/phrases-datetime.php:92
|
770 |
+
msgid "Minute"
|
771 |
+
msgstr ""
|
772 |
+
|
773 |
+
#: options/options-layouts/settings-show-hide.php:12
|
774 |
+
msgid "Show logged-in user name and logout link on top of main form"
|
775 |
+
msgstr ""
|
776 |
+
|
777 |
+
#: options/options-layouts/settings-show-hide.php:22
|
778 |
+
msgid "Hide Reply button for Guests"
|
779 |
+
msgstr ""
|
780 |
+
|
781 |
+
#: options/options-layouts/settings-show-hide.php:32
|
782 |
+
msgid "Hide Reply button for Members"
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: options/options-layouts/settings-show-hide.php:42
|
786 |
+
msgid "Hide Commenter Labels"
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: options/options-layouts/settings-show-hide.php:52
|
790 |
+
msgid "Hide Voting buttons"
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: options/options-layouts/settings-show-hide.php:62
|
794 |
+
msgid "Show Share Buttons"
|
795 |
+
msgstr ""
|
796 |
+
|
797 |
+
#: options/options-layouts/settings-show-hide.php:86
|
798 |
+
msgid ""
|
799 |
+
"The plugin directory is not writable! Please set writable permissions to "
|
800 |
+
"plugin directory in order to use the captcha feature"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: options/options-layouts/settings-show-hide.php:91
|
804 |
+
msgid "Hide the CAPTCHA field for guests"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: options/options-layouts/settings-show-hide.php:102
|
808 |
+
msgid "Show the CAPTCHA field for logged in users"
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: options/options-layouts/settings-show-hide.php:113
|
812 |
+
msgid "Show the Website URL field"
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: options/options-layouts/settings-show-hide.php:123
|
816 |
+
msgid "Hide header text"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: options/options-layouts/settings-show-hide.php:133
|
820 |
+
msgid "Show sorting buttons"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: options/options-layouts/settings-show-hide.php:143
|
824 |
+
msgid "Set comments ordering to \"Most voted\" by default "
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: options/options-layouts/settings-show-hide.php:153
|
828 |
+
msgid "Hide comment link"
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: options/options-layouts/settings-social.php:23
|
832 |
+
#: options/options-layouts/settings-social.php:33
|
833 |
+
#: options/options-layouts/settings-social.php:43
|
834 |
+
#: options/options-layouts/settings-social.php:54
|
835 |
+
msgid "Activate"
|
836 |
+
msgstr ""
|
837 |
+
|
838 |
+
#: options/options-layouts/settings-social.php:27
|
839 |
+
#: options/options-layouts/settings-social.php:37
|
840 |
+
#: options/options-layouts/settings-social.php:47
|
841 |
+
#: options/options-layouts/settings-social.php:58
|
842 |
+
msgid "View details/Install"
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: options/options-layouts/settings-social.php:92
|
846 |
+
msgid ""
|
847 |
+
"You can use one of these most popular Social Login Plugins to allow your "
|
848 |
+
"visitors login and comment with Facebook, Twitter, Google+, Wordpress, VK, "
|
849 |
+
"OK and lots of other social network service accounts. All social login "
|
850 |
+
"buttons will be fully integrated with wpDiscuz comment forms."
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: options/options-layouts/settings-style.php:12
|
854 |
+
msgid "Comment Form Background Color"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: options/options-layouts/settings-style.php:16
|
858 |
+
#: options/options-layouts/settings-style.php:25
|
859 |
+
#: options/options-layouts/settings-style.php:34
|
860 |
+
#: options/options-layouts/settings-style.php:43
|
861 |
+
#: options/options-layouts/settings-style.php:52
|
862 |
+
#: options/options-layouts/settings-style.php:61
|
863 |
+
#: options/options-layouts/settings-style.php:70
|
864 |
+
#: options/options-layouts/settings-style.php:79
|
865 |
+
#: options/options-layouts/settings-style.php:92
|
866 |
+
msgid "Example: #00FF00"
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: options/options-layouts/settings-style.php:21
|
870 |
+
msgid "Comment Background Color"
|
871 |
+
msgstr ""
|
872 |
+
|
873 |
+
#: options/options-layouts/settings-style.php:30
|
874 |
+
msgid "Reply Background Color"
|
875 |
+
msgstr ""
|
876 |
+
|
877 |
+
#: options/options-layouts/settings-style.php:39
|
878 |
+
msgid "Comment Text Color"
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: options/options-layouts/settings-style.php:48
|
882 |
+
msgid "Vote, Reply, Share, Edit links text colors"
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: options/options-layouts/settings-style.php:57
|
886 |
+
msgid "Comment form fields border color"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: options/options-layouts/settings-style.php:66
|
890 |
+
msgid "New loaded comments' background color"
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: options/options-layouts/settings-style.php:75
|
894 |
+
msgid "Primary Color"
|
895 |
+
msgstr ""
|
896 |
+
|
897 |
+
#: options/options-layouts/settings-style.php:89
|
898 |
+
msgid "label color"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: options/options-layouts/settings-style.php:100
|
902 |
+
msgid "Custom CSS Code"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: options/options-layouts/settings-subscription.php:7
|
906 |
+
msgid "Email Subscription Settings"
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: options/options-layouts/settings-subscription.php:12
|
910 |
+
msgid "Disable subscription confirmation for registered users"
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: options/options-layouts/settings-subscription.php:13
|
914 |
+
msgid "Show comment subscription bar"
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: options/options-layouts/settings-subscription.php:15
|
918 |
+
msgid ""
|
919 |
+
"This bar provides two subscription options: notify of \"new follow-up "
|
920 |
+
"comments\" and \"new replies to my comments\""
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: options/options-layouts/settings-subscription.php:17
|
924 |
+
msgid "Show \"Notify of new replies to this comment\""
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: options/options-layouts/settings-subscription.php:19
|
928 |
+
msgid ""
|
929 |
+
"wpDiscuz is the only comment plugin which allows you to subscribe to certain "
|
930 |
+
"comment replies. This option is located above [Post Comment] button in "
|
931 |
+
"comment form. You can disable this subscription way by unchecking this "
|
932 |
+
"option."
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: options/options-layouts/settings-subscription.php:33
|
936 |
+
msgid "Use Postmatic for subscriptions and commenting by email"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: options/options-layouts/settings-subscription.php:34
|
940 |
+
msgid ""
|
941 |
+
"Postmatic allows your users subscribe to comments. Instead of just being "
|
942 |
+
"notified, they add a reply right from their inbox."
|
943 |
+
msgstr ""
|
944 |
+
|
945 |
+
#: options/phrases-layouts/phrases-comment.php:7
|
946 |
+
msgid "Comment Template Phrases"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: options/phrases-layouts/phrases-comment.php:112
|
950 |
+
msgid "Title For Guests"
|
951 |
+
msgstr ""
|
952 |
+
|
953 |
+
#: options/phrases-layouts/phrases-comment.php:122
|
954 |
+
msgid "Title For Members"
|
955 |
+
msgstr ""
|
956 |
+
|
957 |
+
#: options/phrases-layouts/phrases-comment.php:132
|
958 |
+
msgid "Title For Authors"
|
959 |
+
msgstr ""
|
960 |
+
|
961 |
+
#: options/phrases-layouts/phrases-comment.php:142
|
962 |
+
msgid "Title For Admins"
|
963 |
+
msgstr ""
|
964 |
+
|
965 |
+
#: options/phrases-layouts/phrases-comment.php:172
|
966 |
+
msgid "Save edited comment button text"
|
967 |
+
msgstr ""
|
968 |
+
|
969 |
+
#: options/phrases-layouts/phrases-comment.php:182
|
970 |
+
msgid "Cancel comment editing button text"
|
971 |
+
msgstr ""
|
972 |
+
|
973 |
+
#: options/phrases-layouts/phrases-datetime.php:7
|
974 |
+
msgid "Date/Time Phrases"
|
975 |
+
msgstr ""
|
976 |
+
|
977 |
+
#: options/phrases-layouts/phrases-datetime.php:12
|
978 |
+
msgid "Year"
|
979 |
+
msgstr ""
|
980 |
+
|
981 |
+
#: options/phrases-layouts/phrases-datetime.php:22
|
982 |
+
msgid "Years (Plural Form)"
|
983 |
+
msgstr ""
|
984 |
+
|
985 |
+
#: options/phrases-layouts/phrases-datetime.php:26
|
986 |
+
msgid "Years"
|
987 |
+
msgstr ""
|
988 |
+
|
989 |
+
#: options/phrases-layouts/phrases-datetime.php:32
|
990 |
+
msgid "Month"
|
991 |
+
msgstr ""
|
992 |
+
|
993 |
+
#: options/phrases-layouts/phrases-datetime.php:42
|
994 |
+
msgid "Months (Plural Form)"
|
995 |
+
msgstr ""
|
996 |
+
|
997 |
+
#: options/phrases-layouts/phrases-datetime.php:52
|
998 |
+
msgid "Day"
|
999 |
+
msgstr ""
|
1000 |
+
|
1001 |
+
#: options/phrases-layouts/phrases-datetime.php:62
|
1002 |
+
msgid "Days (Plural Form)"
|
1003 |
+
msgstr ""
|
1004 |
+
|
1005 |
+
#: options/phrases-layouts/phrases-datetime.php:82
|
1006 |
+
msgid "Hours (Plural Form)"
|
1007 |
+
msgstr ""
|
1008 |
+
|
1009 |
+
#: options/phrases-layouts/phrases-datetime.php:102
|
1010 |
+
msgid "Minutes (Plural Form)"
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: options/phrases-layouts/phrases-datetime.php:112
|
1014 |
+
msgid "Second"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: options/phrases-layouts/phrases-datetime.php:122
|
1018 |
+
msgid "Seconds (Plural Form)"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: options/phrases-layouts/phrases-datetime.php:132
|
1022 |
+
msgid "Commented \"right now\" text"
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: options/phrases-layouts/phrases-datetime.php:142
|
1026 |
+
msgid "Ago text"
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: options/phrases-layouts/phrases-datetime.php:152
|
1030 |
+
msgid "\"Today\" text"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: options/phrases-layouts/phrases-email.php:7
|
1034 |
+
msgid "Email Template Phrases"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: options/phrases-layouts/phrases-email.php:12
|
1038 |
+
msgid "Email Subject"
|
1039 |
+
msgstr ""
|
1040 |
+
|
1041 |
+
#: options/phrases-layouts/phrases-email.php:22
|
1042 |
+
msgid "Email Message"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: options/phrases-layouts/phrases-email.php:32
|
1046 |
+
msgid "New Reply Subject"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: options/phrases-layouts/phrases-email.php:42
|
1050 |
+
msgid "New Reply Message"
|
1051 |
+
msgstr ""
|
1052 |
+
|
1053 |
+
#: options/phrases-layouts/phrases-email.php:62
|
1054 |
+
#: options/phrases-layouts/phrases-email.php:66
|
1055 |
+
msgid "Ignore Subscription"
|
1056 |
+
msgstr ""
|
1057 |
+
|
1058 |
+
#: options/phrases-layouts/phrases-email.php:92
|
1059 |
+
msgid "Subscribe Confirmation Email Subject"
|
1060 |
+
msgstr ""
|
1061 |
+
|
1062 |
+
#: options/phrases-layouts/phrases-email.php:102
|
1063 |
+
msgid "Subscribe Confirmation Email Content"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: options/phrases-layouts/phrases-form.php:7
|
1067 |
+
msgid "Form Template Phrases"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: options/phrases-layouts/phrases-form.php:12
|
1071 |
+
msgid "Comment Field Start"
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: options/phrases-layouts/phrases-form.php:22
|
1075 |
+
msgid "Comment Field Join"
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: options/phrases-layouts/phrases-form.php:32
|
1079 |
+
msgid "Email Field"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: options/phrases-layouts/phrases-form.php:42
|
1083 |
+
msgid "Name Field"
|
1084 |
+
msgstr ""
|
1085 |
+
|
1086 |
+
#: options/phrases-layouts/phrases-form.php:52
|
1087 |
+
msgid "WebSite URL Field"
|
1088 |
+
msgstr ""
|
1089 |
+
|
1090 |
+
#: options/phrases-layouts/phrases-form.php:62
|
1091 |
+
msgid "CAPTCHA Field"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: options/phrases-layouts/phrases-form.php:72
|
1095 |
+
msgid "Submit Button"
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
+
#: options/phrases-layouts/phrases-form.php:92
|
1099 |
+
msgid "Notify on new comments"
|
1100 |
+
msgstr ""
|
1101 |
+
|
1102 |
+
#: options/phrases-layouts/phrases-form.php:102
|
1103 |
+
msgid "Notify on all new replies"
|
1104 |
+
msgstr ""
|
1105 |
+
|
1106 |
+
#: options/phrases-layouts/phrases-form.php:106
|
1107 |
+
msgid "new replies to all my comments"
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#: options/phrases-layouts/phrases-form.php:112
|
1111 |
+
msgid "Notify on new replies (checkbox)"
|
1112 |
+
msgstr ""
|
1113 |
+
|
1114 |
+
#: options/phrases-layouts/phrases-form.php:162
|
1115 |
+
msgid "Subscribed on this comment replies"
|
1116 |
+
msgstr ""
|
1117 |
+
|
1118 |
+
#: options/phrases-layouts/phrases-form.php:172
|
1119 |
+
msgid "Subscribed on all your comments replies"
|
1120 |
+
msgstr ""
|
1121 |
+
|
1122 |
+
#: options/phrases-layouts/phrases-form.php:182
|
1123 |
+
msgid "Subscribed on this post"
|
1124 |
+
msgstr ""
|
1125 |
+
|
1126 |
+
#: options/phrases-layouts/phrases-general.php:7
|
1127 |
+
msgid "General Phrases"
|
1128 |
+
msgstr ""
|
1129 |
+
|
1130 |
+
#: options/phrases-layouts/phrases-general.php:22
|
1131 |
+
msgid "Be the first to comment"
|
1132 |
+
msgstr ""
|
1133 |
+
|
1134 |
+
#: options/phrases-layouts/phrases-general.php:42
|
1135 |
+
msgid "Comment (Plural Form)"
|
1136 |
+
msgstr ""
|
1137 |
+
|
1138 |
+
#: options/phrases-layouts/phrases-general.php:52
|
1139 |
+
msgid "On"
|
1140 |
+
msgstr ""
|
1141 |
+
|
1142 |
+
#: options/phrases-layouts/phrases-general.php:62
|
1143 |
+
msgid "Load More Button"
|
1144 |
+
msgstr ""
|
1145 |
+
|
1146 |
+
#: options/phrases-layouts/phrases-general.php:82
|
1147 |
+
msgid "Button text if has new comment"
|
1148 |
+
msgstr ""
|
1149 |
+
|
1150 |
+
#: options/phrases-layouts/phrases-general.php:92
|
1151 |
+
msgid "Button text if has new comments (Plural Form)"
|
1152 |
+
msgstr ""
|
1153 |
+
|
1154 |
+
#: options/phrases-layouts/phrases-general.php:96
|
1155 |
+
msgid "New Comments"
|
1156 |
+
msgstr ""
|
1157 |
+
|
1158 |
+
#: options/phrases-layouts/phrases-general.php:102
|
1159 |
+
msgid "Button text if has new reply"
|
1160 |
+
msgstr ""
|
1161 |
+
|
1162 |
+
#: options/phrases-layouts/phrases-general.php:112
|
1163 |
+
msgid "Button text if has new replies (Plural Form)"
|
1164 |
+
msgstr ""
|
1165 |
+
|
1166 |
+
#: options/phrases-layouts/phrases-general.php:116
|
1167 |
+
msgid "New Replies"
|
1168 |
+
msgstr ""
|
1169 |
+
|
1170 |
+
#: options/phrases-layouts/phrases-general.php:122
|
1171 |
+
msgid "Text on load more button if has new comment(s)"
|
1172 |
+
msgstr ""
|
1173 |
+
|
1174 |
+
#: options/phrases-layouts/phrases-notification.php:7
|
1175 |
+
msgid "Notification Phrases"
|
1176 |
+
msgstr ""
|
1177 |
+
|
1178 |
+
#: options/phrases-layouts/phrases-notification.php:12
|
1179 |
+
msgid "You\\'re subscribed to"
|
1180 |
+
msgstr ""
|
1181 |
+
|
1182 |
+
#: options/phrases-layouts/phrases-notification.php:42
|
1183 |
+
msgid "Error message for empty field"
|
1184 |
+
msgstr ""
|
1185 |
+
|
1186 |
+
#: options/phrases-layouts/phrases-notification.php:52
|
1187 |
+
msgid "Error message for invalid email field"
|
1188 |
+
msgstr ""
|
1189 |
+
|
1190 |
+
#: options/phrases-layouts/phrases-notification.php:62
|
1191 |
+
msgid "Error message for invalid website url field"
|
1192 |
+
msgstr ""
|
1193 |
+
|
1194 |
+
#: options/phrases-layouts/phrases-notification.php:82
|
1195 |
+
msgid "Logged in as"
|
1196 |
+
msgstr ""
|
1197 |
+
|
1198 |
+
#: options/phrases-layouts/phrases-notification.php:102
|
1199 |
+
msgid "Logged In"
|
1200 |
+
msgstr ""
|
1201 |
+
|
1202 |
+
#: options/phrases-layouts/phrases-notification.php:112
|
1203 |
+
msgid "To post a comment"
|
1204 |
+
msgstr ""
|
1205 |
+
|
1206 |
+
#: options/phrases-layouts/phrases-notification.php:132
|
1207 |
+
msgid "You can vote only 1 time"
|
1208 |
+
msgstr ""
|
1209 |
+
|
1210 |
+
#: options/phrases-layouts/phrases-notification.php:152
|
1211 |
+
msgid "Login To Vote"
|
1212 |
+
msgstr ""
|
1213 |
+
|
1214 |
+
#: options/phrases-layouts/phrases-notification.php:162
|
1215 |
+
msgid "You Cannot Vote On Your Comment"
|
1216 |
+
msgstr ""
|
1217 |
+
|
1218 |
+
#: options/phrases-layouts/phrases-notification.php:172
|
1219 |
+
msgid "You are not allowed to vote for this comment (Voting from same IP)"
|
1220 |
+
msgstr ""
|
1221 |
+
|
1222 |
+
#: options/phrases-layouts/phrases-notification.php:202
|
1223 |
+
msgid "Comment waiting moderation"
|
1224 |
+
msgstr ""
|
1225 |
+
|
1226 |
+
#: options/phrases-layouts/phrases-notification.php:212
|
1227 |
+
msgid "Message if comment content length is too short"
|
1228 |
+
msgstr ""
|
1229 |
+
|
1230 |
+
#: options/phrases-layouts/phrases-notification.php:222
|
1231 |
+
msgid "Message if comment content length is too long"
|
1232 |
+
msgstr ""
|
1233 |
+
|
1234 |
+
#: options/phrases-layouts/phrases-notification.php:232
|
1235 |
+
msgid "Message if comment was not updated"
|
1236 |
+
msgstr ""
|
1237 |
+
|
1238 |
+
#: options/phrases-layouts/phrases-notification.php:242
|
1239 |
+
msgid "Message if comment no longer possible to edit"
|
1240 |
+
msgstr ""
|
1241 |
+
|
1242 |
+
#: options/phrases-layouts/phrases-notification.php:252
|
1243 |
+
msgid "Message if comment text not changed"
|
1244 |
+
msgstr ""
|
1245 |
+
|
1246 |
+
#: options/phrases-layouts/phrases-notification.php:256
|
1247 |
+
msgid "TYou've not made any changes"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: templates/comment/comment-form.php:51
|
1251 |
+
msgid "Unable to send an email"
|
1252 |
+
msgstr ""
|
1253 |
+
|
1254 |
+
#: templates/comment/comment-form.php:53
|
1255 |
+
msgid "Subscription not successed"
|
1256 |
+
msgstr ""
|
1257 |
+
|
1258 |
+
#: utils/class.WpdiscuzHelper.php:374
|
1259 |
+
msgid "Error"
|
1260 |
+
msgstr ""
|
1261 |
+
|
1262 |
+
#: utils/class.WpdiscuzHelper.php:394
|
1263 |
+
msgid "Participate in this discussion via email"
|
1264 |
+
msgstr ""
|
1265 |
+
|
1266 |
+
#. Plugin Name of the plugin/theme
|
1267 |
+
msgid "wpDiscuz - Supercharged native comments"
|
1268 |
+
msgstr ""
|
1269 |
+
|
1270 |
+
#. Plugin URI of the plugin/theme
|
1271 |
+
msgid "http://www.gvectors.com/wpdiscuz/"
|
1272 |
+
msgstr ""
|
1273 |
+
|
1274 |
+
#. Description of the plugin/theme
|
1275 |
+
msgid ""
|
1276 |
+
"Better comment system. Wordpress post comments and discussion plugin. Allows "
|
1277 |
+
"your visitors discuss, vote for comments and share."
|
1278 |
+
msgstr ""
|
1279 |
+
|
1280 |
+
#. Author of the plugin/theme
|
1281 |
+
msgid "gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)"
|
1282 |
+
msgstr ""
|
1283 |
+
|
1284 |
+
#. Author URI of the plugin/theme
|
1285 |
+
msgid "http://www.gvectors.com/"
|
1286 |
+
msgstr ""
|
manager/class.WpdiscuzDBManager.php
CHANGED
@@ -199,7 +199,7 @@ class WpdiscuzDBManager {
|
|
199 |
* @return type array of author comment ids
|
200 |
*/
|
201 |
public function getAuthorVisibleComments($visibleCommentIds, $email) {
|
202 |
-
$sql = $this->db->prepare("SELECT `comment_ID` FROM `"
|
203 |
return $this->matrixToArray($this->db->get_results($sql, ARRAY_N));
|
204 |
}
|
205 |
|
@@ -225,7 +225,7 @@ class WpdiscuzDBManager {
|
|
225 |
$sqlComments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` WHERE `comment_post_ID` = %d AND `comment_approved` = '1' $commentParent AND `comment_ID` $operator %d ORDER BY `comment_date_gmt` {$args['order']} LIMIT %d", $args['post_id'], $args['last_parent_id'], $args['limit']);
|
226 |
} else {
|
227 |
$sqlComments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` WHERE `comment_post_ID` = %d AND `comment_approved` = '1' $commentParent ORDER BY `comment_date_gmt` {$args['order']} LIMIT %d", $args['post_id'], $args['limit']);
|
228 |
-
}
|
229 |
$commentIds = $this->db->get_results($sqlComments, ARRAY_N);
|
230 |
return $this->matrixToArray($commentIds);
|
231 |
}
|
@@ -257,7 +257,7 @@ class WpdiscuzDBManager {
|
|
257 |
} else {
|
258 |
$allParentCounts = count($this->getAllParentCommentCount($args['post_id'], $args['is_threaded']));
|
259 |
$sqlPostVotedCommentIds = $this->db->prepare("SELECT `c`.`comment_ID` FROM `" . $this->dbprefix . "comments` AS `c` INNER JOIN `" . $this->dbprefix . "commentmeta` AS `cm` ON `c`.`comment_ID` = `cm`.`comment_id` WHERE `cm`.`meta_key` = '" . WpdiscuzCore::META_KEY_VOTES . "' AND `c`.`comment_post_ID` = %d AND `c`.`comment_approved` = 1 $commentParent ORDER BY (`cm`.`meta_value`+0) desc, `c`.`comment_date_gmt` {$args['date_order']} LIMIT %d OFFSET %d", $args['post_id'], $allParentCounts, $args['offset']);
|
260 |
-
}
|
261 |
$postVotedCommentIds = $this->db->get_results($sqlPostVotedCommentIds, ARRAY_N);
|
262 |
return $this->matrixToArray($postVotedCommentIds);
|
263 |
}
|
@@ -272,7 +272,7 @@ class WpdiscuzDBManager {
|
|
272 |
}
|
273 |
|
274 |
/**
|
275 |
-
* get all
|
276 |
*/
|
277 |
public function getAllComments($limit, $offset) {
|
278 |
$sql_comments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` LIMIT %d OFFSET %d", $limit, $offset);
|
@@ -347,13 +347,7 @@ class WpdiscuzDBManager {
|
|
347 |
}
|
348 |
|
349 |
public function checkVoteData($postId) {
|
350 |
-
$sql_query = $this->db->prepare("INSERT INTO `" . $this->dbprefix . "commentmeta`
|
351 |
-
SELECT NULL,c.`comment_ID`,%s,'0' FROM `" . $this->dbprefix . "comments` c
|
352 |
-
LEFT JOIN `" . $this->dbprefix . "commentmeta` cm
|
353 |
-
ON cm.`comment_id` = c.`comment_ID`
|
354 |
-
AND cm.`meta_key` = %s
|
355 |
-
WHERE cm.`meta_key` IS NULL AND c.`comment_post_ID` = %d
|
356 |
-
);", WpdiscuzCore::META_KEY_VOTES, WpdiscuzCore::META_KEY_VOTES, $postId);
|
357 |
$this->db->query($sql_query);
|
358 |
}
|
359 |
|
@@ -482,7 +476,7 @@ class WpdiscuzDBManager {
|
|
482 |
return $this->matrixToArray($postsAuthors);
|
483 |
}
|
484 |
|
485 |
-
public function
|
486 |
$sql = $this->db->prepare("SELECT `cm`.`comment_id` FROM `" . $this->dbprefix . "commentmeta` AS `cm` INNER JOIN `" . $this->dbprefix . "comments` AS `c` ON `c`.`comment_ID` = `cm`.`comment_id` WHERE `c`.`comment_post_ID` = %d AND `c`.`comment_approved` = 1 AND `cm`.`meta_key` = '" . WpdiscuzCore::META_KEY_CHILDREN . "' AND `cm`.`meta_value` != '';", $postId);
|
487 |
$commentIds = $this->db->get_results($sql, ARRAY_N);
|
488 |
return $this->matrixToArray($commentIds);
|
@@ -498,4 +492,10 @@ class WpdiscuzDBManager {
|
|
498 |
return $this->matrixToArray($comments);
|
499 |
}
|
500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
}
|
199 |
* @return type array of author comment ids
|
200 |
*/
|
201 |
public function getAuthorVisibleComments($visibleCommentIds, $email) {
|
202 |
+
$sql = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` WHERE `comment_approved` = 1 AND `comment_ID` IN($visibleCommentIds) AND `comment_author_email` = %s;", $email);
|
203 |
return $this->matrixToArray($this->db->get_results($sql, ARRAY_N));
|
204 |
}
|
205 |
|
225 |
$sqlComments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` WHERE `comment_post_ID` = %d AND `comment_approved` = '1' $commentParent AND `comment_ID` $operator %d ORDER BY `comment_date_gmt` {$args['order']} LIMIT %d", $args['post_id'], $args['last_parent_id'], $args['limit']);
|
226 |
} else {
|
227 |
$sqlComments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` WHERE `comment_post_ID` = %d AND `comment_approved` = '1' $commentParent ORDER BY `comment_date_gmt` {$args['order']} LIMIT %d", $args['post_id'], $args['limit']);
|
228 |
+
}
|
229 |
$commentIds = $this->db->get_results($sqlComments, ARRAY_N);
|
230 |
return $this->matrixToArray($commentIds);
|
231 |
}
|
257 |
} else {
|
258 |
$allParentCounts = count($this->getAllParentCommentCount($args['post_id'], $args['is_threaded']));
|
259 |
$sqlPostVotedCommentIds = $this->db->prepare("SELECT `c`.`comment_ID` FROM `" . $this->dbprefix . "comments` AS `c` INNER JOIN `" . $this->dbprefix . "commentmeta` AS `cm` ON `c`.`comment_ID` = `cm`.`comment_id` WHERE `cm`.`meta_key` = '" . WpdiscuzCore::META_KEY_VOTES . "' AND `c`.`comment_post_ID` = %d AND `c`.`comment_approved` = 1 $commentParent ORDER BY (`cm`.`meta_value`+0) desc, `c`.`comment_date_gmt` {$args['date_order']} LIMIT %d OFFSET %d", $args['post_id'], $allParentCounts, $args['offset']);
|
260 |
+
}
|
261 |
$postVotedCommentIds = $this->db->get_results($sqlPostVotedCommentIds, ARRAY_N);
|
262 |
return $this->matrixToArray($postVotedCommentIds);
|
263 |
}
|
272 |
}
|
273 |
|
274 |
/**
|
275 |
+
* get all comments - currently unused
|
276 |
*/
|
277 |
public function getAllComments($limit, $offset) {
|
278 |
$sql_comments = $this->db->prepare("SELECT `comment_ID` FROM `" . $this->dbprefix . "comments` LIMIT %d OFFSET %d", $limit, $offset);
|
347 |
}
|
348 |
|
349 |
public function checkVoteData($postId) {
|
350 |
+
$sql_query = $this->db->prepare("INSERT INTO `" . $this->dbprefix . "commentmeta`(`meta_id`,`comment_id`, `meta_key`, `meta_value`)(SELECT NULL, `c`.`comment_ID`,%s,'0' FROM `" . $this->dbprefix . "comments` AS `c` LEFT JOIN `" . $this->dbprefix . "commentmeta` AS `cm` ON `cm`.`comment_id` = `c`.`comment_ID` AND `cm`.`meta_key` = %s WHERE `cm`.`meta_key` IS NULL AND `c`.`comment_post_ID` = %d);", WpdiscuzCore::META_KEY_VOTES, WpdiscuzCore::META_KEY_VOTES, $postId);
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
$this->db->query($sql_query);
|
352 |
}
|
353 |
|
476 |
return $this->matrixToArray($postsAuthors);
|
477 |
}
|
478 |
|
479 |
+
public function getOptimizedCommentIds($postId) {
|
480 |
$sql = $this->db->prepare("SELECT `cm`.`comment_id` FROM `" . $this->dbprefix . "commentmeta` AS `cm` INNER JOIN `" . $this->dbprefix . "comments` AS `c` ON `c`.`comment_ID` = `cm`.`comment_id` WHERE `c`.`comment_post_ID` = %d AND `c`.`comment_approved` = 1 AND `cm`.`meta_key` = '" . WpdiscuzCore::META_KEY_CHILDREN . "' AND `cm`.`meta_value` != '';", $postId);
|
481 |
$commentIds = $this->db->get_results($sql, ARRAY_N);
|
482 |
return $this->matrixToArray($commentIds);
|
492 |
return $this->matrixToArray($comments);
|
493 |
}
|
494 |
|
495 |
+
public function removeVotes() {
|
496 |
+
$sqlTruncate = "TRUNCATE `" . $this->dbprefix . "wc_users_voted`;";
|
497 |
+
$sqlDelete = "DELETE FROM `" . $this->dbprefix . "commentmeta` WHERE `meta_key` = '" . WpdiscuzCore::META_KEY_VOTES . "';";
|
498 |
+
return $this->db->query($sqlTruncate) && $this->db->query($sqlDelete);
|
499 |
+
}
|
500 |
+
|
501 |
}
|
options/class.WpdiscuzOptions.php
CHANGED
@@ -57,7 +57,9 @@ class WpdiscuzOptions {
|
|
57 |
$this->optionsSerialized->authorTitlesShowHide = isset($_POST['wc_author_titles_show_hide']) ? $_POST['wc_author_titles_show_hide'] : 0;
|
58 |
$this->optionsSerialized->simpleCommentDate = isset($_POST['wc_simple_comment_date']) ? $_POST['wc_simple_comment_date'] : 0;
|
59 |
$this->optionsSerialized->showSubscriptionBar = isset($_POST['show_subscription_bar']) ? $_POST['show_subscription_bar'] : 0;
|
|
|
60 |
$this->optionsSerialized->showHideReplyCheckbox = isset($_POST['wc_show_hide_reply_checkbox']) ? $_POST['wc_show_hide_reply_checkbox'] : 0;
|
|
|
61 |
$this->optionsSerialized->showSortingButtons = isset($_POST['show_sorting_buttons']) ? $_POST['show_sorting_buttons'] : 0;
|
62 |
$this->optionsSerialized->mostVotedByDefault = isset($_POST['mostVotedByDefault']) ? $_POST['mostVotedByDefault'] : 0;
|
63 |
$this->optionsSerialized->usePostmaticForCommentNotification = isset($_POST['wc_use_postmatic_for_comment_notification']) ? $_POST['wc_use_postmatic_for_comment_notification'] : 0;
|
@@ -223,32 +225,32 @@ class WpdiscuzOptions {
|
|
223 |
private function initAddons() {
|
224 |
$wpdiscuzVersion = get_option(WpdiscuzCore::OPTION_SLUG_VERSION);
|
225 |
$this->addons = array(
|
226 |
-
|
227 |
-
|
228 |
-
'
|
229 |
-
|
230 |
-
|
231 |
);
|
232 |
}
|
233 |
|
234 |
public function addonNote() {
|
235 |
|
236 |
$lastHash = get_option('wpdiscuz-addon-note-dismissed');
|
|
|
237 |
$currentHash = $this->addonHash();
|
238 |
if ($lastHash != $currentHash) {
|
239 |
?>
|
240 |
<div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
|
241 |
<p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; width:95%;"><?php _e('New Addons are available for wpDiscuz Comments Plugin'); ?></p>
|
242 |
<div style="font-size:14px;">
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
</ul>
|
252 |
<div style="clear:both;"></div>
|
253 |
</div>
|
254 |
<p> <a href="<?php echo admin_url('edit-comments.php?page=wpdiscuz_addons_page') ?>"><?php _e('Go to wpDiscuz Addons subMenu'); ?> »</a></p>
|
57 |
$this->optionsSerialized->authorTitlesShowHide = isset($_POST['wc_author_titles_show_hide']) ? $_POST['wc_author_titles_show_hide'] : 0;
|
58 |
$this->optionsSerialized->simpleCommentDate = isset($_POST['wc_simple_comment_date']) ? $_POST['wc_simple_comment_date'] : 0;
|
59 |
$this->optionsSerialized->showSubscriptionBar = isset($_POST['show_subscription_bar']) ? $_POST['show_subscription_bar'] : 0;
|
60 |
+
$this->optionsSerialized->subscriptionType = isset($_POST['subscriptionType']) ? $_POST['subscriptionType'] : 1;
|
61 |
$this->optionsSerialized->showHideReplyCheckbox = isset($_POST['wc_show_hide_reply_checkbox']) ? $_POST['wc_show_hide_reply_checkbox'] : 0;
|
62 |
+
$this->optionsSerialized->isReplyDefaultChecked = isset($_POST['isReplyDefaultChecked']) ? $_POST['isReplyDefaultChecked'] : 0;
|
63 |
$this->optionsSerialized->showSortingButtons = isset($_POST['show_sorting_buttons']) ? $_POST['show_sorting_buttons'] : 0;
|
64 |
$this->optionsSerialized->mostVotedByDefault = isset($_POST['mostVotedByDefault']) ? $_POST['mostVotedByDefault'] : 0;
|
65 |
$this->optionsSerialized->usePostmaticForCommentNotification = isset($_POST['wc_use_postmatic_for_comment_notification']) ? $_POST['wc_use_postmatic_for_comment_notification'] : 0;
|
225 |
private function initAddons() {
|
226 |
$wpdiscuzVersion = get_option(WpdiscuzCore::OPTION_SLUG_VERSION);
|
227 |
$this->addons = array(
|
228 |
+
'emoticons' => array('version' => '1.0.0', 'requires' => '3.2.6', 'class' => 'wpDiscuzSmile', 'title' => 'Emoticons', 'thumb' => plugins_url(WPDISCUZ_DIR_NAME . WPDISCUZ_DS . 'assets' . WPDISCUZ_DS . 'addons' . WPDISCUZ_DS . 'emoticons' . WPDISCUZ_DS . 'header.png'), 'desc' => __('Brings an ocean of emotions to your comments. It comes with an awesome smile package.', 'wpdiscuz'), 'url' => 'http://gvectors.com/product/wpdiscuz-emoticons/'),
|
229 |
+
'uploader' => array('version' => '1.0.0', 'requires' => '3.2.6', 'class' => 'WpdiscuzMediaUploader', 'title' => 'Media Uploader', 'thumb' => plugins_url(WPDISCUZ_DIR_NAME . WPDISCUZ_DS . 'assets' . WPDISCUZ_DS . 'addons' . WPDISCUZ_DS . 'uploader' . WPDISCUZ_DS . 'header.png'), 'desc' => __('Extended comment attachment system. Allows to upload images, videos, audios and other file types.', 'wpdiscuz'), 'url' => 'http://gvectors.com/product/wpdiscuz-media-uploader/'),
|
230 |
+
'recaptcha' => array('version' => '1.0.0', 'requires' => '3.2.0', 'class' => 'WpdiscuzRecaptcha', 'title' => 'Google ReCaptcha', 'thumb' => plugins_url(WPDISCUZ_DIR_NAME . WPDISCUZ_DS . 'assets' . WPDISCUZ_DS . 'addons' . WPDISCUZ_DS . 'recaptcha' . WPDISCUZ_DS . 'header.png'), 'desc' => __('Adds No CAPTCHA on all comment forms. Stops spam and bot comments with Google reCAPTCHA', 'wpdiscuz'), 'url' => 'http://gvectors.com/product/wpdiscuz-recaptcha/'),
|
231 |
+
'mycred' => array('version' => '1.0.0', 'requires' => '3.2.0', 'class' => 'myCRED_Hook_wpDiscuz_Vote', 'title' => 'myCRED Integration', 'thumb' => plugins_url(WPDISCUZ_DIR_NAME . WPDISCUZ_DS . 'assets' . WPDISCUZ_DS . 'addons' . WPDISCUZ_DS . 'mycred' . WPDISCUZ_DS . 'header.png'), 'desc' => __('Integrates myCRED Badges and Ranks. Converts wpDiscuz comment votes/likes to myCRED points. ', 'wpdiscuz'), 'url' => 'http://gvectors.com/product/wpdiscuz-mycred/'),
|
232 |
+
'censure' => array('version' => '1.0.0', 'requires' => '3.2.0', 'class' => 'CommentCensure', 'title' => 'Comment Censure', 'thumb' => plugins_url(WPDISCUZ_DIR_NAME . WPDISCUZ_DS . 'assets' . WPDISCUZ_DS . 'addons' . WPDISCUZ_DS . 'censure' . WPDISCUZ_DS . 'header.png'), 'desc' => __('Allows censoring comment words. Filters comments and replaces those phrases with custom words.', 'wpdiscuz'), 'url' => 'http://gvectors.com/product/comment-censure/'),
|
233 |
);
|
234 |
}
|
235 |
|
236 |
public function addonNote() {
|
237 |
|
238 |
$lastHash = get_option('wpdiscuz-addon-note-dismissed');
|
239 |
+
$lastHashArray = explode(',', $lastHash);
|
240 |
$currentHash = $this->addonHash();
|
241 |
if ($lastHash != $currentHash) {
|
242 |
?>
|
243 |
<div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
|
244 |
<p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; width:95%;"><?php _e('New Addons are available for wpDiscuz Comments Plugin'); ?></p>
|
245 |
<div style="font-size:14px;">
|
246 |
+
<?php
|
247 |
+
foreach ($this->addons as $key => $addon) {
|
248 |
+
if(in_array($addon['title'], $lastHashArray)) continue;
|
249 |
+
?>
|
250 |
+
<div style="display:inline-block; min-width:25%; padding-right:10px;"><img src="<?php echo $addon['thumb'] ?>" style="height:60px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none;" /> <a href="<?php echo admin_url('edit-comments.php?page=wpdiscuz_addons_page') ?>" style="color:#444; text-decoration:none;" title="<?php _e('Go to wpDiscuz Addons subMenu'); ?>">wpDiscuz - <?php echo $addon['title']; ?></a></div>
|
251 |
+
<?php
|
252 |
+
}
|
253 |
+
?>
|
|
|
254 |
<div style="clear:both;"></div>
|
255 |
</div>
|
256 |
<p> <a href="<?php echo admin_url('edit-comments.php?page=wpdiscuz_addons_page') ?>"><?php _e('Go to wpDiscuz Addons subMenu'); ?> »</a></p>
|
options/class.WpdiscuzOptionsSerialized.php
CHANGED
@@ -185,6 +185,15 @@ class WpdiscuzOptionsSerialized {
|
|
185 |
* Default Value - Checked
|
186 |
*/
|
187 |
public $showSubscriptionBar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
/**
|
190 |
* Type - Checkbox
|
@@ -193,6 +202,14 @@ class WpdiscuzOptionsSerialized {
|
|
193 |
* Default Value - Checked
|
194 |
*/
|
195 |
public $showHideReplyCheckbox;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
/**
|
198 |
* Type - Checkbox
|
@@ -463,7 +480,9 @@ class WpdiscuzOptionsSerialized {
|
|
463 |
$this->authorTitlesShowHide = isset($options['wc_author_titles_show_hide']) ? $options['wc_author_titles_show_hide'] : 0;
|
464 |
$this->simpleCommentDate = isset($options['wc_simple_comment_date']) ? $options['wc_simple_comment_date'] : 0;
|
465 |
$this->showSubscriptionBar = isset($options['show_subscription_bar']) ? $options['show_subscription_bar'] : 1;
|
|
|
466 |
$this->showHideReplyCheckbox = isset($options['wc_show_hide_reply_checkbox']) ? $options['wc_show_hide_reply_checkbox'] : 0;
|
|
|
467 |
$this->showSortingButtons = isset($options['show_sorting_buttons']) ? $options['show_sorting_buttons'] : 1;
|
468 |
$this->mostVotedByDefault = isset($options['mostVotedByDefault']) ? $options['mostVotedByDefault'] : 0;
|
469 |
$this->usePostmaticForCommentNotification = isset($options['wc_use_postmatic_for_comment_notification']) ? $options['wc_use_postmatic_for_comment_notification'] : 0;
|
@@ -623,7 +642,9 @@ class WpdiscuzOptionsSerialized {
|
|
623 |
'wc_author_titles_show_hide' => $this->authorTitlesShowHide,
|
624 |
'wc_simple_comment_date' => $this->simpleCommentDate,
|
625 |
'show_subscription_bar' => $this->showSubscriptionBar,
|
|
|
626 |
'wc_show_hide_reply_checkbox' => $this->showHideReplyCheckbox,
|
|
|
627 |
'show_sorting_buttons' => $this->showSortingButtons,
|
628 |
'mostVotedByDefault' => $this->mostVotedByDefault,
|
629 |
'wc_use_postmatic_for_comment_notification' => $this->usePostmaticForCommentNotification,
|
@@ -684,9 +705,11 @@ class WpdiscuzOptionsSerialized {
|
|
684 |
'wc_author_titles_show_hide' => '0',
|
685 |
'wc_simple_comment_date' => '0',
|
686 |
'show_subscription_bar' => '1',
|
|
|
687 |
'show_sorting_buttons' => '1',
|
688 |
'mostVotedByDefault' => '0',
|
689 |
'wc_show_hide_reply_checkbox' => '1',
|
|
|
690 |
'wc_use_postmatic_for_comment_notification' => '0',
|
691 |
'wc_comment_text_size' => '14px',
|
692 |
'wc_form_bg_color' => '#F9F9F9',
|
@@ -761,6 +784,7 @@ class WpdiscuzOptionsSerialized {
|
|
761 |
$js_options['commentsVoteOrder'] = $this->showSortingButtons && $this->mostVotedByDefault;
|
762 |
$js_options['wordpressThreadCommentsDepth'] = $this->wordpressThreadCommentsDepth;
|
763 |
$js_options['wordpressIsPaginate'] = $this->wordpressIsPaginate;
|
|
|
764 |
if ($this->storeCommenterData < 0) {
|
765 |
$js_options['storeCommenterData'] = 100000;
|
766 |
} else if ($this->storeCommenterData == 0) {
|
185 |
* Default Value - Checked
|
186 |
*/
|
187 |
public $showSubscriptionBar;
|
188 |
+
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Type - Radio
|
192 |
+
* Available Values - Post/All comments/Both
|
193 |
+
* Description - Show post/all comments or both subscription types in dropdown
|
194 |
+
* Default Value - Checked
|
195 |
+
*/
|
196 |
+
public $subscriptionType;
|
197 |
|
198 |
/**
|
199 |
* Type - Checkbox
|
202 |
* Default Value - Checked
|
203 |
*/
|
204 |
public $showHideReplyCheckbox;
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Type - Checkbox
|
208 |
+
* Available Values - Checked/Unchecked
|
209 |
+
* Description - Show new reply notification checkbox below the form
|
210 |
+
* Default Value - Checked
|
211 |
+
*/
|
212 |
+
public $isReplyDefaultChecked;
|
213 |
|
214 |
/**
|
215 |
* Type - Checkbox
|
480 |
$this->authorTitlesShowHide = isset($options['wc_author_titles_show_hide']) ? $options['wc_author_titles_show_hide'] : 0;
|
481 |
$this->simpleCommentDate = isset($options['wc_simple_comment_date']) ? $options['wc_simple_comment_date'] : 0;
|
482 |
$this->showSubscriptionBar = isset($options['show_subscription_bar']) ? $options['show_subscription_bar'] : 1;
|
483 |
+
$this->subscriptionType = isset($options['subscriptionType']) ? $options['subscriptionType'] : 1;
|
484 |
$this->showHideReplyCheckbox = isset($options['wc_show_hide_reply_checkbox']) ? $options['wc_show_hide_reply_checkbox'] : 0;
|
485 |
+
$this->isReplyDefaultChecked = isset($options['isReplyDefaultChecked']) ? $options['isReplyDefaultChecked'] : 0;
|
486 |
$this->showSortingButtons = isset($options['show_sorting_buttons']) ? $options['show_sorting_buttons'] : 1;
|
487 |
$this->mostVotedByDefault = isset($options['mostVotedByDefault']) ? $options['mostVotedByDefault'] : 0;
|
488 |
$this->usePostmaticForCommentNotification = isset($options['wc_use_postmatic_for_comment_notification']) ? $options['wc_use_postmatic_for_comment_notification'] : 0;
|
642 |
'wc_author_titles_show_hide' => $this->authorTitlesShowHide,
|
643 |
'wc_simple_comment_date' => $this->simpleCommentDate,
|
644 |
'show_subscription_bar' => $this->showSubscriptionBar,
|
645 |
+
'subscriptionType' => $this->subscriptionType,
|
646 |
'wc_show_hide_reply_checkbox' => $this->showHideReplyCheckbox,
|
647 |
+
'isReplyDefaultChecked' => $this->isReplyDefaultChecked,
|
648 |
'show_sorting_buttons' => $this->showSortingButtons,
|
649 |
'mostVotedByDefault' => $this->mostVotedByDefault,
|
650 |
'wc_use_postmatic_for_comment_notification' => $this->usePostmaticForCommentNotification,
|
705 |
'wc_author_titles_show_hide' => '0',
|
706 |
'wc_simple_comment_date' => '0',
|
707 |
'show_subscription_bar' => '1',
|
708 |
+
'subscriptionType' => '1',
|
709 |
'show_sorting_buttons' => '1',
|
710 |
'mostVotedByDefault' => '0',
|
711 |
'wc_show_hide_reply_checkbox' => '1',
|
712 |
+
'isReplyDefaultChecked' => '0',
|
713 |
'wc_use_postmatic_for_comment_notification' => '0',
|
714 |
'wc_comment_text_size' => '14px',
|
715 |
'wc_form_bg_color' => '#F9F9F9',
|
784 |
$js_options['commentsVoteOrder'] = $this->showSortingButtons && $this->mostVotedByDefault;
|
785 |
$js_options['wordpressThreadCommentsDepth'] = $this->wordpressThreadCommentsDepth;
|
786 |
$js_options['wordpressIsPaginate'] = $this->wordpressIsPaginate;
|
787 |
+
$js_options['commentTextMaxLength'] = $this->commentTextMaxLength ? $this->commentTextMaxLength : null;
|
788 |
if ($this->storeCommenterData < 0) {
|
789 |
$js_options['storeCommenterData'] = 100000;
|
790 |
} else if ($this->storeCommenterData == 0) {
|
options/html-addons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div style="float:left; width:50px; height:55px; margin:10px 10px 20px 0px;">
|
4 |
<img src="<?php echo plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/plugin-icon/plugin-icon-48.png'); ?>" style="border:2px solid #fff;"/>
|
5 |
</div>
|
6 |
-
<h1 style="padding-bottom:20px; padding-top:15px;"><?php _e('wpDiscuz
|
7 |
<br style="clear:both" />
|
8 |
<table width="100%" border="0" cellspacing="1" class="widefat">
|
9 |
<tr>
|
@@ -12,20 +12,15 @@
|
|
12 |
<thead>
|
13 |
<tr>
|
14 |
<th style="font-size:16px; padding-bottom:15px;"><strong>wpDiscuz Add-ons</strong></th>
|
15 |
-
<th style="font-size:16px; padding-bottom:15px; width:
|
16 |
-
<th style="font-size:16px; padding-bottom:15px; width:
|
17 |
</tr>
|
18 |
</thead>
|
19 |
<tr valign="top">
|
20 |
<td colspan="3" style="background:#FFF; text-align:left; font-size:13px;">
|
21 |
We've released the initial wpDiscuz 1.0.0 version on 30 November 2014.
|
22 |
After one year and one month of hard non-profit work we've decided to create paid add-ons to get some funds for future free wpDiscuz development.
|
23 |
-
wpDiscuz add-ons are also premium level extensions and those
|
24 |
-
All essential and even dozens of extra-cool features are already available for free.
|
25 |
-
There will never be any limits, any pro and paid versions for wpDiscuz. It's already a premium level plugin and it's free.
|
26 |
-
We don't want to limit wpDiscuz users for any essential commenting functions.
|
27 |
-
And we have another dozens of awesome features in our to-do list which will also be added for free in future releases.
|
28 |
-
So the free wpDiscuz development always stays on the first priority and wpDiscuz will be extended with new free functions and features even faster than before.
|
29 |
<p style="font-size:10px; color:#B1B1B1; font-style:italic; text-align:right; line-height:12px; padding-top:6px; margin:0px;">
|
30 |
Thank you!<br/> Sincerely yours,<br/>
|
31 |
gVectors Team
|
@@ -77,10 +72,9 @@
|
|
77 |
<hr />
|
78 |
<h3>Coming very soon</h3>
|
79 |
<ul style="list-style:circle; margin-left:20px;">
|
80 |
-
<li>wpDiscuz Media Uploader/Player (photo, audio, video, other files)</li>
|
81 |
-
<li>wpDiscuz Emoticons (with unique different emoticons packages)</li>
|
82 |
-
<li>wpDiscuz Comment Front-end Moderation</li>
|
83 |
<li>wpDiscuz Widgets</li>
|
|
|
|
|
84 |
</ul>
|
85 |
|
86 |
</div>
|
3 |
<div style="float:left; width:50px; height:55px; margin:10px 10px 20px 0px;">
|
4 |
<img src="<?php echo plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/plugin-icon/plugin-icon-48.png'); ?>" style="border:2px solid #fff;"/>
|
5 |
</div>
|
6 |
+
<h1 style="padding-bottom:20px; padding-top:15px;"><?php _e('wpDiscuz Addons', 'wpdiscuz'); ?></h1>
|
7 |
<br style="clear:both" />
|
8 |
<table width="100%" border="0" cellspacing="1" class="widefat">
|
9 |
<tr>
|
12 |
<thead>
|
13 |
<tr>
|
14 |
<th style="font-size:16px; padding-bottom:15px;"><strong>wpDiscuz Add-ons</strong></th>
|
15 |
+
<th style="font-size:16px; padding-bottom:15px; width:205px; text-align:center; border-bottom:1px solid #008EC2;"><a href="http://gvectors.com/forum/" style="color:#008EC2; overflow:hidden; outline:none;" target="_blank">Addons Support Forum</a></th>
|
16 |
+
<th style="font-size:16px; padding-bottom:15px; width:175px; text-align:center; border-bottom:1px solid #008EC2;"><a href="http://gvectors.com/migrate-to-wpdiscuz/" style="color:#008EC2; overflow:hidden; outline:none;" target="_blank">Comments Migration</a></th>
|
17 |
</tr>
|
18 |
</thead>
|
19 |
<tr valign="top">
|
20 |
<td colspan="3" style="background:#FFF; text-align:left; font-size:13px;">
|
21 |
We've released the initial wpDiscuz 1.0.0 version on 30 November 2014.
|
22 |
After one year and one month of hard non-profit work we've decided to create paid add-ons to get some funds for future free wpDiscuz development.
|
23 |
+
wpDiscuz add-ons are also premium level extensions and those are also being actively developed.<br />
|
|
|
|
|
|
|
|
|
|
|
24 |
<p style="font-size:10px; color:#B1B1B1; font-style:italic; text-align:right; line-height:12px; padding-top:6px; margin:0px;">
|
25 |
Thank you!<br/> Sincerely yours,<br/>
|
26 |
gVectors Team
|
72 |
<hr />
|
73 |
<h3>Coming very soon</h3>
|
74 |
<ul style="list-style:circle; margin-left:20px;">
|
|
|
|
|
|
|
75 |
<li>wpDiscuz Widgets</li>
|
76 |
+
<li>wpDiscuz Quick Tags (free built-in)</li>
|
77 |
+
<li>wpDiscuz Comment Front-end Moderation</li>
|
78 |
</ul>
|
79 |
|
80 |
</div>
|
options/html-options.php
CHANGED
@@ -149,6 +149,8 @@
|
|
149 |
<a style="float: left;" class="button button-secondary" href="<?php echo admin_url(); ?>edit-comments.php?page=wpdiscuz_options_page&wpdiscuz_reset_options=1"><?php _e('Reset Options', 'wpdiscuz'); ?></a>
|
150 |
<?php $clearChildrenUrl = admin_url('admin-post.php/?action=clearChildrenData&clear=1'); ?>
|
151 |
<a href="<?php echo wp_nonce_url($clearChildrenUrl, 'clear_children_data'); ?>" class="button button-secondary" title="Use this button if wpDiscuz has been deactivated for a while." style="margin-left: 5px;" id="wpdiscuz_synch_comments"><?php _e('Refresh comment optimization', 'wpdiscuz'); ?></a>
|
|
|
|
|
152 |
<input style="float: right;" type="submit" class="button button-primary" name="wc_submit_options" value="<?php _e('Save Changes', 'wpdiscuz'); ?>" />
|
153 |
</p>
|
154 |
</td>
|
149 |
<a style="float: left;" class="button button-secondary" href="<?php echo admin_url(); ?>edit-comments.php?page=wpdiscuz_options_page&wpdiscuz_reset_options=1"><?php _e('Reset Options', 'wpdiscuz'); ?></a>
|
150 |
<?php $clearChildrenUrl = admin_url('admin-post.php/?action=clearChildrenData&clear=1'); ?>
|
151 |
<a href="<?php echo wp_nonce_url($clearChildrenUrl, 'clear_children_data'); ?>" class="button button-secondary" title="Use this button if wpDiscuz has been deactivated for a while." style="margin-left: 5px;" id="wpdiscuz_synch_comments"><?php _e('Refresh comment optimization', 'wpdiscuz'); ?></a>
|
152 |
+
<?php $voteUrl = admin_url('admin-post.php/?action=removeVoteData&remove=1'); ?>
|
153 |
+
<a href="<?php echo wp_nonce_url($voteUrl, 'remove_vote_data'); ?>" class="button button-secondary" style="margin-left: 5px;" id="wpdiscuz_clear_votes"><?php _e('Remove vote data', 'wpdiscuz'); ?></a>
|
154 |
<input style="float: right;" type="submit" class="button button-primary" name="wc_submit_options" value="<?php _e('Save Changes', 'wpdiscuz'); ?>" />
|
155 |
</p>
|
156 |
</td>
|
options/options-layouts/settings-subscription.php
CHANGED
@@ -9,37 +9,67 @@ if (!defined('ABSPATH')) {
|
|
9 |
<tbody>
|
10 |
<tr valign="top">
|
11 |
<th scope="row" style="width:55%;">
|
12 |
-
<label for="wc_disable_member_confirm" style="line-height:22px;"><span style="line-height:22px;"><?php _e('Disable subscription confirmation for registered users', 'wpdiscuz'); ?></span></label><br />
|
13 |
<label for="show_subscription_bar" style="line-height:22px;"><span style="line-height:22px;"><?php _e('Show comment subscription bar', 'wpdiscuz'); ?></span></label><br />
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
<tr valign="top">
|
32 |
-
<th scope="row">
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
</tr>
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</tbody>
|
44 |
</table>
|
45 |
</div>
|
9 |
<tbody>
|
10 |
<tr valign="top">
|
11 |
<th scope="row" style="width:55%;">
|
|
|
12 |
<label for="show_subscription_bar" style="line-height:22px;"><span style="line-height:22px;"><?php _e('Show comment subscription bar', 'wpdiscuz'); ?></span></label><br />
|
13 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;">
|
14 |
+
<?php _e('This bar provides two subscription options: notify of "new follow-up comments" and "new replies to my comments"', 'wpdiscuz') ?>
|
15 |
+
</p>
|
16 |
+
</th>
|
17 |
+
<td><input type="checkbox" <?php checked($this->optionsSerialized->showSubscriptionBar == 1) ?> value="1" name="show_subscription_bar" id="show_subscription_bar" /></td>
|
18 |
+
</tr>
|
19 |
+
<tr valign="top">
|
20 |
+
<th scope="row" style="width:55%;">
|
21 |
+
<label for="wc_disable_member_confirm" style="line-height:22px;"><span style="line-height:22px;"><?php _e('Disable subscription confirmation for registered users', 'wpdiscuz'); ?></span></label><br />
|
22 |
+
</th>
|
23 |
+
<td><input type="checkbox" <?php checked($this->optionsSerialized->disableMemberConfirm == 1) ?> value="1" name="wc_disable_member_confirm" id="wc_disable_member_confirm" /></td>
|
24 |
+
</tr>
|
25 |
+
<tr valign="top">
|
26 |
+
<th scope="row" style="width:55%;"><?php _e('Show subscription types in dropdown', 'wpdiscuz'); ?></th>
|
27 |
+
<td>
|
28 |
+
<fieldset>
|
29 |
+
<?php $subscriptionType = isset($this->optionsSerialized->subscriptionType) ? $this->optionsSerialized->subscriptionType : 1; ?>
|
30 |
+
<label title="<?php _e('Both', 'wpdiscuz') ?>">
|
31 |
+
<input type="radio" value="1" <?php checked(1 == $subscriptionType); ?> name="subscriptionType" id="subscriptionTypeBoth" />
|
32 |
+
<span><?php _e('Both post and all comments subscription', 'wpdiscuz') ?></span>
|
33 |
+
</label> <br/>
|
34 |
+
<label title="<?php _e('Show new comment/reply buttons to update manualy', 'wpdiscuz') ?>">
|
35 |
+
<input type="radio" value="2" <?php checked(2 == $subscriptionType); ?> name="subscriptionType" id="subscriptionTypePost" />
|
36 |
+
<span><?php _e('Post subscription', 'wpdiscuz') ?></span>
|
37 |
+
</label><br>
|
38 |
+
<label title="<?php _e('Always update', 'wpdiscuz') ?>">
|
39 |
+
<input type="radio" value="3" <?php checked(3 == $subscriptionType); ?> name="subscriptionType" id="subscriptionTypeAllComments" />
|
40 |
+
<span><?php _e('All comments subscription', 'wpdiscuz') ?></span>
|
41 |
+
</label> <br/>
|
42 |
+
</fieldset>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
<tr valign="top">
|
46 |
+
<th scope="row" style="width:55%;">
|
47 |
+
<label for="wc_show_hide_reply_checkbox" style="line-height:22px;"><span style="line-height:22px;"><?php _e('Show "Notify of new replies to this comment"', 'wpdiscuz'); ?></span></label><br />
|
48 |
+
<p style="font-size:13px; color:#999999; width:80%; padding-left:0px; margin-left:0px;">
|
49 |
+
<?php _e('wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.', 'wpdiscuz') ?>
|
50 |
+
</p>
|
51 |
+
</th>
|
52 |
+
<td><input type="checkbox" <?php checked($this->optionsSerialized->showHideReplyCheckbox == 1) ?> value="1" name="wc_show_hide_reply_checkbox" id="wc_show_hide_reply_checkbox" /></td>
|
53 |
+
</tr>
|
54 |
+
<tr valign="top">
|
55 |
+
<th scope="row" style="width:55%;">
|
56 |
+
<label for="isReplyDefaultChecked" style="line-height:22px;"><span style="line-height:22px;"><?php _e('"Notify of new replies to this comment" checked by default', 'wpdiscuz'); ?></span></label><br />
|
57 |
+
</th>
|
58 |
+
<td><input type="checkbox" <?php checked($this->optionsSerialized->isReplyDefaultChecked == 1) ?> value="1" name="isReplyDefaultChecked" id="isReplyDefaultChecked" /></td>
|
59 |
</tr>
|
60 |
+
<?php if (class_exists('Prompt_Comment_Form_Handling')) { ?>
|
61 |
+
<tr valign="top">
|
62 |
+
<th scope="row" style="width:55%;">
|
63 |
+
<?php _e('Use Postmatic for subscriptions and commenting by email', 'wpdiscuz'); ?>
|
64 |
+
<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.', 'wpdiscuz'); ?></p>
|
65 |
+
</th>
|
66 |
+
<td>
|
67 |
+
<label for="wc_use_postmatic_for_comment_notification">
|
68 |
+
<input type="checkbox" <?php checked($this->optionsSerialized->usePostmaticForCommentNotification == 1) ?> value="1" name="wc_use_postmatic_for_comment_notification" id="wc_use_postmatic_for_comment_notification" />
|
69 |
+
</label>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
<?php } ?>
|
73 |
</tbody>
|
74 |
</table>
|
75 |
</div>
|
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, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
|
5 |
Requires at least: 3.8.0
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: 3.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -62,6 +62,8 @@ Integration with User Profile Plugins - Please read the [Integrations] Tab in wp
|
|
62 |
|
63 |
= Add-ons =
|
64 |
|
|
|
|
|
65 |
* | [wpDiscuz - Google ReCaptcha](http://gvectors.com/product/wpdiscuz-recaptcha/)
|
66 |
* | [wpDiscuz - myCRED Integration](http://gvectors.com/product/wpdiscuz-mycred/)
|
67 |
* | [wpDiscuz - Comment Censure](http://gvectors.com/product/comment-censure/)
|
@@ -126,6 +128,27 @@ Support Forum: http://gvectors.com/forum/
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
= 3.2.5 =
|
130 |
|
131 |
* Fixed Bug: ERROR: Invalid field entry
|
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, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
|
5 |
Requires at least: 3.8.0
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: 3.2.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
62 |
|
63 |
= Add-ons =
|
64 |
|
65 |
+
* | [wpDiscuz - Emoticons](http://gvectors.com/product/wpdiscuz-emoticons/)
|
66 |
+
* | [wpDiscuz - Media Uploader](http://gvectors.com/product/wpdiscuz-media-uploader/)
|
67 |
* | [wpDiscuz - Google ReCaptcha](http://gvectors.com/product/wpdiscuz-recaptcha/)
|
68 |
* | [wpDiscuz - myCRED Integration](http://gvectors.com/product/wpdiscuz-mycred/)
|
69 |
* | [wpDiscuz - Comment Censure](http://gvectors.com/product/comment-censure/)
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 3.2.6 =
|
132 |
+
|
133 |
+
* Added: Text character countdown if the max limit is set by admin
|
134 |
+
* Added: Option to on/off certain notification types in subscription bar
|
135 |
+
* Added: Option to enable "new reply to my comment notifications" by default
|
136 |
+
* Added: Front-end Hungarian (hu_HU) translation, thanks to Balazs E. Pataki
|
137 |
+
* Fixed Bug: Back-slashing issue with apostrophes and quotes
|
138 |
+
* Fixed Bug: Small bugs with live update
|
139 |
+
* Fixed Bug: Problems with Lazy load on some servers
|
140 |
+
* Fixed Bug: Lost "Notify of new replies to this comment" subscription option
|
141 |
+
* Fixed Bug: Solution to avoid ultimate member upload avatar issue
|
142 |
+
* Fixed Bug: On some cases Read More function was not working after [Load More]
|
143 |
+
* Fixed Bug: Ultimate member avatar issue after deleting account
|
144 |
+
* New Addon: [wpDiscuz - Emoticons](http://gvectors.com/product/wpdiscuz-emoticons/)
|
145 |
+
* New Addon: [wpDiscuz - Media Uploader](http://gvectors.com/product/wpdiscuz-media-uploader/)
|
146 |
+
|
147 |
+
IMPORTANT:
|
148 |
+
|
149 |
+
- If you have JetPack installed please deactivate Jetpack comments, it affects wpDiscuz
|
150 |
+
- If you have a Cache Plugin and CDN, please delete all caches and purge CDN after wpDiscuz update.
|
151 |
+
|
152 |
= 3.2.5 =
|
153 |
|
154 |
* Fixed Bug: ERROR: Invalid field entry
|
templates/comment/class.WpdiscuzWalker.php
CHANGED
@@ -23,21 +23,20 @@ class WpdiscuzWalker extends Walker_Comment {
|
|
23 |
$GLOBALS['comment_depth'] = $depth;
|
24 |
$GLOBALS['comment'] = $comment;
|
25 |
// BEGIN
|
26 |
-
$
|
27 |
$depth = isset($args['addComment']) ? $args['addComment'] : $depth;
|
28 |
$uniqueId = $comment->comment_ID . '_' . $comment->comment_parent;
|
29 |
$commentContent = $comment->comment_content;
|
30 |
$commentWrapperClass = '';
|
31 |
-
if ($this->optionsSerialized->commentReadMoreLimit && count(explode(' ', strip_tags($commentContent))) > $this->optionsSerialized->commentReadMoreLimit) {
|
32 |
-
$commentContent = $this->helper->getCommentExcerpt($commentContent, $uniqueId);
|
33 |
-
}
|
34 |
$commentContent = wp_kses($commentContent, $this->helper->wc_allowed_tags);
|
35 |
$commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
|
36 |
$commentContent = $this->helper->makeClickable($commentContent);
|
37 |
$commentContent = apply_filters('comment_text', $commentContent, $comment, $args);
|
38 |
-
$
|
|
|
|
|
39 |
$commentContent .= $comment->comment_approved == 0 ? '<p class="wc_held_for_moderate">' . $this->optionsSerialized->phrases['wc_held_for_moderate'] . '</p>' : '';
|
40 |
-
|
41 |
$hideAvatarStyle = $this->optionsSerialized->wordpressShowAvatars ? '' : 'style = "margin-left : 0;"';
|
42 |
if ($this->optionsSerialized->wordpressIsPaginate && $comment->comment_parent) {
|
43 |
$rootComment = $this->optimizationHelper->getCommentRoot($comment->comment_parent);
|
@@ -113,25 +112,24 @@ class WpdiscuzWalker extends Walker_Comment {
|
|
113 |
$commentWrapperClass .= ($comment->comment_parent && $this->optionsSerialized->wordpressThreadComments) ? 'wc-comment wc-reply' : 'wc-comment';
|
114 |
}
|
115 |
|
116 |
-
$voteCount = isset($comment->meta_value) ? $comment->meta_value : get_comment_meta($comment->comment_ID, WpdiscuzCore::META_KEY_VOTES, true);
|
117 |
$authorName = apply_filters('wpdiscuz_comment_author', $authorName, $comment);
|
118 |
$profileUrl = apply_filters('wpdiscuz_profile_url', $profileUrl, $user);
|
119 |
$authorAvatarField = apply_filters('wpdiscuz_author_avatar_field', $authorAvatarField, $comment, $user, $profileUrl);
|
120 |
$authorAvatar = $this->optionsSerialized->wordpressShowAvatars ? get_avatar($authorAvatarField) : '';
|
121 |
|
122 |
if ($profileUrl) {
|
123 |
-
$commentAuthorAvatar = "<a href='$profileUrl'
|
124 |
} else {
|
125 |
$commentAuthorAvatar = $authorAvatar;
|
126 |
}
|
127 |
|
128 |
if ($commentAuthorUrl) {
|
129 |
-
$authorName = "<a rel='nofollow' href='$commentAuthorUrl'
|
130 |
} else if ($profileUrl) {
|
131 |
-
$authorName = "<a rel='nofollow' href='$profileUrl'
|
132 |
}
|
133 |
|
134 |
-
if (!$this->optionsSerialized->isGuestCanVote && !$
|
135 |
$voteClass = ' wc_tooltipster';
|
136 |
$voteTitleText = $this->optionsSerialized->phrases['wc_login_to_vote'];
|
137 |
$voteUp = $voteTitleText;
|
@@ -162,31 +160,35 @@ class WpdiscuzWalker extends Walker_Comment {
|
|
162 |
if (!$this->optionsSerialized->showHideCommentLink) {
|
163 |
$output .= '<div class="wc-comment-link"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/icon-link.gif') . '" class="wc-comment-img-link" title="<input type="text" class="wc-comment-link-input" value="' . $commentLink . '" />" /></div>';
|
164 |
}
|
|
|
165 |
$output .= '<div class="wc-comment-date">' . $posted_date . '</div><div class="wpdiscuz_clear_right"></div>';
|
166 |
$output .= '</div>';
|
167 |
$output .= '<div class="wc-comment-text">' . $commentContent . '</div>';
|
|
|
168 |
if ($comment->comment_approved == '1') {
|
169 |
$output .= '<div class="wc-comment-footer">';
|
170 |
if (!$this->optionsSerialized->votingButtonsShowHide) {
|
|
|
171 |
$output .= '<div class="wc-vote-result">' . $voteCount . '</div>';
|
|
|
172 |
$output .= ' <span class="wc-vote-link wc-up ' . $voteClass . '" title="' . $voteUp . '"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/thumbs-up.png') . '" align="absmiddle" class="wc-vote-img-up" /></span> | <span class="wc-vote-link wc-down ' . $voteClass . '" title="' . $voteDown . '"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/thumbs-down.png') . '" align="absmiddle" class="wc-vote-img-down" /></span> ';
|
173 |
}
|
174 |
|
175 |
if (comments_open($comment->comment_post_ID) && $this->optionsSerialized->wordpressThreadComments) {
|
176 |
if ($this->optionsSerialized->wordpressCommentRegistration) {
|
177 |
-
if (!$this->optionsSerialized->replyButtonMembersShowHide && $
|
178 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
179 |
-
} else if (in_array('administrator', $
|
180 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
181 |
}
|
182 |
} else {
|
183 |
if (!$this->optionsSerialized->replyButtonMembersShowHide && !$this->optionsSerialized->replyButtonGuestsShowHide) {
|
184 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
185 |
-
} else if (!$this->optionsSerialized->replyButtonMembersShowHide && $
|
186 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
187 |
-
} else if (!$this->optionsSerialized->replyButtonGuestsShowHide && !$
|
188 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
189 |
-
} else if (in_array('administrator', $
|
190 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
191 |
}
|
192 |
}
|
@@ -211,13 +213,15 @@ class WpdiscuzWalker extends Walker_Comment {
|
|
211 |
} else {
|
212 |
$isInRange = $this->helper->isContentInRange($commentContent);
|
213 |
$isEditable = $this->optionsSerialized->commentEditableTime == 'unlimit' ? true && $isInRange : $this->helper->isCommentEditable($comment) && $isInRange;
|
214 |
-
if ($
|
215 |
$output .= '<span class="wc_editable_comment">- ' . $this->optionsSerialized->phrases['wc_edit_text'] . '</span>';
|
216 |
$output .= '<span class="wc_cancel_edit">- ' . $this->optionsSerialized->phrases['wc_comment_edit_cancel_button'] . '</span>';
|
217 |
$output .= '<span class="wc_save_edited_comment" style="display:none;"> - ' . $this->optionsSerialized->phrases['wc_comment_edit_save_button'] . '</span>';
|
218 |
}
|
219 |
}
|
220 |
|
|
|
|
|
221 |
if ($depth < $this->optionsSerialized->wordpressThreadCommentsDepth && $this->optionsSerialized->wordpressThreadComments) {
|
222 |
$output .= '<span class="wc-toggle wpdiscuz-hidden">' . $this->optionsSerialized->phrases['wc_hide_replies_text'] . ' ∧' . '</span>';
|
223 |
}
|
23 |
$GLOBALS['comment_depth'] = $depth;
|
24 |
$GLOBALS['comment'] = $comment;
|
25 |
// BEGIN
|
26 |
+
$currentUser = $args['current_user'];
|
27 |
$depth = isset($args['addComment']) ? $args['addComment'] : $depth;
|
28 |
$uniqueId = $comment->comment_ID . '_' . $comment->comment_parent;
|
29 |
$commentContent = $comment->comment_content;
|
30 |
$commentWrapperClass = '';
|
|
|
|
|
|
|
31 |
$commentContent = wp_kses($commentContent, $this->helper->wc_allowed_tags);
|
32 |
$commentContent = apply_filters('wpdiscuz_before_comment_text', $commentContent, $comment);
|
33 |
$commentContent = $this->helper->makeClickable($commentContent);
|
34 |
$commentContent = apply_filters('comment_text', $commentContent, $comment, $args);
|
35 |
+
if ($this->optionsSerialized->commentReadMoreLimit && count(explode(' ', strip_tags($commentContent))) > $this->optionsSerialized->commentReadMoreLimit) {
|
36 |
+
$commentContent = $this->helper->getCommentExcerpt($commentContent, $uniqueId);
|
37 |
+
}
|
38 |
$commentContent .= $comment->comment_approved == 0 ? '<p class="wc_held_for_moderate">' . $this->optionsSerialized->phrases['wc_held_for_moderate'] . '</p>' : '';
|
39 |
+
|
40 |
$hideAvatarStyle = $this->optionsSerialized->wordpressShowAvatars ? '' : 'style = "margin-left : 0;"';
|
41 |
if ($this->optionsSerialized->wordpressIsPaginate && $comment->comment_parent) {
|
42 |
$rootComment = $this->optimizationHelper->getCommentRoot($comment->comment_parent);
|
112 |
$commentWrapperClass .= ($comment->comment_parent && $this->optionsSerialized->wordpressThreadComments) ? 'wc-comment wc-reply' : 'wc-comment';
|
113 |
}
|
114 |
|
|
|
115 |
$authorName = apply_filters('wpdiscuz_comment_author', $authorName, $comment);
|
116 |
$profileUrl = apply_filters('wpdiscuz_profile_url', $profileUrl, $user);
|
117 |
$authorAvatarField = apply_filters('wpdiscuz_author_avatar_field', $authorAvatarField, $comment, $user, $profileUrl);
|
118 |
$authorAvatar = $this->optionsSerialized->wordpressShowAvatars ? get_avatar($authorAvatarField) : '';
|
119 |
|
120 |
if ($profileUrl) {
|
121 |
+
$commentAuthorAvatar = "<a href='$profileUrl' target='_blank'>$authorAvatar</a>";
|
122 |
} else {
|
123 |
$commentAuthorAvatar = $authorAvatar;
|
124 |
}
|
125 |
|
126 |
if ($commentAuthorUrl) {
|
127 |
+
$authorName = "<a rel='nofollow' href='$commentAuthorUrl' target='_blank'>$authorName</a>";
|
128 |
} else if ($profileUrl) {
|
129 |
+
$authorName = "<a rel='nofollow' href='$profileUrl' target='_blank'>$authorName</a>";
|
130 |
}
|
131 |
|
132 |
+
if (!$this->optionsSerialized->isGuestCanVote && !$currentUser->ID) {
|
133 |
$voteClass = ' wc_tooltipster';
|
134 |
$voteTitleText = $this->optionsSerialized->phrases['wc_login_to_vote'];
|
135 |
$voteUp = $voteTitleText;
|
160 |
if (!$this->optionsSerialized->showHideCommentLink) {
|
161 |
$output .= '<div class="wc-comment-link"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/icon-link.gif') . '" class="wc-comment-img-link" title="<input type="text" class="wc-comment-link-input" value="' . $commentLink . '" />" /></div>';
|
162 |
}
|
163 |
+
$output = apply_filters('wpdiscuz_after_comment_link', $output, $comment);
|
164 |
$output .= '<div class="wc-comment-date">' . $posted_date . '</div><div class="wpdiscuz_clear_right"></div>';
|
165 |
$output .= '</div>';
|
166 |
$output .= '<div class="wc-comment-text">' . $commentContent . '</div>';
|
167 |
+
$output = apply_filters('wpdiscuz_after_comment_text', $output, $comment);
|
168 |
if ($comment->comment_approved == '1') {
|
169 |
$output .= '<div class="wc-comment-footer">';
|
170 |
if (!$this->optionsSerialized->votingButtonsShowHide) {
|
171 |
+
$voteCount = isset($comment->meta_value) ? $comment->meta_value : get_comment_meta($comment->comment_ID, WpdiscuzCore::META_KEY_VOTES, true);
|
172 |
$output .= '<div class="wc-vote-result">' . $voteCount . '</div>';
|
173 |
+
$output = apply_filters('wpdiscuz_voters', $output, $uniqueId, $comment, $user, $currentUser);
|
174 |
$output .= ' <span class="wc-vote-link wc-up ' . $voteClass . '" title="' . $voteUp . '"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/thumbs-up.png') . '" align="absmiddle" class="wc-vote-img-up" /></span> | <span class="wc-vote-link wc-down ' . $voteClass . '" title="' . $voteDown . '"><img src="' . plugins_url(WPDISCUZ_DIR_NAME . '/assets/img/thumbs-down.png') . '" align="absmiddle" class="wc-vote-img-down" /></span> ';
|
175 |
}
|
176 |
|
177 |
if (comments_open($comment->comment_post_ID) && $this->optionsSerialized->wordpressThreadComments) {
|
178 |
if ($this->optionsSerialized->wordpressCommentRegistration) {
|
179 |
+
if (!$this->optionsSerialized->replyButtonMembersShowHide && $currentUser->ID) {
|
180 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
181 |
+
} else if (in_array('administrator', $currentUser->roles)) {
|
182 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
183 |
}
|
184 |
} else {
|
185 |
if (!$this->optionsSerialized->replyButtonMembersShowHide && !$this->optionsSerialized->replyButtonGuestsShowHide) {
|
186 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
187 |
+
} else if (!$this->optionsSerialized->replyButtonMembersShowHide && $currentUser->ID) {
|
188 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
189 |
+
} else if (!$this->optionsSerialized->replyButtonGuestsShowHide && !$currentUser->ID) {
|
190 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
191 |
+
} else if (in_array('administrator', $currentUser->roles)) {
|
192 |
$output .= ' <span class="wc-reply-link" title="' . $replyText . '">' . $replyText . '</span> ';
|
193 |
}
|
194 |
}
|
213 |
} else {
|
214 |
$isInRange = $this->helper->isContentInRange($commentContent);
|
215 |
$isEditable = $this->optionsSerialized->commentEditableTime == 'unlimit' ? true && $isInRange : $this->helper->isCommentEditable($comment) && $isInRange;
|
216 |
+
if ($currentUser && $currentUser->ID && $currentUser->ID == $comment->user_id && $isEditable) {
|
217 |
$output .= '<span class="wc_editable_comment">- ' . $this->optionsSerialized->phrases['wc_edit_text'] . '</span>';
|
218 |
$output .= '<span class="wc_cancel_edit">- ' . $this->optionsSerialized->phrases['wc_comment_edit_cancel_button'] . '</span>';
|
219 |
$output .= '<span class="wc_save_edited_comment" style="display:none;"> - ' . $this->optionsSerialized->phrases['wc_comment_edit_save_button'] . '</span>';
|
220 |
}
|
221 |
}
|
222 |
|
223 |
+
$output = apply_filters('wpdiscuz_comment_buttons', $output, $comment, $user, $currentUser);
|
224 |
+
|
225 |
if ($depth < $this->optionsSerialized->wordpressThreadCommentsDepth && $this->optionsSerialized->wordpressThreadComments) {
|
226 |
$output .= '<span class="wc-toggle wpdiscuz-hidden">' . $this->optionsSerialized->phrases['wc_hide_replies_text'] . ' ∧' . '</span>';
|
227 |
}
|
templates/comment/comment-form.php
CHANGED
@@ -5,7 +5,9 @@ if (!defined('ABSPATH')) {
|
|
5 |
global $wpdiscuz, $post, $current_user;
|
6 |
if (!post_password_required($post->ID)) {
|
7 |
get_currentuserinfo();
|
8 |
-
|
|
|
|
|
9 |
$commentsCount = $wpdiscuz->dbManager->getCommentsCount($post->ID);
|
10 |
$header_text = '<span class="wc_header_text_count">' . $commentsCount . '</span> ';
|
11 |
$header_text .= ($commentsCount > 1) ? $wpdiscuz->optionsSerialized->phrases['wc_header_text_plural'] : $wpdiscuz->optionsSerialized->phrases['wc_header_text'];
|
@@ -14,7 +16,7 @@ if (!post_password_required($post->ID)) {
|
|
14 |
|
15 |
$wc_is_name_field_required = ($wpdiscuz->optionsSerialized->isNameFieldRequired) ? 'required="required"' : '';
|
16 |
$wc_is_email_field_required = ($wpdiscuz->optionsSerialized->isEmailFieldRequired) ? 'required="required"' : '';
|
17 |
-
|
18 |
$wpCommClasses = $current_user && $current_user->ID ? 'wpdiscuz_auth' : 'wpdiscuz_unauth';
|
19 |
$wpCommClasses .= $wpdiscuz->optionsSerialized->wordpressShowAvatars ? '' : ' wpdiscuz_no_avatar';
|
20 |
|
@@ -117,10 +119,13 @@ if (!post_password_required($post->ID)) {
|
|
117 |
$isPostmaticActive = !class_exists('Prompt_Comment_Form_Handling') || (class_exists('Prompt_Comment_Form_Handling') && !$wpdiscuz->optionsSerialized->usePostmaticForCommentNotification);
|
118 |
if ($wpdiscuz->optionsSerialized->showSubscriptionBar && $isPostmaticActive) {
|
119 |
$subscriptionData = $wpdiscuz->dbManager->hasSubscription($post->ID, $current_user->user_email);
|
120 |
-
$
|
121 |
-
|
122 |
-
|
123 |
-
$
|
|
|
|
|
|
|
124 |
}
|
125 |
?>
|
126 |
<div class="wpdiscuz-subscribe-bar">
|
@@ -131,8 +136,12 @@ if (!post_password_required($post->ID)) {
|
|
131 |
<div class="wpdiscuz-subscribe-form-intro"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_notify_of']; ?> </div>
|
132 |
<div class="wpdiscuz-subscribe-form-option" style="width:<?php echo (!$current_user->ID) ? '40%' : '65%'; ?>;">
|
133 |
<select class="wpdiscuz_select" name="wpdiscuzSubscriptionType" >
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
136 |
</select>
|
137 |
</div>
|
138 |
<?php if (!$current_user->ID) { ?>
|
@@ -184,8 +193,10 @@ if (!post_password_required($post->ID)) {
|
|
184 |
<div class="wpdiscuz-front-actions">
|
185 |
<div class="wpdiscuz-sort-buttons" style="font-size:14px;"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_sort_by']; ?>:
|
186 |
<span class="wpdiscuz-sort-button wpdiscuz-date-sort-desc"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_newest']; ?></span> |
|
187 |
-
<span class="wpdiscuz-sort-button wpdiscuz-date-sort-asc"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_oldest']; ?></span>
|
188 |
-
|
|
|
|
|
189 |
</div>
|
190 |
</div>
|
191 |
<?php } ?>
|
@@ -210,7 +221,7 @@ if (!post_password_required($post->ID)) {
|
|
210 |
}
|
211 |
}
|
212 |
|
213 |
-
if ($wpdiscuz->optionsSerialized->showSortingButtons && $wpdiscuz->optionsSerialized->mostVotedByDefault) {
|
214 |
$args['orderby'] = 'by_vote';
|
215 |
}
|
216 |
$commentData = $wpdiscuz->getWPComments($args);
|
@@ -223,7 +234,7 @@ if (!post_password_required($post->ID)) {
|
|
223 |
?>
|
224 |
<div class="wc-load-more-submit-wrap">
|
225 |
<a class="wc-load-more-link" href="<?php echo get_permalink($post->ID) . '#!parentId=' . $commentData['last_parent_id']; ?>">
|
226 |
-
<button name="submit" class="wc-load-more-submit button">
|
227 |
<?php echo $loadMoreButtonText; ?>
|
228 |
</button>
|
229 |
</a>
|
5 |
global $wpdiscuz, $post, $current_user;
|
6 |
if (!post_password_required($post->ID)) {
|
7 |
get_currentuserinfo();
|
8 |
+
if (!$wpdiscuz->optionsSerialized->votingButtonsShowHide) {
|
9 |
+
$wpdiscuz->dbManager->checkVoteData($post->ID);
|
10 |
+
}
|
11 |
$commentsCount = $wpdiscuz->dbManager->getCommentsCount($post->ID);
|
12 |
$header_text = '<span class="wc_header_text_count">' . $commentsCount . '</span> ';
|
13 |
$header_text .= ($commentsCount > 1) ? $wpdiscuz->optionsSerialized->phrases['wc_header_text_plural'] : $wpdiscuz->optionsSerialized->phrases['wc_header_text'];
|
16 |
|
17 |
$wc_is_name_field_required = ($wpdiscuz->optionsSerialized->isNameFieldRequired) ? 'required="required"' : '';
|
18 |
$wc_is_email_field_required = ($wpdiscuz->optionsSerialized->isEmailFieldRequired) ? 'required="required"' : '';
|
19 |
+
|
20 |
$wpCommClasses = $current_user && $current_user->ID ? 'wpdiscuz_auth' : 'wpdiscuz_unauth';
|
21 |
$wpCommClasses .= $wpdiscuz->optionsSerialized->wordpressShowAvatars ? '' : ' wpdiscuz_no_avatar';
|
22 |
|
119 |
$isPostmaticActive = !class_exists('Prompt_Comment_Form_Handling') || (class_exists('Prompt_Comment_Form_Handling') && !$wpdiscuz->optionsSerialized->usePostmaticForCommentNotification);
|
120 |
if ($wpdiscuz->optionsSerialized->showSubscriptionBar && $isPostmaticActive) {
|
121 |
$subscriptionData = $wpdiscuz->dbManager->hasSubscription($post->ID, $current_user->user_email);
|
122 |
+
$subscriptionType = null;
|
123 |
+
if ($subscriptionData) {
|
124 |
+
$isConfirmed = $subscriptionData['confirm'];
|
125 |
+
$subscriptionType = $subscriptionData['type'];
|
126 |
+
if ($subscriptionType == WpdiscuzCore::SUBSCRIPTION_POST || $subscriptionType == WpdiscuzCore::SUBSCRIPTION_ALL_COMMENT) {
|
127 |
+
$unsubscribeLink = $wpdiscuz->dbManager->unsubscribeLink($post->ID, $current_user->user_email);
|
128 |
+
}
|
129 |
}
|
130 |
?>
|
131 |
<div class="wpdiscuz-subscribe-bar">
|
136 |
<div class="wpdiscuz-subscribe-form-intro"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_notify_of']; ?> </div>
|
137 |
<div class="wpdiscuz-subscribe-form-option" style="width:<?php echo (!$current_user->ID) ? '40%' : '65%'; ?>;">
|
138 |
<select class="wpdiscuz_select" name="wpdiscuzSubscriptionType" >
|
139 |
+
<?php if ($wpdiscuz->optionsSerialized->subscriptionType != 3) { ?>
|
140 |
+
<option value="<?php echo WpdiscuzCore::SUBSCRIPTION_POST; ?>"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_notify_on_new_comment']; ?></option>
|
141 |
+
<?php } ?>
|
142 |
+
<?php if ($wpdiscuz->optionsSerialized->subscriptionType != 2) { ?>
|
143 |
+
<option value="<?php echo WpdiscuzCore::SUBSCRIPTION_ALL_COMMENT; ?>" <?php echo (isset($unsubscribeLink) || !$wpdiscuz->optionsSerialized->wordpressThreadComments) ? 'disabled' : ''; ?>><?php echo $wpdiscuz->optionsSerialized->phrases['wc_notify_on_all_new_reply']; ?></option>
|
144 |
+
<?php } ?>
|
145 |
</select>
|
146 |
</div>
|
147 |
<?php if (!$current_user->ID) { ?>
|
193 |
<div class="wpdiscuz-front-actions">
|
194 |
<div class="wpdiscuz-sort-buttons" style="font-size:14px;"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_sort_by']; ?>:
|
195 |
<span class="wpdiscuz-sort-button wpdiscuz-date-sort-desc"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_newest']; ?></span> |
|
196 |
+
<span class="wpdiscuz-sort-button wpdiscuz-date-sort-asc"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_oldest']; ?></span>
|
197 |
+
<?php if (!$wpdiscuz->optionsSerialized->votingButtonsShowHide) { ?>
|
198 |
+
| <span class="wpdiscuz-sort-button wpdiscuz-vote-sort-up"><?php echo $wpdiscuz->optionsSerialized->phrases['wc_most_voted']; ?></span>
|
199 |
+
<?php } ?>
|
200 |
</div>
|
201 |
</div>
|
202 |
<?php } ?>
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
if ($wpdiscuz->optionsSerialized->showSortingButtons && $wpdiscuz->optionsSerialized->mostVotedByDefault && !$wpdiscuz->optionsSerialized->votingButtonsShowHide) {
|
225 |
$args['orderby'] = 'by_vote';
|
226 |
}
|
227 |
$commentData = $wpdiscuz->getWPComments($args);
|
234 |
?>
|
235 |
<div class="wc-load-more-submit-wrap">
|
236 |
<a class="wc-load-more-link" href="<?php echo get_permalink($post->ID) . '#!parentId=' . $commentData['last_parent_id']; ?>">
|
237 |
+
<button name="submit" class="wc-load-more-submit wc-loaded button">
|
238 |
<?php echo $loadMoreButtonText; ?>
|
239 |
</button>
|
240 |
</a>
|
utils/class.WpdiscuzHelper.php
CHANGED
@@ -229,8 +229,10 @@ class WpdiscuzHelper {
|
|
229 |
* return boolean
|
230 |
*/
|
231 |
public function isCommentEditable($comment) {
|
232 |
-
$
|
233 |
-
|
|
|
|
|
234 |
}
|
235 |
|
236 |
/**
|
@@ -280,7 +282,10 @@ class WpdiscuzHelper {
|
|
280 |
$textarea_placeholder = $this->optionsSerialized->phrases['wc_comment_start_text'];
|
281 |
}
|
282 |
|
283 |
-
$
|
|
|
|
|
|
|
284 |
?>
|
285 |
<div class="wc-form-wrapper <?php echo!$isMain ? 'wc-secondary-form-wrapper' : 'wc-main-form-wrapper'; ?>" <?php echo!$isMain ? "id='wc-secondary-form-wrapper-$uniqueId' style='display: none;'" : "id='wc-main-form-wrapper-$uniqueId'"; ?> >
|
286 |
<div class="wpdiscuz-comment-message" style="display: block;"></div>
|
@@ -302,13 +307,18 @@ class WpdiscuzHelper {
|
|
302 |
echo ' style="margin-left: 0;"';
|
303 |
}
|
304 |
?>>
|
305 |
-
<
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
|
|
|
|
|
|
|
|
|
|
312 |
</div>
|
313 |
<div class="clearfix"></div>
|
314 |
</div>
|
@@ -331,7 +341,6 @@ class WpdiscuzHelper {
|
|
331 |
</div>
|
332 |
<?php } ?>
|
333 |
<div class="wc-form-submit">
|
334 |
-
<?php do_action('wpdiscuz_field', $uniqueId); ?>
|
335 |
<?php
|
336 |
if ($this->isShowCaptcha($currentUser->ID)) {
|
337 |
if (class_exists("wpDiscuzReCaptcha")) {
|
@@ -346,13 +355,15 @@ class WpdiscuzHelper {
|
|
346 |
<?php if ($this->optionsSerialized->wordpressThreadComments || class_exists('Prompt_Comment_Form_Handling')) { ?>
|
347 |
<?php
|
348 |
if ($this->optionsSerialized->showHideReplyCheckbox) {
|
349 |
-
$wpdiscuz_subscription_type = '';
|
350 |
if ($currentUser->ID) {
|
351 |
-
$
|
|
|
|
|
|
|
352 |
}
|
353 |
}
|
354 |
-
$isShowSubscribeWrapper = (isset($wpdiscuz_subscription_type) && ($wpdiscuz_subscription_type == '' || $wpdiscuz_subscription_type == 'comment')) ? true : false;
|
355 |
if ($isShowSubscribeWrapper) {
|
|
|
356 |
?>
|
357 |
<div class="wc_notification_checkboxes" style="display:block">
|
358 |
<?php
|
@@ -362,7 +373,7 @@ class WpdiscuzHelper {
|
|
362 |
<?php
|
363 |
} else {
|
364 |
?>
|
365 |
-
<input id="wc_notification_new_comment-<?php echo $uniqueId; ?>" class="wc_notification_new_comment-<?php echo $uniqueId; ?>" value="comment" type="checkbox" name="wpdiscuz_notification_type"
|
366 |
<?php
|
367 |
}
|
368 |
?>
|
@@ -507,7 +518,7 @@ class WpdiscuzHelper {
|
|
507 |
imageline($im, rand(0, 20), rand(1, 50), rand(150, 180), rand(1, 50), $color);
|
508 |
}
|
509 |
$fileName = $prefix . '-' . $t . '.png';
|
510 |
-
$filePath = $this->captchaDir . WPDISCUZ_DS . $fileName;
|
511 |
if (imagepng($im, $filePath, 5)) {
|
512 |
$captchaData['code'] = 1;
|
513 |
$captchaData['message'] = $fileName;
|
@@ -622,5 +633,9 @@ class WpdiscuzHelper {
|
|
622 |
<?php
|
623 |
}
|
624 |
|
|
|
|
|
|
|
|
|
625 |
}
|
626 |
|
229 |
* return boolean
|
230 |
*/
|
231 |
public function isCommentEditable($comment) {
|
232 |
+
$editableTimeLimit = isset($this->optionsSerialized->commentEditableTime) ? $this->optionsSerialized->commentEditableTime : 0;
|
233 |
+
$timeDiff = (time() - strtotime($comment->comment_date_gmt));
|
234 |
+
$editableTimeLimit = ($editableTimeLimit == 'unlimit') ? $timeDiff + 1 : intval($editableTimeLimit);
|
235 |
+
return $editableTimeLimit && ($timeDiff < $editableTimeLimit);
|
236 |
}
|
237 |
|
238 |
/**
|
282 |
$textarea_placeholder = $this->optionsSerialized->phrases['wc_comment_start_text'];
|
283 |
}
|
284 |
|
285 |
+
$commentTextMinLength = intval($this->optionsSerialized->commentTextMinLength);
|
286 |
+
$commentTextMaxLength = intval($this->optionsSerialized->commentTextMaxLength);
|
287 |
+
$commentTextLengthRange = ($commentTextMinLength && $commentTextMaxLength) ? 'data-validate-length-range="' . $commentTextMinLength . ',' . $commentTextMaxLength . '"' : '';
|
288 |
+
$textareaMaxLength = $commentTextMaxLength ? "maxlength=$commentTextMaxLength" : '';
|
289 |
?>
|
290 |
<div class="wc-form-wrapper <?php echo!$isMain ? 'wc-secondary-form-wrapper' : 'wc-main-form-wrapper'; ?>" <?php echo!$isMain ? "id='wc-secondary-form-wrapper-$uniqueId' style='display: none;'" : "id='wc-main-form-wrapper-$uniqueId'"; ?> >
|
291 |
<div class="wpdiscuz-comment-message" style="display: block;"></div>
|
307 |
echo ' style="margin-left: 0;"';
|
308 |
}
|
309 |
?>>
|
310 |
+
<div class="wpdiscuz-textarea-wrap">
|
311 |
+
<textarea <?php echo $commentTextLengthRange . ' ' . $textareaMaxLength; ?> placeholder="<?php echo $textarea_placeholder; ?>" required name="wc_comment" class="wc_comment wc_field_input"></textarea>
|
312 |
+
<?php if (intval($this->optionsSerialized->commentTextMaxLength)) { ?>
|
313 |
+
<div class="commentTextMaxLength"><?php echo $this->optionsSerialized->commentTextMaxLength; ?></div>
|
314 |
+
<?php } ?>
|
315 |
+
<?php if (defined('WPDISCUZ_BOTTOM_TOOLBAR')): ?>
|
316 |
+
<div class="wpdiscuz-textarea-foot">
|
317 |
+
<?php do_action('wpdiscuz_button', $uniqueId, $currentUser); ?>
|
318 |
+
<div class="wpdiscuz-button-actions"><?php do_action('wpdiscuz_button_actions', $uniqueId, $currentUser); ?></div>
|
319 |
+
</div>
|
320 |
+
<?php endif; ?>
|
321 |
+
</div>
|
322 |
</div>
|
323 |
<div class="clearfix"></div>
|
324 |
</div>
|
341 |
</div>
|
342 |
<?php } ?>
|
343 |
<div class="wc-form-submit">
|
|
|
344 |
<?php
|
345 |
if ($this->isShowCaptcha($currentUser->ID)) {
|
346 |
if (class_exists("wpDiscuzReCaptcha")) {
|
355 |
<?php if ($this->optionsSerialized->wordpressThreadComments || class_exists('Prompt_Comment_Form_Handling')) { ?>
|
356 |
<?php
|
357 |
if ($this->optionsSerialized->showHideReplyCheckbox) {
|
|
|
358 |
if ($currentUser->ID) {
|
359 |
+
$subscriptionData = $this->dbManager->hasSubscription($post->ID, $currentUser->user_email);
|
360 |
+
$isShowSubscribeWrapper = !$subscriptionData || ($subscriptionData && $subscriptionData['type'] == WpDiscuzConstants::SUBSCRIPTION_COMMENT) ? true : false;
|
361 |
+
} else {
|
362 |
+
$isShowSubscribeWrapper = true;
|
363 |
}
|
364 |
}
|
|
|
365 |
if ($isShowSubscribeWrapper) {
|
366 |
+
$isReplyDefaultChecked = $this->optionsSerialized->isReplyDefaultChecked ? 'checked="checked"' : '';
|
367 |
?>
|
368 |
<div class="wc_notification_checkboxes" style="display:block">
|
369 |
<?php
|
373 |
<?php
|
374 |
} else {
|
375 |
?>
|
376 |
+
<input id="wc_notification_new_comment-<?php echo $uniqueId; ?>" class="wc_notification_new_comment-<?php echo $uniqueId; ?>" value="comment" type="checkbox" name="wpdiscuz_notification_type" <?php echo $isReplyDefaultChecked; ?>/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-<?php echo $uniqueId; ?>"><?php echo $this->optionsSerialized->phrases['wc_notify_on_new_reply']; ?></label><br />
|
377 |
<?php
|
378 |
}
|
379 |
?>
|
518 |
imageline($im, rand(0, 20), rand(1, 50), rand(150, 180), rand(1, 50), $color);
|
519 |
}
|
520 |
$fileName = $prefix . '-' . $t . '.png';
|
521 |
+
$filePath = $this->captchaDir . WPDISCUZ_DS . $fileName;
|
522 |
if (imagepng($im, $filePath, 5)) {
|
523 |
$captchaData['code'] = 1;
|
524 |
$captchaData['message'] = $fileName;
|
633 |
<?php
|
634 |
}
|
635 |
|
636 |
+
public function isLoadWpdiscuz($post) {
|
637 |
+
return $post && in_array($post->post_type, $this->optionsSerialized->postTypes) && (comments_open($post) || $post->comment_count) && (is_singular() || is_front_page()) && post_type_supports($post->post_type, 'comments');
|
638 |
+
}
|
639 |
+
|
640 |
}
|
641 |
|
utils/class.WpdiscuzOptimizationHelper.php
CHANGED
@@ -65,7 +65,7 @@ class WpdiscuzOptimizationHelper {
|
|
65 |
$update = 1;
|
66 |
$commentTree = array();
|
67 |
$comments = array();
|
68 |
-
$idsInMeta = $this->dbManager->
|
69 |
$isIdsInMeta = count($commentIds) == count(array_intersect($commentIds, $idsInMeta));
|
70 |
if ($isIdsInMeta) {
|
71 |
$ids = implode(',', $commentIds);
|
@@ -104,7 +104,9 @@ class WpdiscuzOptimizationHelper {
|
|
104 |
if ($comment->comment_approved == '1' && $comment->comment_parent) {
|
105 |
$this->updateCommentTree($comment);
|
106 |
}
|
107 |
-
|
|
|
|
|
108 |
if (!$comment->comment_parent) {
|
109 |
update_comment_meta($id, WpdiscuzCore::META_KEY_CHILDREN, '');
|
110 |
}
|
@@ -222,4 +224,13 @@ class WpdiscuzOptimizationHelper {
|
|
222 |
wp_redirect(admin_url('edit-comments.php?page=wpdiscuz_options_page'));
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
65 |
$update = 1;
|
66 |
$commentTree = array();
|
67 |
$comments = array();
|
68 |
+
$idsInMeta = $this->dbManager->getOptimizedCommentIds($postId);
|
69 |
$isIdsInMeta = count($commentIds) == count(array_intersect($commentIds, $idsInMeta));
|
70 |
if ($isIdsInMeta) {
|
71 |
$ids = implode(',', $commentIds);
|
104 |
if ($comment->comment_approved == '1' && $comment->comment_parent) {
|
105 |
$this->updateCommentTree($comment);
|
106 |
}
|
107 |
+
if (!$this->optionsSerialized->votingButtonsShowHide) {
|
108 |
+
update_comment_meta($id, WpdiscuzCore::META_KEY_VOTES, 0);
|
109 |
+
}
|
110 |
if (!$comment->comment_parent) {
|
111 |
update_comment_meta($id, WpdiscuzCore::META_KEY_CHILDREN, '');
|
112 |
}
|
224 |
wp_redirect(admin_url('edit-comments.php?page=wpdiscuz_options_page'));
|
225 |
}
|
226 |
|
227 |
+
public function removeVoteData() {
|
228 |
+
if (isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'remove_vote_data') && isset($_GET['remove']) && intval($_GET['remove']) == 1 && current_user_can('manage_options')) {
|
229 |
+
$res = $this->dbManager->removeVotes();
|
230 |
+
}
|
231 |
+
if ($res) {
|
232 |
+
wp_redirect(admin_url('edit-comments.php?page=wpdiscuz_options_page'));
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
}
|