Version Description
- Changed : Comment Box Header
- Fixed Bug : CSS Issues
- Fixed Bug : Layout Issues with some themes
Download this release
Release Info
Developer | AdvancedCoding |
Plugin | Comments – wpDiscuz |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- comment-form/form.php +26 -22
- comment-form/tpl-comment.php +25 -26
- files/img/plugin-icon/logo.png +0 -0
- files/img/plugin-icon/plugin-icon-20.png +0 -0
- files/img/plugin-icon/plugin-icon-48.png +0 -0
- options-templates/options-template-main.php +19 -19
- options-templates/options-template-phrases.php +536 -514
- readme.txt +69 -58
- tasks.txt +5 -0
- wc-css.php +18 -15
- wc-options-serialize.php +5 -3
- wc-options.php +74 -73
- wc.php +448 -448
comment-form/form.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php global $post, $wc_core;?>
|
2 |
<script type="text/javascript">
|
3 |
// initialize the validator function
|
4 |
-
validator.message['invalid'] = '<?php echo $wc_core->wc_options->
|
5 |
-
validator.message['empty'] = '<?php echo $wc_core->wc_options->
|
6 |
-
validator.message['email'] = '<?php echo $wc_core->wc_options->
|
7 |
|
8 |
jQuery(document).ready(function ($) {
|
9 |
$(document).delegate('.wc-toggle', 'click', function() {
|
@@ -11,9 +11,9 @@
|
|
11 |
var uniqueID = toggleID.substring(toggleID.lastIndexOf('-') + 1);
|
12 |
$('#wc-comm-' + uniqueID + ' .wc-reply').slideToggle(500, function () {
|
13 |
if ($(this).is(':hidden')) {
|
14 |
-
$('#' + toggleID).html('<?php echo $wc_core->wc_options->
|
15 |
} else {
|
16 |
-
$('#' + toggleID).html('<?php echo $wc_core->wc_options->
|
17 |
}
|
18 |
});
|
19 |
});
|
@@ -28,20 +28,21 @@
|
|
28 |
|
29 |
$textarea_placeholder = '';
|
30 |
if ($post->comment_count) {
|
31 |
-
$textarea_placeholder = $wc_core->wc_options->
|
32 |
} else {
|
33 |
-
$textarea_placeholder = $wc_core->wc_options->
|
34 |
}
|
35 |
$unique_id = $post->ID . '_' . 0;
|
36 |
-
$header_text =
|
37 |
-
$header_text .= $wc_core->wc_options->
|
38 |
-
$header_text .= ($post->comment_count > 1) ? $wc_core->wc_options->
|
39 |
-
$header_text .= ' ' . $wc_core->wc_options->
|
40 |
$header_text .= ' "' . get_the_title($post) . '"';
|
41 |
?>
|
42 |
-
|
|
|
43 |
<div id="wpcomm">
|
44 |
-
<p class="wc-comment-title"><?php echo $header_text; ?></p>
|
45 |
<div class="wc-form-wrapper">
|
46 |
<?php
|
47 |
if ($wc_core->is_guest_can_comment()) {
|
@@ -58,13 +59,13 @@ $header_text .= ' "' . get_the_title($post) . '"';
|
|
58 |
<div id="wc-form-footer-<?php echo $unique_id; ?>" class="wc-form-footer">
|
59 |
<?php if (!is_user_logged_in()) { ?>
|
60 |
<div class="wc-author-data">
|
61 |
-
<div class="wc-field-name item"><input id="wc_name-<?php echo $unique_id; ?>" class="wc_name" name="wc_name" required="required" value="" type="text" placeholder="<?php echo $wc_core->wc_options->
|
62 |
-
<div class="wc-field-email item"><input id="wc_email-<?php echo $unique_id; ?>" class="wc_email email" name="wc_email" required="required" value="" type="email" placeholder="<?php echo $wc_core->wc_options->
|
63 |
<div style="clear:both"></div>
|
64 |
</div>
|
65 |
<?php } ?>
|
66 |
<div class="wc-form-submit">
|
67 |
-
<?php if (!$wc_core->wc_options->
|
68 |
<?php if (!is_user_logged_in()) { ?>
|
69 |
<div class="wc-field-captcha item">
|
70 |
<input id="wc_captcha-<?php echo $unique_id; ?>" name="wc_captcha" required="required" value="" type="text" />
|
@@ -72,11 +73,11 @@ $header_text .= ' "' . get_the_title($post) . '"';
|
|
72 |
<img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $post->ID . '-' . 0); ?>" id="wc_captcha_img-<?php echo $unique_id; ?>" />
|
73 |
<img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png'); ?>" id="wc_captcha_refresh_img-<?php echo $unique_id; ?>" class="wc_captcha_refresh_img" />
|
74 |
</span>
|
75 |
-
<span class="captcha_msg"><?php echo $wc_core->wc_options->
|
76 |
</div>
|
77 |
<?php } ?>
|
78 |
<?php } ?>
|
79 |
-
<div class="wc-field-submit"><input type="button" name="submit" value="<?php echo $wc_core->wc_options->
|
80 |
<div style="clear:both"></div>
|
81 |
</div>
|
82 |
</div>
|
@@ -86,7 +87,7 @@ $header_text .= ' "' . get_the_title($post) . '"';
|
|
86 |
<input type="hidden" name="wc_comment_parent" value="0" id="wc_comment_parent-<?php echo $unique_id; ?>" />
|
87 |
</form>
|
88 |
<?php } else { ?>
|
89 |
-
<p class="wc-must-login"><?php echo $wc_core->wc_options->
|
90 |
<?php } ?>
|
91 |
</div>
|
92 |
<hr/>
|
@@ -95,15 +96,18 @@ $header_text .= ' "' . get_the_title($post) . '"';
|
|
95 |
<?php $wc_parent_comments_count = $wc_core->get_wp_comments(1); ?>
|
96 |
</div>
|
97 |
|
98 |
-
<?php if ($wc_parent_comments_count > $wc_core->wc_options->
|
99 |
<div class="wc-load-more-submit-wrap">
|
100 |
-
<input type="button" name="submit" value="<?php echo $wc_core->wc_options->
|
101 |
<input type="hidden" name="wc_comments_offset" id="wc_comments_offset" value="1" />
|
102 |
-
<input type="hidden" name="wc_parent_per_page" id="wc_parent_per_page" value="<?php echo $wc_core->wc_options->
|
103 |
<input type="hidden" name="wc_parent_comments_count" id="wc_parent_comments_count" value="<?php echo $wc_parent_comments_count; ?>" />
|
104 |
</div>
|
105 |
<?php } ?>
|
106 |
|
|
|
|
|
|
|
107 |
<div id="wc_openModalFormAction" class="modalDialog">
|
108 |
<div id="wc_response_info" class="wc_modal">
|
109 |
<div id="wc_response_info_box">
|
1 |
<?php global $post, $wc_core;?>
|
2 |
<script type="text/javascript">
|
3 |
// initialize the validator function
|
4 |
+
validator.message['invalid'] = '<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_invalid_field']; ?>';
|
5 |
+
validator.message['empty'] = '<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_error_empty_text']; ?>';
|
6 |
+
validator.message['email'] = '<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_error_email_text']; ?>';
|
7 |
|
8 |
jQuery(document).ready(function ($) {
|
9 |
$(document).delegate('.wc-toggle', 'click', function() {
|
11 |
var uniqueID = toggleID.substring(toggleID.lastIndexOf('-') + 1);
|
12 |
$('#wc-comm-' + uniqueID + ' .wc-reply').slideToggle(500, function () {
|
13 |
if ($(this).is(':hidden')) {
|
14 |
+
$('#' + toggleID).html('<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_show_replies_text']; ?> ∨');
|
15 |
} else {
|
16 |
+
$('#' + toggleID).html('<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_hide_replies_text']; ?> ∧');
|
17 |
}
|
18 |
});
|
19 |
});
|
28 |
|
29 |
$textarea_placeholder = '';
|
30 |
if ($post->comment_count) {
|
31 |
+
$textarea_placeholder = $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_comment_join_text'];
|
32 |
} else {
|
33 |
+
$textarea_placeholder = $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_comment_start_text'];
|
34 |
}
|
35 |
$unique_id = $post->ID . '_' . 0;
|
36 |
+
$header_text = $post->comment_count . ' ';
|
37 |
+
$header_text .= $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_header_text'];
|
38 |
+
$header_text .= ($post->comment_count > 1) ? $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_plural_text'] : '';
|
39 |
+
$header_text .= ' ' . $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_header_on_text'];
|
40 |
$header_text .= ' "' . get_the_title($post) . '"';
|
41 |
?>
|
42 |
+
<div style="clear:both"></div>
|
43 |
+
<h3 class="wc-comment-header"><?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_leave_a_reply_text']; ?></h3>
|
44 |
<div id="wpcomm">
|
45 |
+
<p class="wc-comment-title"><?php echo ($post->comment_count) ? $header_text : $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_be_the_first_text']; ?></p>
|
46 |
<div class="wc-form-wrapper">
|
47 |
<?php
|
48 |
if ($wc_core->is_guest_can_comment()) {
|
59 |
<div id="wc-form-footer-<?php echo $unique_id; ?>" class="wc-form-footer">
|
60 |
<?php if (!is_user_logged_in()) { ?>
|
61 |
<div class="wc-author-data">
|
62 |
+
<div class="wc-field-name item"><input id="wc_name-<?php echo $unique_id; ?>" class="wc_name" name="wc_name" required="required" value="" type="text" placeholder="<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_name_text'] ?>"/></div>
|
63 |
+
<div class="wc-field-email item"><input id="wc_email-<?php echo $unique_id; ?>" class="wc_email email" name="wc_email" required="required" value="" type="email" placeholder="<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_email_text']; ?>"/></div>
|
64 |
<div style="clear:both"></div>
|
65 |
</div>
|
66 |
<?php } ?>
|
67 |
<div class="wc-form-submit">
|
68 |
+
<?php if (!$wc_core->wc_options->wc_options_serialized->wc_captcha_show_hide) { ?>
|
69 |
<?php if (!is_user_logged_in()) { ?>
|
70 |
<div class="wc-field-captcha item">
|
71 |
<input id="wc_captcha-<?php echo $unique_id; ?>" name="wc_captcha" required="required" value="" type="text" />
|
73 |
<img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $post->ID . '-' . 0); ?>" id="wc_captcha_img-<?php echo $unique_id; ?>" />
|
74 |
<img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png'); ?>" id="wc_captcha_refresh_img-<?php echo $unique_id; ?>" class="wc_captcha_refresh_img" />
|
75 |
</span>
|
76 |
+
<span class="captcha_msg"><?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_captcha_text']; ?></span>
|
77 |
</div>
|
78 |
<?php } ?>
|
79 |
<?php } ?>
|
80 |
+
<div class="wc-field-submit"><input type="button" name="submit" value="<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_submit_text']; ?>" id="wc_comm-<?php echo $unique_id; ?>" class="wc_comm_submit button alt"/></div>
|
81 |
<div style="clear:both"></div>
|
82 |
</div>
|
83 |
</div>
|
87 |
<input type="hidden" name="wc_comment_parent" value="0" id="wc_comment_parent-<?php echo $unique_id; ?>" />
|
88 |
</form>
|
89 |
<?php } else { ?>
|
90 |
+
<p class="wc-must-login"><?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_you_must_be_text']; ?> <a href="<?php echo wp_login_url(); ?>"><?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_logged_in_text']; ?></a> <?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_to_post_comment_text']; ?></p>
|
91 |
<?php } ?>
|
92 |
</div>
|
93 |
<hr/>
|
96 |
<?php $wc_parent_comments_count = $wc_core->get_wp_comments(1); ?>
|
97 |
</div>
|
98 |
|
99 |
+
<?php if ($wc_parent_comments_count > $wc_core->wc_options->wc_options_serialized->wc_comment_count) { ?>
|
100 |
<div class="wc-load-more-submit-wrap">
|
101 |
+
<input type="button" name="submit" value="<?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_load_more_submit_text']; ?>" id="wc-load-more-submit-<?php echo $unique_id; ?>" class="wc-load-more-submit button"/>
|
102 |
<input type="hidden" name="wc_comments_offset" id="wc_comments_offset" value="1" />
|
103 |
+
<input type="hidden" name="wc_parent_per_page" id="wc_parent_per_page" value="<?php echo $wc_core->wc_options->wc_options_serialized->wc_comment_count; ?>" />
|
104 |
<input type="hidden" name="wc_parent_comments_count" id="wc_parent_comments_count" value="<?php echo $wc_parent_comments_count; ?>" />
|
105 |
</div>
|
106 |
<?php } ?>
|
107 |
|
108 |
+
<div style="clear:both"></div>
|
109 |
+
<div class="by-wpdiscuz"><a href="http://gvectors.com/wpdiscuz/">wpDiscuz</a></div>
|
110 |
+
|
111 |
<div id="wc_openModalFormAction" class="modalDialog">
|
112 |
<div id="wc_response_info" class="wc_modal">
|
113 |
<div id="wc_response_info_box">
|
comment-form/tpl-comment.php
CHANGED
@@ -26,20 +26,20 @@ class WC_Comment_Template_Builder {
|
|
26 |
if ($user) {
|
27 |
$post = get_post($comment->comment_post_ID);
|
28 |
if ($user->ID == $post->post_author) {
|
29 |
-
$author_title = $this->wc_options->
|
30 |
} else if (in_array('administrator', $user->roles)) {
|
31 |
-
$author_title = $this->wc_options->
|
32 |
} else {
|
33 |
-
$author_title = $this->wc_options->
|
34 |
}
|
35 |
} else {
|
36 |
-
$author_title = $this->wc_options->
|
37 |
}
|
38 |
|
39 |
$posted_date = $this->wc_helper->dateDiff(time(), strtotime($comment->comment_date_gmt), 2);
|
40 |
|
41 |
-
$reply_text = $this->wc_options->
|
42 |
-
$share_text = $this->wc_options->
|
43 |
$comment_wrapper_class = ($comment->comment_parent) ? 'wc-comment wc-reply' : 'wc-comment';
|
44 |
$textarea_placeholder = $this->get_textarea_placeholder($comment);
|
45 |
$comm_author_avatar = $this->wc_helper->get_comment_author_avatar($comment);
|
@@ -53,20 +53,20 @@ class WC_Comment_Template_Builder {
|
|
53 |
|
54 |
if (!is_user_logged_in()) {
|
55 |
$vote_cls = ' wc_tooltipster';
|
56 |
-
$vote_title_text = $this->wc_options->
|
57 |
$vote_up = $vote_title_text;
|
58 |
$vote_down = $vote_title_text;
|
59 |
} else {
|
60 |
$vote_cls = ' wc_vote';
|
61 |
-
$vote_up = $this->wc_options->
|
62 |
-
$vote_down = $this->wc_options->
|
63 |
}
|
64 |
|
65 |
$parent_comment = (!$comment->comment_parent && count($child_comments)) ? ' parnet_comment' : '';
|
66 |
|
67 |
$output = '<div id="wc-comm-' . $unique_id . '" class="' . $comment_wrapper_class . ' ' . $parent_comment . '">';
|
68 |
$output .= '<div class="wc-comment-left">' . $comm_author_avatar;
|
69 |
-
if (!$this->wc_options->
|
70 |
$output .= '<div class="wc-comment-label">' . $author_title . '</div>';
|
71 |
}
|
72 |
$output .= '</div>';
|
@@ -74,7 +74,7 @@ class WC_Comment_Template_Builder {
|
|
74 |
$output .= '<div class="wc-comment-header"><div class="wc-comment-author">' . $comment->comment_author . '</div><div class="wc-comment-date">' . $posted_date . '</div><div style="clear:both"></div></div>';
|
75 |
$output .= '<div class="wc-comment-text">' . $comment_content . '</div>';
|
76 |
$output .= '<div class="wc-comment-footer">';
|
77 |
-
if (!$this->wc_options->
|
78 |
$output .= '<div id="vote-count-' . $unique_id . '" class="wc-vote-result">' . $vote_count . '</div>';
|
79 |
$output .= '<span id="wc-up-' . $unique_id . '" class="wc-vote-link wc-up ' . $vote_cls . '" title="' . $vote_up . '">∧</span> | <span id="wc-down-' . $unique_id . '" class="wc-vote-link wc-down ' . $vote_cls . '" title="' . $vote_down . '">∨</span> ';
|
80 |
}
|
@@ -84,15 +84,15 @@ class WC_Comment_Template_Builder {
|
|
84 |
}
|
85 |
|
86 |
|
87 |
-
if (!$this->wc_options->
|
88 |
$output .= '- <span id="wc-comm-share-' . $unique_id . '" class="wc-share-link" title="' . $share_text . '">' . $share_text . '</span> ';
|
89 |
|
90 |
$twitt_content = $comment_content . ' ' . get_comment_link($comment);
|
91 |
|
92 |
$output .= '<span id="share_buttons_box-' . $unique_id . '" class="share_buttons_box">';
|
93 |
-
$output .= '<a target="_blank" href="http://www.facebook.com/sharer.php" title="' . $this->wc_options->
|
94 |
-
$output .= '<a target="_blank" href="https://twitter.com/home?status=' . $twitt_content . '" title="' . $this->wc_options->
|
95 |
-
$output .= '<a target="_blank" href="https://plus.google.com/share?url=' . get_permalink($comment->comment_post_ID) . '" title="' . $this->wc_options->
|
96 |
$output .= '</span>';
|
97 |
}
|
98 |
|
@@ -105,7 +105,7 @@ class WC_Comment_Template_Builder {
|
|
105 |
$visibility = 'none';
|
106 |
if (!$comment->comment_parent && count($child_comments)) {
|
107 |
$visibility = 'block';
|
108 |
-
$output .= '<span id="wc-toggle-' . $unique_id . '" class="wc-toggle" style="display:' . $visibility . ';">' . $this->wc_options->
|
109 |
}
|
110 |
|
111 |
$output .= '</div>';
|
@@ -120,19 +120,18 @@ class WC_Comment_Template_Builder {
|
|
120 |
$output .= '<div id="wc-form-footer-' . $unique_id . '" class="wc-form-footer">';
|
121 |
|
122 |
if (!is_user_logged_in()) {
|
123 |
-
$output .= '<div class="wc-author-data"><div class="wc-field-name item"><input id="wc_name-' . $unique_id . '" name="wc_name" class="wc_name" required="required" value="" type="text" placeholder="' . $this->wc_options->
|
124 |
}
|
125 |
|
126 |
$output .= '<div class="wc-form-submit">';
|
127 |
|
128 |
-
if (!$this->wc_options->
|
129 |
if (!is_user_logged_in()) {
|
130 |
-
$output .= '<div class="wc-field-captcha item"><input id="wc_captcha-' . $unique_id . '" name="wc_captcha" required="required" value="" type="text" /><span class="wc-label wc-captcha-label"><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $comment->comment_post_ID . '-' . $comment->comment_ID) . '" id="wc_captcha_img-' . $unique_id . '" /><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png') . '" id="wc_captcha_refresh_img-' . $unique_id . '" class="wc_captcha_refresh_img" /></span><span class="captcha_msg">' . $this->wc_options->
|
131 |
}
|
132 |
}
|
133 |
|
134 |
-
$output .= '<div class="wc-field-submit"><input type="button" name="submit" value="' . $this->wc_options->
|
135 |
-
<div class="wc-copyright"><a href="http://www.gvectors.com/" target="_blank">by gVectors Team</a></div>
|
136 |
</div>';
|
137 |
$output .= '<div style="clear:both"></div>';
|
138 |
$output .= '</div>';
|
@@ -150,8 +149,8 @@ class WC_Comment_Template_Builder {
|
|
150 |
|
151 |
public function is_guest_can_reply() {
|
152 |
$user_can_comment = TRUE;
|
153 |
-
if (!$this->wc_options->
|
154 |
-
if ($this->wc_options->
|
155 |
if (!is_user_logged_in()) {
|
156 |
$user_can_comment = FALSE;
|
157 |
}
|
@@ -166,7 +165,7 @@ class WC_Comment_Template_Builder {
|
|
166 |
|
167 |
public function is_customer_can_reply() {
|
168 |
$user_can_comment = TRUE;
|
169 |
-
if ($this->wc_options->
|
170 |
$user_can_comment = $this->is_user_can_reply_by_role('customer');
|
171 |
}
|
172 |
return $user_can_comment;
|
@@ -193,9 +192,9 @@ class WC_Comment_Template_Builder {
|
|
193 |
public function get_textarea_placeholder($comment) {
|
194 |
$post = get_post($comment->comment_post_ID);
|
195 |
if ($post->comment_count) {
|
196 |
-
$textarea_placeholder = $this->wc_options->
|
197 |
} else {
|
198 |
-
$textarea_placeholder = $this->wc_options->
|
199 |
}
|
200 |
return $textarea_placeholder;
|
201 |
}
|
26 |
if ($user) {
|
27 |
$post = get_post($comment->comment_post_ID);
|
28 |
if ($user->ID == $post->post_author) {
|
29 |
+
$author_title = $this->wc_options->wc_options_serialized->wc_phrases['wc_user_title_author_text'];
|
30 |
} else if (in_array('administrator', $user->roles)) {
|
31 |
+
$author_title = $this->wc_options->wc_options_serialized->wc_phrases['wc_user_title_admin_text'];
|
32 |
} else {
|
33 |
+
$author_title = $this->wc_options->wc_options_serialized->wc_phrases['wc_user_title_member_text'];
|
34 |
}
|
35 |
} else {
|
36 |
+
$author_title = $this->wc_options->wc_options_serialized->wc_phrases['wc_user_title_guest_text'];
|
37 |
}
|
38 |
|
39 |
$posted_date = $this->wc_helper->dateDiff(time(), strtotime($comment->comment_date_gmt), 2);
|
40 |
|
41 |
+
$reply_text = $this->wc_options->wc_options_serialized->wc_phrases['wc_reply_text'];
|
42 |
+
$share_text = $this->wc_options->wc_options_serialized->wc_phrases['wc_share_text'];
|
43 |
$comment_wrapper_class = ($comment->comment_parent) ? 'wc-comment wc-reply' : 'wc-comment';
|
44 |
$textarea_placeholder = $this->get_textarea_placeholder($comment);
|
45 |
$comm_author_avatar = $this->wc_helper->get_comment_author_avatar($comment);
|
53 |
|
54 |
if (!is_user_logged_in()) {
|
55 |
$vote_cls = ' wc_tooltipster';
|
56 |
+
$vote_title_text = $this->wc_options->wc_options_serialized->wc_phrases['wc_login_to_vote'];
|
57 |
$vote_up = $vote_title_text;
|
58 |
$vote_down = $vote_title_text;
|
59 |
} else {
|
60 |
$vote_cls = ' wc_vote';
|
61 |
+
$vote_up = $this->wc_options->wc_options_serialized->wc_phrases['wc_vote_up'];
|
62 |
+
$vote_down = $this->wc_options->wc_options_serialized->wc_phrases['wc_vote_down'];
|
63 |
}
|
64 |
|
65 |
$parent_comment = (!$comment->comment_parent && count($child_comments)) ? ' parnet_comment' : '';
|
66 |
|
67 |
$output = '<div id="wc-comm-' . $unique_id . '" class="' . $comment_wrapper_class . ' ' . $parent_comment . '">';
|
68 |
$output .= '<div class="wc-comment-left">' . $comm_author_avatar;
|
69 |
+
if (!$this->wc_options->wc_options_serialized->wc_author_titles_show_hide) {
|
70 |
$output .= '<div class="wc-comment-label">' . $author_title . '</div>';
|
71 |
}
|
72 |
$output .= '</div>';
|
74 |
$output .= '<div class="wc-comment-header"><div class="wc-comment-author">' . $comment->comment_author . '</div><div class="wc-comment-date">' . $posted_date . '</div><div style="clear:both"></div></div>';
|
75 |
$output .= '<div class="wc-comment-text">' . $comment_content . '</div>';
|
76 |
$output .= '<div class="wc-comment-footer">';
|
77 |
+
if (!$this->wc_options->wc_options_serialized->wc_voting_buttons_show_hide) {
|
78 |
$output .= '<div id="vote-count-' . $unique_id . '" class="wc-vote-result">' . $vote_count . '</div>';
|
79 |
$output .= '<span id="wc-up-' . $unique_id . '" class="wc-vote-link wc-up ' . $vote_cls . '" title="' . $vote_up . '">∧</span> | <span id="wc-down-' . $unique_id . '" class="wc-vote-link wc-down ' . $vote_cls . '" title="' . $vote_down . '">∨</span> ';
|
80 |
}
|
84 |
}
|
85 |
|
86 |
|
87 |
+
if (!$this->wc_options->wc_options_serialized->wc_share_buttons_show_hide) {
|
88 |
$output .= '- <span id="wc-comm-share-' . $unique_id . '" class="wc-share-link" title="' . $share_text . '">' . $share_text . '</span> ';
|
89 |
|
90 |
$twitt_content = $comment_content . ' ' . get_comment_link($comment);
|
91 |
|
92 |
$output .= '<span id="share_buttons_box-' . $unique_id . '" class="share_buttons_box">';
|
93 |
+
$output .= '<a target="_blank" href="http://www.facebook.com/sharer.php" title="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_share_facebook'] . '"><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/social-icons/fb-18x18.png') . '"/></a> ';
|
94 |
+
$output .= '<a target="_blank" href="https://twitter.com/home?status=' . $twitt_content . '" title="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_share_twitter'] . '"><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/social-icons/twitter-18x18.png') . '"/></a> ';
|
95 |
+
$output .= '<a target="_blank" href="https://plus.google.com/share?url=' . get_permalink($comment->comment_post_ID) . '" title="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_share_google'] . '"><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/social-icons/google-18x18.png') . '"/></a> ';
|
96 |
$output .= '</span>';
|
97 |
}
|
98 |
|
105 |
$visibility = 'none';
|
106 |
if (!$comment->comment_parent && count($child_comments)) {
|
107 |
$visibility = 'block';
|
108 |
+
$output .= '<span id="wc-toggle-' . $unique_id . '" class="wc-toggle" style="display:' . $visibility . ';">' . $this->wc_options->wc_options_serialized->wc_phrases['wc_hide_replies_text'] . ' ∧</span>';
|
109 |
}
|
110 |
|
111 |
$output .= '</div>';
|
120 |
$output .= '<div id="wc-form-footer-' . $unique_id . '" class="wc-form-footer">';
|
121 |
|
122 |
if (!is_user_logged_in()) {
|
123 |
+
$output .= '<div class="wc-author-data"><div class="wc-field-name item"><input id="wc_name-' . $unique_id . '" name="wc_name" class="wc_name" required="required" value="" type="text" placeholder="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_name_text'] . '"/></div><div class="wc-field-email item"><input id="wc_email-' . $unique_id . '" class="wc_email email" name="wc_email" required="required" value="" type="email" placeholder="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_email_text'] . '"/></div><div style="clear:both"></div></div>';
|
124 |
}
|
125 |
|
126 |
$output .= '<div class="wc-form-submit">';
|
127 |
|
128 |
+
if (!$this->wc_options->wc_options_serialized->wc_captcha_show_hide) {
|
129 |
if (!is_user_logged_in()) {
|
130 |
+
$output .= '<div class="wc-field-captcha item"><input id="wc_captcha-' . $unique_id . '" name="wc_captcha" required="required" value="" type="text" /><span class="wc-label wc-captcha-label"><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/captcha/captcha.php?comm_id=' . $comment->comment_post_ID . '-' . $comment->comment_ID) . '" id="wc_captcha_img-' . $unique_id . '" /><img src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/refresh-16x16.png') . '" id="wc_captcha_refresh_img-' . $unique_id . '" class="wc_captcha_refresh_img" /></span><span class="captcha_msg">' . $this->wc_options->wc_options_serialized->wc_phrases['wc_captcha_text'] . '</span></div>';
|
131 |
}
|
132 |
}
|
133 |
|
134 |
+
$output .= '<div class="wc-field-submit"><input type="button" name="submit" value="' . $this->wc_options->wc_options_serialized->wc_phrases['wc_submit_text'] . '" id="wc_comm-' . $unique_id . '" class="wc_comm_submit button alt"/>
|
|
|
135 |
</div>';
|
136 |
$output .= '<div style="clear:both"></div>';
|
137 |
$output .= '</div>';
|
149 |
|
150 |
public function is_guest_can_reply() {
|
151 |
$user_can_comment = TRUE;
|
152 |
+
if (!$this->wc_options->wc_options_serialized->wc_user_must_be_registered) {
|
153 |
+
if ($this->wc_options->wc_options_serialized->wc_reply_button_guests_show_hide) {
|
154 |
if (!is_user_logged_in()) {
|
155 |
$user_can_comment = FALSE;
|
156 |
}
|
165 |
|
166 |
public function is_customer_can_reply() {
|
167 |
$user_can_comment = TRUE;
|
168 |
+
if ($this->wc_options->wc_options_serialized->wc_reply_button_members_show_hide) {
|
169 |
$user_can_comment = $this->is_user_can_reply_by_role('customer');
|
170 |
}
|
171 |
return $user_can_comment;
|
192 |
public function get_textarea_placeholder($comment) {
|
193 |
$post = get_post($comment->comment_post_ID);
|
194 |
if ($post->comment_count) {
|
195 |
+
$textarea_placeholder = $this->wc_options->wc_options_serialized->wc_phrases['wc_comment_join_text'];
|
196 |
} else {
|
197 |
+
$textarea_placeholder = $this->wc_options->wc_options_serialized->wc_phrases['wc_comment_start_text'];
|
198 |
}
|
199 |
return $textarea_placeholder;
|
200 |
}
|
files/img/plugin-icon/logo.png
ADDED
Binary file
|
files/img/plugin-icon/plugin-icon-20.png
CHANGED
Binary file
|
files/img/plugin-icon/plugin-icon-48.png
CHANGED
Binary file
|
options-templates/options-template-main.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<th colspan="
|
2 |
|
3 |
<tr valign="top">
|
4 |
<th scope="row">
|
@@ -12,7 +12,7 @@
|
|
12 |
}
|
13 |
?>
|
14 |
<label for="<?php echo $post_type ?>">
|
15 |
-
<input type="checkbox" <?php checked(in_array($post_type, $this->
|
16 |
<span><?php echo $post_type; ?></span>
|
17 |
</label><br/>
|
18 |
<?php
|
@@ -28,7 +28,7 @@
|
|
28 |
</th>
|
29 |
<td colspan="3">
|
30 |
<label for="wc_voting_buttons_show_hide">
|
31 |
-
<input type="checkbox" <?php checked($this->
|
32 |
</label>
|
33 |
</td>
|
34 |
</tr>
|
@@ -39,7 +39,7 @@
|
|
39 |
</th>
|
40 |
<td colspan="3">
|
41 |
<label for="wc_share_buttons_show_hide">
|
42 |
-
<input type="checkbox" <?php checked($this->
|
43 |
</label>
|
44 |
</td>
|
45 |
</tr>
|
@@ -50,7 +50,7 @@
|
|
50 |
</th>
|
51 |
<td colspan="3">
|
52 |
<label for="wc_captcha_show_hide">
|
53 |
-
<input type="checkbox" <?php checked($this->
|
54 |
</label>
|
55 |
</td>
|
56 |
</tr>
|
@@ -62,11 +62,11 @@
|
|
62 |
<td colspan="3">
|
63 |
<fieldset>
|
64 |
<label title="Yes">
|
65 |
-
<input type="radio" value="1" <?php checked('1' == $this->
|
66 |
<span>Yes</span>
|
67 |
</label>
|
68 |
<label title="No">
|
69 |
-
<input type="radio" value="0" <?php checked('0' == $this->
|
70 |
<span>No</span>
|
71 |
</label><br>
|
72 |
</fieldset>
|
@@ -79,7 +79,7 @@
|
|
79 |
</th>
|
80 |
<td colspan="3">
|
81 |
<label for="wc_held_comment_to_moderate">
|
82 |
-
<input type="checkbox" <?php checked($this->
|
83 |
</label>
|
84 |
</td>
|
85 |
</tr>
|
@@ -90,7 +90,7 @@
|
|
90 |
</th>
|
91 |
<td colspan="3">
|
92 |
<label for="wc_reply_button_guests_show_hide">
|
93 |
-
<input type="checkbox" <?php checked($this->
|
94 |
</label>
|
95 |
</td>
|
96 |
</tr>
|
@@ -101,7 +101,7 @@
|
|
101 |
</th>
|
102 |
<td colspan="3">
|
103 |
<label for="wc_reply_button_members_show_hide">
|
104 |
-
<input type="checkbox" <?php checked($this->
|
105 |
</label>
|
106 |
</td>
|
107 |
</tr>
|
@@ -112,7 +112,7 @@
|
|
112 |
</th>
|
113 |
<td colspan="3">
|
114 |
<label for="wc_author_titles_show_hide">
|
115 |
-
<input type="checkbox" <?php checked($this->
|
116 |
</label>
|
117 |
</td>
|
118 |
</tr>
|
@@ -123,7 +123,7 @@
|
|
123 |
</th>
|
124 |
<td colspan="3">
|
125 |
<label for="wc_comment_count">
|
126 |
-
<input type="number" value="<?php echo $this->
|
127 |
</label><br/>
|
128 |
</td>
|
129 |
</tr>
|
@@ -134,7 +134,7 @@
|
|
134 |
</th>
|
135 |
<td colspan="3">
|
136 |
<label for="wc_notify_moderator">
|
137 |
-
<input type="checkbox" <?php checked($this->
|
138 |
</label>
|
139 |
</td>
|
140 |
</tr>
|
@@ -145,7 +145,7 @@
|
|
145 |
</th>
|
146 |
<td colspan="3">
|
147 |
<label for="wc_notify_comment_author">
|
148 |
-
<input type="checkbox" <?php checked($this->
|
149 |
</label>
|
150 |
</td>
|
151 |
</tr>
|
@@ -155,7 +155,7 @@
|
|
155 |
<label for="wc_comment_bg_color"><?php _e('Comment Background Color', 'wpdiscuz'); ?></label>
|
156 |
</th>
|
157 |
<td width="1">
|
158 |
-
<input type="text" class="regular-text" value="<?php echo $this->
|
159 |
</td>
|
160 |
|
161 |
<td class="picker_img_cell">
|
@@ -179,7 +179,7 @@
|
|
179 |
<label for="wc_reply_bg_color"><?php _e('Reply Background Color', 'wpdiscuz'); ?></label>
|
180 |
</th>
|
181 |
<td>
|
182 |
-
<input type="text" class="regular-text" value="<?php echo $this->
|
183 |
</td>
|
184 |
|
185 |
<td class="picker_img_cell">
|
@@ -203,7 +203,7 @@
|
|
203 |
<label for="wc_comment_text_color"><?php _e('Comment Text Color', 'wpdiscuz'); ?></label>
|
204 |
</th>
|
205 |
<td>
|
206 |
-
<input type="text" class="regular-text" value="<?php echo $this->
|
207 |
</td>
|
208 |
|
209 |
<td class="picker_img_cell">
|
@@ -228,7 +228,7 @@
|
|
228 |
<label for="wc_author_title_color"><?php _e('Author title color', 'wpdiscuz'); ?></label>
|
229 |
</th>
|
230 |
<td>
|
231 |
-
<input type="text" class="regular-text" value="<?php echo $this->
|
232 |
</td>
|
233 |
|
234 |
<td class="picker_img_cell">
|
@@ -253,7 +253,7 @@
|
|
253 |
<label for="wc_vote_reply_color"><?php _e('Vote, Reply, Share, Edit links text colors', 'wpdiscuz'); ?></label>
|
254 |
</th>
|
255 |
<td>
|
256 |
-
<input type="text" class="regular-text" value="<?php echo $this->
|
257 |
</td>
|
258 |
|
259 |
<td class="picker_img_cell">
|
1 |
+
<th colspan="4" scope="col" style="margin-bottom: 5px;"><h2><?php _e('General settings', 'wpdiscuz'); ?></h2></th>
|
2 |
|
3 |
<tr valign="top">
|
4 |
<th scope="row">
|
12 |
}
|
13 |
?>
|
14 |
<label for="<?php echo $post_type ?>">
|
15 |
+
<input type="checkbox" <?php checked(in_array($post_type, $this->wc_options_serialized->wc_post_types)); ?> value="<?php echo $post_type; ?>" name="wc_post_types[]" id="wc_type_<?php echo $post_type; ?>" />
|
16 |
<span><?php echo $post_type; ?></span>
|
17 |
</label><br/>
|
18 |
<?php
|
28 |
</th>
|
29 |
<td colspan="3">
|
30 |
<label for="wc_voting_buttons_show_hide">
|
31 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_voting_buttons_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_voting_buttons_show_hide; ?>" name="wc_voting_buttons_show_hide" id="wc_voting_buttons_show_hide" />
|
32 |
</label>
|
33 |
</td>
|
34 |
</tr>
|
39 |
</th>
|
40 |
<td colspan="3">
|
41 |
<label for="wc_share_buttons_show_hide">
|
42 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_share_buttons_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_share_buttons_show_hide; ?>" name="wc_share_buttons_show_hide" id="wc_share_buttons_show_hide" />
|
43 |
</label>
|
44 |
</td>
|
45 |
</tr>
|
50 |
</th>
|
51 |
<td colspan="3">
|
52 |
<label for="wc_captcha_show_hide">
|
53 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_captcha_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_captcha_show_hide; ?>" name="wc_captcha_show_hide" id="wc_captcha_show_hide" />
|
54 |
</label>
|
55 |
</td>
|
56 |
</tr>
|
62 |
<td colspan="3">
|
63 |
<fieldset>
|
64 |
<label title="Yes">
|
65 |
+
<input type="radio" value="1" <?php checked('1' == $this->wc_options_serialized->wc_user_must_be_registered); ?> name="wc_user_must_be_registered" id="wc_user_must_be_registered_yes" />
|
66 |
<span>Yes</span>
|
67 |
</label>
|
68 |
<label title="No">
|
69 |
+
<input type="radio" value="0" <?php checked('0' == $this->wc_options_serialized->wc_user_must_be_registered); ?> name="wc_user_must_be_registered" id="wc_user_must_be_registered_no" />
|
70 |
<span>No</span>
|
71 |
</label><br>
|
72 |
</fieldset>
|
79 |
</th>
|
80 |
<td colspan="3">
|
81 |
<label for="wc_held_comment_to_moderate">
|
82 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_held_comment_to_moderate == 1) ?> value="<?php echo $this->wc_options_serialized->wc_held_comment_to_moderate; ?>" name="wc_held_comment_to_moderate" id="wc_held_comment_to_moderate" />
|
83 |
</label>
|
84 |
</td>
|
85 |
</tr>
|
90 |
</th>
|
91 |
<td colspan="3">
|
92 |
<label for="wc_reply_button_guests_show_hide">
|
93 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_reply_button_guests_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_reply_button_guests_show_hide; ?>" name="wc_reply_button_guests_show_hide" id="wc_reply_button_guests_show_hide" />
|
94 |
</label>
|
95 |
</td>
|
96 |
</tr>
|
101 |
</th>
|
102 |
<td colspan="3">
|
103 |
<label for="wc_reply_button_members_show_hide">
|
104 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_reply_button_members_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_reply_button_members_show_hide; ?>" name="wc_reply_button_members_show_hide" id="wc_reply_button_members_show_hide" />
|
105 |
</label>
|
106 |
</td>
|
107 |
</tr>
|
112 |
</th>
|
113 |
<td colspan="3">
|
114 |
<label for="wc_author_titles_show_hide">
|
115 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_author_titles_show_hide == 1) ?> value="<?php echo $this->wc_options_serialized->wc_author_titles_show_hide; ?>" name="wc_author_titles_show_hide" id="wc_author_titles_show_hide" />
|
116 |
</label>
|
117 |
</td>
|
118 |
</tr>
|
123 |
</th>
|
124 |
<td colspan="3">
|
125 |
<label for="wc_comment_count">
|
126 |
+
<input type="number" value="<?php echo $this->wc_options_serialized->wc_comment_count; ?>" name="wc_comment_count" id="wc_comment_count" />
|
127 |
</label><br/>
|
128 |
</td>
|
129 |
</tr>
|
134 |
</th>
|
135 |
<td colspan="3">
|
136 |
<label for="wc_notify_moderator">
|
137 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_notify_moderator == 1) ?> value="<?php echo $this->wc_options_serialized->wc_notify_moderator; ?>" name="wc_notify_moderator" id="wc_notify_moderator" />
|
138 |
</label>
|
139 |
</td>
|
140 |
</tr>
|
145 |
</th>
|
146 |
<td colspan="3">
|
147 |
<label for="wc_notify_comment_author">
|
148 |
+
<input type="checkbox" <?php checked($this->wc_options_serialized->wc_notify_comment_author == 1) ?> value="<?php echo $this->wc_options_serialized->wc_notify_comment_author; ?>" name="wc_notify_comment_author" id="wc_notify_comment_author" />
|
149 |
</label>
|
150 |
</td>
|
151 |
</tr>
|
155 |
<label for="wc_comment_bg_color"><?php _e('Comment Background Color', 'wpdiscuz'); ?></label>
|
156 |
</th>
|
157 |
<td width="1">
|
158 |
+
<input type="text" class="regular-text" value="<?php echo $this->wc_options_serialized->wc_comment_bg_color; ?>" id="wc_comment_bg_color" name="wc_comment_bg_color" placeholder="<?php _e('Example: #00ff00', 'wpdiscuz'); ?>"/>
|
159 |
</td>
|
160 |
|
161 |
<td class="picker_img_cell">
|
179 |
<label for="wc_reply_bg_color"><?php _e('Reply Background Color', 'wpdiscuz'); ?></label>
|
180 |
</th>
|
181 |
<td>
|
182 |
+
<input type="text" class="regular-text" value="<?php echo $this->wc_options_serialized->wc_reply_bg_color; ?>" id="wc_reply_bg_color" name="wc_reply_bg_color" placeholder="<?php _e('Example: #00ff00', 'wpdiscuz'); ?>"/>
|
183 |
</td>
|
184 |
|
185 |
<td class="picker_img_cell">
|
203 |
<label for="wc_comment_text_color"><?php _e('Comment Text Color', 'wpdiscuz'); ?></label>
|
204 |
</th>
|
205 |
<td>
|
206 |
+
<input type="text" class="regular-text" value="<?php echo $this->wc_options_serialized->wc_comment_text_color; ?>" id="wc_comment_text_color" name="wc_comment_text_color" placeholder="<?php _e('Example: #00ff00', 'wpdiscuz'); ?>"/>
|
207 |
</td>
|
208 |
|
209 |
<td class="picker_img_cell">
|
228 |
<label for="wc_author_title_color"><?php _e('Author title color', 'wpdiscuz'); ?></label>
|
229 |
</th>
|
230 |
<td>
|
231 |
+
<input type="text" class="regular-text" value="<?php echo $this->wc_options_serialized->wc_author_title_color; ?>" id="wc_author_title_color" name="wc_author_title_color" placeholder="<?php _e('Example: #00ff00', 'wpdiscuz'); ?>"/>
|
232 |
</td>
|
233 |
|
234 |
<td class="picker_img_cell">
|
253 |
<label for="wc_vote_reply_color"><?php _e('Vote, Reply, Share, Edit links text colors', 'wpdiscuz'); ?></label>
|
254 |
</th>
|
255 |
<td>
|
256 |
+
<input type="text" class="regular-text" value="<?php echo $this->wc_options_serialized->wc_vote_reply_color; ?>" id="wc_vote_reply_color" name="wc_vote_reply_color" placeholder="<?php _e('Example: #00ff00', 'wpdiscuz'); ?>"/>
|
257 |
</td>
|
258 |
|
259 |
<td class="picker_img_cell">
|
options-templates/options-template-phrases.php
CHANGED
@@ -1,515 +1,537 @@
|
|
1 |
-
<th colspan="3" scope="col" style="margin-bottom: 5px;"><h2><?php _e('Front-end phrases', 'wpdiscuz'); ?></h2></th>
|
2 |
-
|
3 |
-
<tr valign="top">
|
4 |
-
<th scope="row">
|
5 |
-
<?php _e('
|
6 |
-
</th>
|
7 |
-
<td colspan="3">
|
8 |
-
<label for="
|
9 |
-
<input type="text" value="<?php echo $this->
|
10 |
-
</label>
|
11 |
-
</td>
|
12 |
-
</tr>
|
13 |
-
|
14 |
-
<tr valign="top">
|
15 |
-
<th scope="row">
|
16 |
-
<?php _e('
|
17 |
-
</th>
|
18 |
-
<td colspan="3">
|
19 |
-
<label for="
|
20 |
-
<input type="text" value="<?php echo $this->
|
21 |
-
</label>
|
22 |
-
</td>
|
23 |
-
</tr>
|
24 |
-
|
25 |
-
<tr valign="top">
|
26 |
-
<th scope="row">
|
27 |
-
<?php _e('Comment
|
28 |
-
</th>
|
29 |
-
<td colspan="3">
|
30 |
-
<label for="
|
31 |
-
<input type="text" value="<?php echo $this->
|
32 |
-
</label>
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
|
36 |
-
<tr valign="top">
|
37 |
-
<th scope="row">
|
38 |
-
<?php _e('
|
39 |
-
</th>
|
40 |
-
<td colspan="3">
|
41 |
-
<label for="
|
42 |
-
<input type="text" value="<?php echo $this->
|
43 |
-
</label>
|
44 |
-
</td>
|
45 |
-
</tr>
|
46 |
-
|
47 |
-
<tr valign="top">
|
48 |
-
<th scope="row">
|
49 |
-
<?php _e('
|
50 |
-
</th>
|
51 |
-
<td colspan="3">
|
52 |
-
<label for="
|
53 |
-
<input type="text" value="<?php echo $this->
|
54 |
-
</label>
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
|
58 |
-
<tr valign="top">
|
59 |
-
<th scope="row">
|
60 |
-
<?php _e('
|
61 |
-
</th>
|
62 |
-
<td colspan="3">
|
63 |
-
<label for="
|
64 |
-
<input type="text" value="<?php echo $this->
|
65 |
-
</label>
|
66 |
-
</td>
|
67 |
-
</tr>
|
68 |
-
|
69 |
-
<tr valign="top">
|
70 |
-
<th scope="row">
|
71 |
-
<?php _e('
|
72 |
-
</th>
|
73 |
-
<td colspan="3">
|
74 |
-
<label for="
|
75 |
-
<input type="text" value="<?php echo $this->
|
76 |
-
</label>
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
|
80 |
-
<tr valign="top">
|
81 |
-
<th scope="row">
|
82 |
-
<?php _e('
|
83 |
-
</th>
|
84 |
-
<td colspan="3">
|
85 |
-
<label for="
|
86 |
-
<input type="text" value="<?php echo $this->
|
87 |
-
</label>
|
88 |
-
</td>
|
89 |
-
</tr>
|
90 |
-
|
91 |
-
<tr valign="top">
|
92 |
-
<th scope="row">
|
93 |
-
<?php _e('
|
94 |
-
</th>
|
95 |
-
<td colspan="3">
|
96 |
-
<label for="
|
97 |
-
<input type="text" value="<?php echo $this->
|
98 |
-
</label>
|
99 |
-
</td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr valign="top">
|
103 |
-
<th scope="row">
|
104 |
-
<?php _e('
|
105 |
-
</th>
|
106 |
-
<td colspan="3">
|
107 |
-
<label for="
|
108 |
-
<input type="text" value="<?php echo $this->
|
109 |
-
</label>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
|
113 |
-
<tr valign="top">
|
114 |
-
<th scope="row">
|
115 |
-
<?php _e('
|
116 |
-
</th>
|
117 |
-
<td colspan="3">
|
118 |
-
<label for="
|
119 |
-
<input type="text" value="<?php echo $this->
|
120 |
-
</label>
|
121 |
-
</td>
|
122 |
-
</tr>
|
123 |
-
|
124 |
-
<tr valign="top">
|
125 |
-
<th scope="row">
|
126 |
-
<?php _e('
|
127 |
-
</th>
|
128 |
-
<td colspan="3">
|
129 |
-
<label for="
|
130 |
-
<input type="text" value="<?php echo $this->
|
131 |
-
</label>
|
132 |
-
</td>
|
133 |
-
</tr>
|
134 |
-
|
135 |
-
<tr valign="top"
|
136 |
-
<th scope="row">
|
137 |
-
<?php _e('Share
|
138 |
-
</th>
|
139 |
-
<td colspan="3">
|
140 |
-
<label for="
|
141 |
-
<input type="text" value="<?php echo $this->
|
142 |
-
</label>
|
143 |
-
</td>
|
144 |
-
</tr>
|
145 |
-
|
146 |
-
<tr valign="top">
|
147 |
-
<th scope="row">
|
148 |
-
<?php _e('Share On
|
149 |
-
</th>
|
150 |
-
<td colspan="3">
|
151 |
-
<label for="
|
152 |
-
<input type="text" value="<?php echo $this->
|
153 |
-
</label>
|
154 |
-
</td>
|
155 |
-
</tr>
|
156 |
-
|
157 |
-
<tr valign="top" >
|
158 |
-
<th scope="row">
|
159 |
-
<?php _e('
|
160 |
-
</th>
|
161 |
-
<td colspan="3">
|
162 |
-
<label for="
|
163 |
-
<input type="text" value="<?php echo $this->
|
164 |
-
</label>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
|
168 |
-
<tr valign="top">
|
169 |
-
<th scope="row">
|
170 |
-
<?php _e('
|
171 |
-
</th>
|
172 |
-
<td colspan="3">
|
173 |
-
<label for="
|
174 |
-
<input type="text" value="<?php echo $this->
|
175 |
-
</label>
|
176 |
-
</td>
|
177 |
-
</tr>
|
178 |
-
|
179 |
-
<tr valign="top">
|
180 |
-
<th scope="row">
|
181 |
-
<?php _e('
|
182 |
-
</th>
|
183 |
-
<td colspan="3">
|
184 |
-
<label for="
|
185 |
-
<input type="text" value="<?php echo $this->
|
186 |
-
</label>
|
187 |
-
</td>
|
188 |
-
</tr>
|
189 |
-
|
190 |
-
<tr valign="top">
|
191 |
-
<th scope="row">
|
192 |
-
<?php _e('
|
193 |
-
</th>
|
194 |
-
<td colspan="3">
|
195 |
-
<label for="
|
196 |
-
<input type="text" value="<?php echo $this->
|
197 |
-
</label>
|
198 |
-
</td>
|
199 |
-
</tr>
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
<
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
<
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
<
|
232 |
-
|
233 |
-
|
234 |
-
</
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
</
|
241 |
-
|
242 |
-
<
|
243 |
-
|
244 |
-
|
245 |
-
</
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<tr valign="top">
|
254 |
-
<th scope="row">
|
255 |
-
<?php _e('
|
256 |
-
</th>
|
257 |
-
<td colspan="3">
|
258 |
-
<label for="
|
259 |
-
<input type="text" value="<?php echo $this->
|
260 |
-
</label>
|
261 |
-
</td>
|
262 |
-
</tr>
|
263 |
-
|
264 |
-
<tr valign="top">
|
265 |
-
<th scope="row">
|
266 |
-
<?php _e('
|
267 |
-
</th>
|
268 |
-
<td colspan="3">
|
269 |
-
<label for="
|
270 |
-
<
|
271 |
-
</label>
|
272 |
-
</td>
|
273 |
-
</tr>
|
274 |
-
|
275 |
-
<tr valign="top">
|
276 |
-
<th scope="row">
|
277 |
-
<?php _e('
|
278 |
-
</th>
|
279 |
-
<td colspan="3">
|
280 |
-
<label for="
|
281 |
-
<input type="text" value="<?php echo $this->
|
282 |
-
</label>
|
283 |
-
</td>
|
284 |
-
</tr>
|
285 |
-
|
286 |
-
<tr valign="top">
|
287 |
-
<th scope="row">
|
288 |
-
<?php _e('
|
289 |
-
</th>
|
290 |
-
<td colspan="3">
|
291 |
-
<label for="
|
292 |
-
<input type="text" value="<?php echo $this->
|
293 |
-
</label>
|
294 |
-
</td>
|
295 |
-
</tr>
|
296 |
-
|
297 |
-
<tr valign="top">
|
298 |
-
<th scope="row">
|
299 |
-
<?php _e('
|
300 |
-
</th>
|
301 |
-
<td colspan="3">
|
302 |
-
<label for="
|
303 |
-
<input type="text" value="<?php echo $this->
|
304 |
-
</label>
|
305 |
-
</td>
|
306 |
-
</tr>
|
307 |
-
|
308 |
-
<tr valign="top">
|
309 |
-
<th scope="row">
|
310 |
-
<?php _e('
|
311 |
-
</th>
|
312 |
-
<td colspan="3">
|
313 |
-
<label for="
|
314 |
-
<input type="text" value="<?php echo $this->
|
315 |
-
</label>
|
316 |
-
</td>
|
317 |
-
</tr>
|
318 |
-
|
319 |
-
<tr valign="top">
|
320 |
-
<th scope="row">
|
321 |
-
<?php _e('
|
322 |
-
</th>
|
323 |
-
<td colspan="3">
|
324 |
-
<label for="
|
325 |
-
<input type="text" value="<?php echo $this->
|
326 |
-
</label>
|
327 |
-
</td>
|
328 |
-
</tr>
|
329 |
-
|
330 |
-
<tr valign="top">
|
331 |
-
<th scope="row">
|
332 |
-
<?php _e('
|
333 |
-
</th>
|
334 |
-
<td colspan="3">
|
335 |
-
<label for="
|
336 |
-
<input type="text" value="<?php echo $this->
|
337 |
-
</label>
|
338 |
-
</td>
|
339 |
-
</tr>
|
340 |
-
|
341 |
-
<tr valign="top">
|
342 |
-
<th scope="row">
|
343 |
-
<?php _e('
|
344 |
-
</th>
|
345 |
-
<td colspan="3">
|
346 |
-
<label for="
|
347 |
-
<input type="text" value="<?php echo $this->
|
348 |
-
</label>
|
349 |
-
</td>
|
350 |
-
</tr>
|
351 |
-
|
352 |
-
<tr valign="top">
|
353 |
-
<th scope="row">
|
354 |
-
<?php _e('
|
355 |
-
</th>
|
356 |
-
<td colspan="3">
|
357 |
-
<label for="
|
358 |
-
<input type="text" value="<?php echo $this->
|
359 |
-
</label>
|
360 |
-
</td>
|
361 |
-
</tr>
|
362 |
-
|
363 |
-
<tr valign="top">
|
364 |
-
<th scope="row">
|
365 |
-
<?php _e('
|
366 |
-
</th>
|
367 |
-
<td colspan="3">
|
368 |
-
<label for="
|
369 |
-
<input type="text" value="<?php echo $this->
|
370 |
-
</label>
|
371 |
-
</td>
|
372 |
-
</tr>
|
373 |
-
|
374 |
-
<tr valign="top">
|
375 |
-
<th scope="row">
|
376 |
-
<?php _e('
|
377 |
-
</th>
|
378 |
-
<td colspan="3">
|
379 |
-
<label for="
|
380 |
-
<input type="text" value="<?php echo $this->
|
381 |
-
</label>
|
382 |
-
</td>
|
383 |
-
</tr>
|
384 |
-
|
385 |
-
<tr valign="top">
|
386 |
-
<th scope="row">
|
387 |
-
<?php _e('
|
388 |
-
</th>
|
389 |
-
<td colspan="3">
|
390 |
-
<label for="
|
391 |
-
<input type="text" value="<?php echo $this->
|
392 |
-
</label>
|
393 |
-
</td>
|
394 |
-
</tr>
|
395 |
-
|
396 |
-
<tr valign="top">
|
397 |
-
<th scope="row">
|
398 |
-
<?php _e('
|
399 |
-
</th>
|
400 |
-
<td colspan="3">
|
401 |
-
<label for="
|
402 |
-
<input type="text" value="<?php echo $this->
|
403 |
-
</label>
|
404 |
-
</td>
|
405 |
-
</tr>
|
406 |
-
|
407 |
-
<tr valign="top">
|
408 |
-
<th scope="row">
|
409 |
-
<?php _e('
|
410 |
-
</th>
|
411 |
-
<td colspan="3">
|
412 |
-
<label for="
|
413 |
-
<input type="text" value="<?php echo $this->
|
414 |
-
</label>
|
415 |
-
</td>
|
416 |
-
</tr>
|
417 |
-
|
418 |
-
<tr valign="top">
|
419 |
-
<th scope="row">
|
420 |
-
<?php _e('
|
421 |
-
</th>
|
422 |
-
<td colspan="3">
|
423 |
-
<label for="
|
424 |
-
<input type="text" value="<?php echo $this->
|
425 |
-
</label>
|
426 |
-
</td>
|
427 |
-
</tr>
|
428 |
-
|
429 |
-
<tr valign="top">
|
430 |
-
<th scope="row">
|
431 |
-
<?php _e('Vote
|
432 |
-
</th>
|
433 |
-
<td colspan="3">
|
434 |
-
<label for="
|
435 |
-
<input type="text" value="<?php echo $this->
|
436 |
-
</label>
|
437 |
-
</td>
|
438 |
-
</tr>
|
439 |
-
|
440 |
-
<tr valign="top">
|
441 |
-
<th scope="row">
|
442 |
-
<?php _e('
|
443 |
-
</th>
|
444 |
-
<td colspan="3">
|
445 |
-
<label for="
|
446 |
-
<input type="text" value="<?php echo $this->
|
447 |
-
</label>
|
448 |
-
</td>
|
449 |
-
</tr>
|
450 |
-
|
451 |
-
<tr valign="top">
|
452 |
-
<th scope="row">
|
453 |
-
<?php _e('
|
454 |
-
</th>
|
455 |
-
<td colspan="3">
|
456 |
-
<label for="
|
457 |
-
<input type="text" value="<?php echo $this->
|
458 |
-
</label>
|
459 |
-
</td>
|
460 |
-
</tr>
|
461 |
-
|
462 |
-
<tr valign="top">
|
463 |
-
<th scope="row">
|
464 |
-
<?php _e('
|
465 |
-
</th>
|
466 |
-
<td colspan="3">
|
467 |
-
<label for="
|
468 |
-
<input type="text" value="<?php echo $this->
|
469 |
-
</label>
|
470 |
-
</td>
|
471 |
-
</tr>
|
472 |
-
|
473 |
-
<tr valign="top">
|
474 |
-
<th scope="row">
|
475 |
-
<?php _e('
|
476 |
-
</th>
|
477 |
-
<td colspan="3">
|
478 |
-
<label for="
|
479 |
-
<input type="text" value="<?php echo $this->
|
480 |
-
</label>
|
481 |
-
</td>
|
482 |
-
</tr>
|
483 |
-
|
484 |
-
<tr valign="top">
|
485 |
-
<th scope="row">
|
486 |
-
<?php _e('
|
487 |
-
</th>
|
488 |
-
<td colspan="3">
|
489 |
-
<label for="
|
490 |
-
<input type="text" value="<?php echo $this->
|
491 |
-
</label>
|
492 |
-
</td>
|
493 |
-
</tr>
|
494 |
-
|
495 |
-
<tr valign="top">
|
496 |
-
<th scope="row">
|
497 |
-
<?php _e('
|
498 |
-
</th>
|
499 |
-
<td colspan="3">
|
500 |
-
<label for="
|
501 |
-
<input type="text" value="<?php echo $this->
|
502 |
-
</label>
|
503 |
-
</td>
|
504 |
-
</tr>
|
505 |
-
|
506 |
-
<tr valign="top">
|
507 |
-
<th scope="row">
|
508 |
-
<?php _e('
|
509 |
-
</th>
|
510 |
-
<td colspan="3">
|
511 |
-
<label for="
|
512 |
-
<input type="text" value="<?php echo $this->
|
513 |
-
</label>
|
514 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
</tr>
|
1 |
+
<th colspan="3" scope="col" style="margin-bottom: 5px;"><h2><?php _e('Front-end phrases', 'wpdiscuz'); ?></h2></th>
|
2 |
+
|
3 |
+
<tr valign="top">
|
4 |
+
<th scope="row">
|
5 |
+
<?php _e('Leave a Reply', 'wpdiscuz'); ?>
|
6 |
+
</th>
|
7 |
+
<td colspan="3">
|
8 |
+
<label for="wc_leave_a_reply_text">
|
9 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_leave_a_reply_text']; ?>" name="wc_leave_a_reply_text" id="wc_leave_a_reply_text" />
|
10 |
+
</label>
|
11 |
+
</td>
|
12 |
+
</tr>
|
13 |
+
|
14 |
+
<tr valign="top">
|
15 |
+
<th scope="row">
|
16 |
+
<?php _e('Be the first to comment', 'wpdiscuz'); ?>
|
17 |
+
</th>
|
18 |
+
<td colspan="3">
|
19 |
+
<label for="wc_be_the_first_text">
|
20 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_be_the_first_text']; ?>" name="wc_be_the_first_text" id="wc_be_the_first_text" />
|
21 |
+
</label>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
|
25 |
+
<tr valign="top">
|
26 |
+
<th scope="row">
|
27 |
+
<?php _e('Comment', 'wpdiscuz'); ?>
|
28 |
+
</th>
|
29 |
+
<td colspan="3">
|
30 |
+
<label for="wc_header_text">
|
31 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_header_text']; ?>" name="wc_header_text" id="wc_header_text" />
|
32 |
+
</label>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
|
36 |
+
<tr valign="top">
|
37 |
+
<th scope="row">
|
38 |
+
<?php _e('On', 'wpdiscuz'); ?>
|
39 |
+
</th>
|
40 |
+
<td colspan="3">
|
41 |
+
<label for="wc_header_on_text">
|
42 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_header_on_text']; ?>" name="wc_header_on_text" id="wc_header_on_text" />
|
43 |
+
</label>
|
44 |
+
</td>
|
45 |
+
</tr>
|
46 |
+
|
47 |
+
<tr valign="top">
|
48 |
+
<th scope="row">
|
49 |
+
<?php _e('Comment Field Start', 'wpdiscuz'); ?>
|
50 |
+
</th>
|
51 |
+
<td colspan="3">
|
52 |
+
<label for="wc_comment_start_text">
|
53 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_comment_start_text']; ?>" name="wc_comment_start_text" id="wc_comment_start_text" />
|
54 |
+
</label>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
|
58 |
+
<tr valign="top">
|
59 |
+
<th scope="row">
|
60 |
+
<?php _e('Comment Field Join', 'wpdiscuz'); ?>
|
61 |
+
</th>
|
62 |
+
<td colspan="3">
|
63 |
+
<label for="wc_comment_join_text">
|
64 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_comment_join_text']; ?>" name="wc_comment_join_text" id="wc_comment_join_text" />
|
65 |
+
</label>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
|
69 |
+
<tr valign="top">
|
70 |
+
<th scope="row">
|
71 |
+
<?php _e('Email Field', 'wpdiscuz'); ?>
|
72 |
+
</th>
|
73 |
+
<td colspan="3">
|
74 |
+
<label for="wc_email_text">
|
75 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_email_text']; ?>" name="wc_email_text" id="wc_email_text" />
|
76 |
+
</label>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
|
80 |
+
<tr valign="top">
|
81 |
+
<th scope="row">
|
82 |
+
<?php _e('Name Field', 'wpdiscuz'); ?>
|
83 |
+
</th>
|
84 |
+
<td colspan="3">
|
85 |
+
<label for="wc_name_text">
|
86 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_name_text']; ?>" name="wc_name_text" id="wc_email_text" />
|
87 |
+
</label>
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
|
91 |
+
<tr valign="top">
|
92 |
+
<th scope="row">
|
93 |
+
<?php _e('CAPTCHA Field', 'wpdiscuz'); ?>
|
94 |
+
</th>
|
95 |
+
<td colspan="3">
|
96 |
+
<label for="wc_captcha_text">
|
97 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_captcha_text']; ?>" name="wc_captcha_text" id="wc_email_text" />
|
98 |
+
</label>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr valign="top">
|
103 |
+
<th scope="row">
|
104 |
+
<?php _e('Submit Button', 'wpdiscuz'); ?>
|
105 |
+
</th>
|
106 |
+
<td colspan="3">
|
107 |
+
<label for="wc_submit_text">
|
108 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_submit_text']; ?>" name="wc_submit_text" id="wc_submit_text" />
|
109 |
+
</label>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
|
113 |
+
<tr valign="top">
|
114 |
+
<th scope="row">
|
115 |
+
<?php _e('Load More Button', 'wpdiscuz'); ?>
|
116 |
+
</th>
|
117 |
+
<td colspan="3">
|
118 |
+
<label for="wc_load_more_submit_text">
|
119 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_load_more_submit_text']; ?>" name="wc_load_more_submit_text" id="wc_load_more_submit_text" />
|
120 |
+
</label>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
|
124 |
+
<tr valign="top">
|
125 |
+
<th scope="row">
|
126 |
+
<?php _e('Reply', 'wpdiscuz'); ?>
|
127 |
+
</th>
|
128 |
+
<td colspan="3">
|
129 |
+
<label for="wc_reply_text">
|
130 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_reply_text']; ?>" name="wc_reply_text" id="wc_submit_text" />
|
131 |
+
</label>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
+
|
135 |
+
<tr valign="top">
|
136 |
+
<th scope="row">
|
137 |
+
<?php _e('Share', 'wpdiscuz'); ?>
|
138 |
+
</th>
|
139 |
+
<td colspan="3">
|
140 |
+
<label for="wc_share_text">
|
141 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_share_text']; ?>" name="wc_share_text" id="wc_share_text" />
|
142 |
+
</label>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
|
146 |
+
<tr valign="top">
|
147 |
+
<th scope="row">
|
148 |
+
<?php _e('Share On Facebook', 'wpdiscuz'); ?>
|
149 |
+
</th>
|
150 |
+
<td colspan="3">
|
151 |
+
<label for="wc_share_facebook">
|
152 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_share_facebook']; ?>" name="wc_share_facebook" id="wc_share_facebook" />
|
153 |
+
</label>
|
154 |
+
</td>
|
155 |
+
</tr>
|
156 |
+
|
157 |
+
<tr valign="top" >
|
158 |
+
<th scope="row">
|
159 |
+
<?php _e('Share On Twitter', 'wpdiscuz'); ?>
|
160 |
+
</th>
|
161 |
+
<td colspan="3">
|
162 |
+
<label for="wc_share_twitter">
|
163 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_share_twitter']; ?>" name="wc_share_twitter" id="wc_share_twitter" />
|
164 |
+
</label>
|
165 |
+
</td>
|
166 |
+
</tr>
|
167 |
+
|
168 |
+
<tr valign="top">
|
169 |
+
<th scope="row">
|
170 |
+
<?php _e('Share On Google', 'wpdiscuz'); ?>
|
171 |
+
</th>
|
172 |
+
<td colspan="3">
|
173 |
+
<label for="wc_share_google">
|
174 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_share_google']; ?>" name="wc_share_google" id="wc_share_google" />
|
175 |
+
</label>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
|
179 |
+
<tr valign="top" >
|
180 |
+
<th scope="row">
|
181 |
+
<?php _e('Hide Replies', 'wpdiscuz'); ?>
|
182 |
+
</th>
|
183 |
+
<td colspan="3">
|
184 |
+
<label for="wc_hide_replies_text">
|
185 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_hide_replies_text']; ?>" name="wc_hide_replies_text" id="wc_hide_replies_text" />
|
186 |
+
</label>
|
187 |
+
</td>
|
188 |
+
</tr>
|
189 |
+
|
190 |
+
<tr valign="top">
|
191 |
+
<th scope="row">
|
192 |
+
<?php _e('Show Replies', 'wpdiscuz'); ?>
|
193 |
+
</th>
|
194 |
+
<td colspan="3">
|
195 |
+
<label for="wc_show_replies_text">
|
196 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_show_replies_text']; ?>" name="wc_show_replies_text" id="wc_show_replies_text" />
|
197 |
+
</label>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
|
201 |
+
<tr valign="top">
|
202 |
+
<th scope="row">
|
203 |
+
<?php _e('Title For Guests', 'wpdiscuz'); ?>
|
204 |
+
</th>
|
205 |
+
<td colspan="3">
|
206 |
+
<label for="wc_user_title_guest_text">
|
207 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_user_title_guest_text']; ?>" name="wc_user_title_guest_text" id="wc_user_title_guest_text" />
|
208 |
+
</label>
|
209 |
+
</td>
|
210 |
+
</tr>
|
211 |
+
|
212 |
+
<tr valign="top">
|
213 |
+
<th scope="row">
|
214 |
+
<?php _e('Title For Members', 'wpdiscuz'); ?>
|
215 |
+
</th>
|
216 |
+
<td colspan="3">
|
217 |
+
<label for="wc_user_title_member_text">
|
218 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_user_title_member_text']; ?>" name="wc_user_title_member_text" id="wc_user_title_member_text" />
|
219 |
+
</label>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
<tr valign="top">
|
227 |
+
<th scope="row">
|
228 |
+
<?php _e('Title For Authors', 'wpdiscuz'); ?>
|
229 |
+
</th>
|
230 |
+
<td colspan="3">
|
231 |
+
<label for="wc_user_title_author_text">
|
232 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_user_title_author_text']; ?>" name="wc_user_title_author_text" id="wc_user_title_author_text" />
|
233 |
+
</label>
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
|
237 |
+
<tr valign="top">
|
238 |
+
<th scope="row">
|
239 |
+
<?php _e('Title For Admins', 'wpdiscuz'); ?>
|
240 |
+
</th>
|
241 |
+
<td colspan="3">
|
242 |
+
<label for="wc_user_title_admin_text">
|
243 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_user_title_admin_text']; ?>" name="wc_user_title_admin_text" id="wc_user_title_admin_text" />
|
244 |
+
</label>
|
245 |
+
</td>
|
246 |
+
</tr>
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
|
251 |
+
|
252 |
+
|
253 |
+
<tr valign="top">
|
254 |
+
<th scope="row">
|
255 |
+
<?php _e('Email Subject', 'wpdiscuz'); ?>
|
256 |
+
</th>
|
257 |
+
<td colspan="3">
|
258 |
+
<label for="wc_email_subject">
|
259 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_email_subject']; ?>" name="wc_email_subject" id="wc_email_subject" />
|
260 |
+
</label>
|
261 |
+
</td>
|
262 |
+
</tr>
|
263 |
+
|
264 |
+
<tr valign="top">
|
265 |
+
<th scope="row">
|
266 |
+
<?php _e('Email Message', 'wpdiscuz'); ?>
|
267 |
+
</th>
|
268 |
+
<td colspan="3">
|
269 |
+
<label for="wc_email_message">
|
270 |
+
<textarea name="wc_email_message" id="wc_email_message"><?php echo $this->wc_options_serialized->wc_phrases['wc_email_message']; ?></textarea>
|
271 |
+
</label>
|
272 |
+
</td>
|
273 |
+
</tr>
|
274 |
+
|
275 |
+
<tr valign="top">
|
276 |
+
<th scope="row">
|
277 |
+
<?php _e('Error message for empty field', 'wpdiscuz'); ?>
|
278 |
+
</th>
|
279 |
+
<td colspan="3">
|
280 |
+
<label for="wc_error_empty_text">
|
281 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_error_empty_text']; ?>" name="wc_error_empty_text" id="wc_error_empty_text" />
|
282 |
+
</label>
|
283 |
+
</td>
|
284 |
+
</tr>
|
285 |
+
|
286 |
+
<tr valign="top">
|
287 |
+
<th scope="row">
|
288 |
+
<?php _e('Error message for invalid email field', 'wpdiscuz'); ?>
|
289 |
+
</th>
|
290 |
+
<td colspan="3">
|
291 |
+
<label for="wc_error_email_text">
|
292 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_error_email_text']; ?>" name="wc_error_email_text" id="wc_error_email_text" />
|
293 |
+
</label>
|
294 |
+
</td>
|
295 |
+
</tr>
|
296 |
+
|
297 |
+
<tr valign="top">
|
298 |
+
<th scope="row">
|
299 |
+
<?php _e('Year', 'wpdiscuz'); ?>
|
300 |
+
</th>
|
301 |
+
<td colspan="3">
|
302 |
+
<label for="wc_year_text">
|
303 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_year_text']['datetime'][0]; ?>" name="wc_year_text" id="wc_year_text" />
|
304 |
+
</label>
|
305 |
+
</td>
|
306 |
+
</tr>
|
307 |
+
|
308 |
+
<tr valign="top">
|
309 |
+
<th scope="row">
|
310 |
+
<?php _e('Month', 'wpdiscuz'); ?>
|
311 |
+
</th>
|
312 |
+
<td colspan="3">
|
313 |
+
<label for="wc_month_text">
|
314 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_month_text']['datetime'][0]; ?>" name="wc_month_text" id="wc_month_text" />
|
315 |
+
</label>
|
316 |
+
</td>
|
317 |
+
</tr>
|
318 |
+
|
319 |
+
<tr valign="top">
|
320 |
+
<th scope="row">
|
321 |
+
<?php _e('Day', 'wpdiscuz'); ?>
|
322 |
+
</th>
|
323 |
+
<td colspan="3">
|
324 |
+
<label for="wc_day_text">
|
325 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_day_text']['datetime'][0]; ?>" name="wc_day_text" id="wc_day_text" />
|
326 |
+
</label>
|
327 |
+
</td>
|
328 |
+
</tr>
|
329 |
+
|
330 |
+
<tr valign="top">
|
331 |
+
<th scope="row">
|
332 |
+
<?php _e('Hour', 'wpdiscuz'); ?>
|
333 |
+
</th>
|
334 |
+
<td colspan="3">
|
335 |
+
<label for="wc_hour_text">
|
336 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_hour_text']['datetime'][0]; ?>" name="wc_hour_text" id="wc_hour_text" />
|
337 |
+
</label>
|
338 |
+
</td>
|
339 |
+
</tr>
|
340 |
+
|
341 |
+
<tr valign="top">
|
342 |
+
<th scope="row">
|
343 |
+
<?php _e('Minute', 'wpdiscuz'); ?>
|
344 |
+
</th>
|
345 |
+
<td colspan="3">
|
346 |
+
<label for="wc_minute_text">
|
347 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_minute_text']['datetime'][0]; ?>" name="wc_minute_text" id="wc_minute_text" />
|
348 |
+
</label>
|
349 |
+
</td>
|
350 |
+
</tr>
|
351 |
+
|
352 |
+
<tr valign="top">
|
353 |
+
<th scope="row">
|
354 |
+
<?php _e('Second', 'wpdiscuz'); ?>
|
355 |
+
</th>
|
356 |
+
<td colspan="3">
|
357 |
+
<label for="wc_second_text">
|
358 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_second_text']['datetime'][0]; ?>" name="wc_second_text" id="wc_second_text" />
|
359 |
+
</label>
|
360 |
+
</td>
|
361 |
+
</tr>
|
362 |
+
|
363 |
+
<tr valign="top">
|
364 |
+
<th scope="row">
|
365 |
+
<?php _e('Plural (Ex. user -> user + s)', 'wpdiscuz'); ?>
|
366 |
+
</th>
|
367 |
+
<td colspan="3">
|
368 |
+
<label for="wc_plural_text">
|
369 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_plural_text']; ?>" name="wc_plural_text" id="wc_plural_text" />
|
370 |
+
</label>
|
371 |
+
</td>
|
372 |
+
</tr>
|
373 |
+
|
374 |
+
<tr valign="top">
|
375 |
+
<th scope="row">
|
376 |
+
<?php _e('Commented "right now" text', 'wpdiscuz'); ?>
|
377 |
+
</th>
|
378 |
+
<td colspan="3">
|
379 |
+
<label for="wc_right_now_text">
|
380 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_right_now_text']; ?>" name="wc_right_now_text" id="wc_right_now_text" />
|
381 |
+
</label>
|
382 |
+
</td>
|
383 |
+
</tr>
|
384 |
+
|
385 |
+
<tr valign="top">
|
386 |
+
<th scope="row">
|
387 |
+
<?php _e('Ago text', 'wpdiscuz'); ?>
|
388 |
+
</th>
|
389 |
+
<td colspan="3">
|
390 |
+
<label for="wc_ago_text">
|
391 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_ago_text']; ?>" name="wc_ago_text" id="wc_ago_text" />
|
392 |
+
</label>
|
393 |
+
</td>
|
394 |
+
</tr>
|
395 |
+
|
396 |
+
<tr valign="top">
|
397 |
+
<th scope="row">
|
398 |
+
<?php _e('You must be', 'wpdiscuz'); ?>
|
399 |
+
</th>
|
400 |
+
<td colspan="3">
|
401 |
+
<label for="wc_you_must_be_text">
|
402 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_you_must_be_text']; ?>" name="wc_you_must_be_text" id="wc_you_must_be_text" />
|
403 |
+
</label>
|
404 |
+
</td>
|
405 |
+
</tr>
|
406 |
+
|
407 |
+
<tr valign="top">
|
408 |
+
<th scope="row">
|
409 |
+
<?php _e('Logged In', 'wpdiscuz'); ?>
|
410 |
+
</th>
|
411 |
+
<td colspan="3">
|
412 |
+
<label for="wc_logged_in_text">
|
413 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_logged_in_text']; ?>" name="wc_logged_in_text" id="wc_logged_in_text" />
|
414 |
+
</label>
|
415 |
+
</td>
|
416 |
+
</tr>
|
417 |
+
|
418 |
+
<tr valign="top">
|
419 |
+
<th scope="row">
|
420 |
+
<?php _e('To post a comment', 'wpdiscuz'); ?>
|
421 |
+
</th>
|
422 |
+
<td colspan="3">
|
423 |
+
<label for="wc_to_post_comment_text">
|
424 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_to_post_comment_text']; ?>" name="wc_to_post_comment_text" id="wc_to_post_comment_text" />
|
425 |
+
</label>
|
426 |
+
</td>
|
427 |
+
</tr>
|
428 |
+
|
429 |
+
<tr valign="top">
|
430 |
+
<th scope="row">
|
431 |
+
<?php _e('Vote Up', 'wpdiscuz'); ?>
|
432 |
+
</th>
|
433 |
+
<td colspan="3">
|
434 |
+
<label for="wc_vote_up">
|
435 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_vote_up']; ?>" name="wc_vote_up" id="wc_vote_up" />
|
436 |
+
</label>
|
437 |
+
</td>
|
438 |
+
</tr>
|
439 |
+
|
440 |
+
<tr valign="top">
|
441 |
+
<th scope="row">
|
442 |
+
<?php _e('Vote Down', 'wpdiscuz'); ?>
|
443 |
+
</th>
|
444 |
+
<td colspan="3">
|
445 |
+
<label for="wc_vote_down">
|
446 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_vote_down']; ?>" name="wc_vote_down" id="wc_vote_down" />
|
447 |
+
</label>
|
448 |
+
</td>
|
449 |
+
</tr>
|
450 |
+
|
451 |
+
<tr valign="top">
|
452 |
+
<th scope="row">
|
453 |
+
<?php _e('Vote Counted', 'wpdiscuz'); ?>
|
454 |
+
</th>
|
455 |
+
<td colspan="3">
|
456 |
+
<label for="wc_vote_counted">
|
457 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_vote_counted']; ?>" name="wc_vote_counted" id="wc_vote_counted" />
|
458 |
+
</label>
|
459 |
+
</td>
|
460 |
+
</tr>
|
461 |
+
|
462 |
+
<tr valign="top">
|
463 |
+
<th scope="row">
|
464 |
+
<?php _e('You can vote only 1 time', 'wpdiscuz'); ?>
|
465 |
+
</th>
|
466 |
+
<td colspan="3">
|
467 |
+
<label for="wc_vote_only_one_time">
|
468 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_vote_only_one_time']; ?>" name="wc_vote_only_one_time" id="wc_vote_only_one_time" />
|
469 |
+
</label>
|
470 |
+
</td>
|
471 |
+
</tr>
|
472 |
+
|
473 |
+
<tr valign="top">
|
474 |
+
<th scope="row">
|
475 |
+
<?php _e('Voting Error', 'wpdiscuz'); ?>
|
476 |
+
</th>
|
477 |
+
<td colspan="3">
|
478 |
+
<label for="wc_voting_error">
|
479 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_voting_error']; ?>" name="wc_voting_error" id="wc_voting_error" />
|
480 |
+
</label>
|
481 |
+
</td>
|
482 |
+
</tr>
|
483 |
+
|
484 |
+
<tr valign="top">
|
485 |
+
<th scope="row">
|
486 |
+
<?php _e('Login To Vote', 'wpdiscuz'); ?>
|
487 |
+
</th>
|
488 |
+
<td colspan="3">
|
489 |
+
<label for="wc_login_to_vote">
|
490 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_login_to_vote']; ?>" name="wc_login_to_vote" id="wc_login_to_vote" />
|
491 |
+
</label>
|
492 |
+
</td>
|
493 |
+
</tr>
|
494 |
+
|
495 |
+
<tr valign="top">
|
496 |
+
<th scope="row">
|
497 |
+
<?php _e('You Cannot Vote On Your Comment', 'wpdiscuz'); ?>
|
498 |
+
</th>
|
499 |
+
<td colspan="3">
|
500 |
+
<label for="wc_self_vote">
|
501 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_self_vote']; ?>" name="wc_self_vote" id="wc_self_vote" />
|
502 |
+
</label>
|
503 |
+
</td>
|
504 |
+
</tr>
|
505 |
+
|
506 |
+
<tr valign="top">
|
507 |
+
<th scope="row">
|
508 |
+
<?php _e('Invalid Captcha Code', 'wpdiscuz'); ?>
|
509 |
+
</th>
|
510 |
+
<td colspan="3">
|
511 |
+
<label for="wc_invalid_captcha">
|
512 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_invalid_captcha']; ?>" name="wc_invalid_captcha" id="wc_invalid_captcha" />
|
513 |
+
</label>
|
514 |
+
</td>
|
515 |
+
</tr>
|
516 |
+
|
517 |
+
<tr valign="top">
|
518 |
+
<th scope="row">
|
519 |
+
<?php _e('Some of field value is invalid', 'wpdiscuz'); ?>
|
520 |
+
</th>
|
521 |
+
<td colspan="3">
|
522 |
+
<label for="wc_invalid_field">
|
523 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_invalid_field']; ?>" name="wc_invalid_field" id="wc_invalid_field" />
|
524 |
+
</label>
|
525 |
+
</td>
|
526 |
+
</tr>
|
527 |
+
|
528 |
+
<tr valign="top">
|
529 |
+
<th scope="row">
|
530 |
+
<?php _e('Comment waiting moderation', 'wpdiscuz'); ?>
|
531 |
+
</th>
|
532 |
+
<td colspan="3">
|
533 |
+
<label for="wc_held_for_moderate">
|
534 |
+
<input type="text" value="<?php echo $this->wc_options_serialized->wc_phrases['wc_held_for_moderate']; ?>" name="wc_held_for_moderate" id="wc_held_for_moderate" />
|
535 |
+
</label>
|
536 |
+
</td>
|
537 |
</tr>
|
readme.txt
CHANGED
@@ -1,58 +1,69 @@
|
|
1 |
-
===
|
2 |
-
Contributors: gVectors Team
|
3 |
-
Tags: Wordpress Comments, Post Comments, comments box, comments, discussions, comment template
|
4 |
-
Requires at least: 2.7
|
5 |
-
Tested up to: 4.0
|
6 |
-
Stable tag: 1.0.
|
7 |
-
License: GPLv2 or later
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
|
10 |
-
Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
15 |
-
|
16 |
-
**wpDiscuz Features:**
|
17 |
-
|
18 |
-
* | **Front-end**
|
19 |
-
* | Adds
|
20 |
-
* | Responsive comments form and comment threads design
|
21 |
-
* |
|
22 |
-
* | Fast and easy comment form with ajax validation and data submitting
|
23 |
-
* | Allows to create a new discussion thread and reply to existing comment
|
24 |
-
* | Ajax button "Load More Comments" instead of simple comments pagination
|
25 |
-
* | Fully integrated and compatible with Wordpress
|
26 |
-
* | Uses Wordpress Comment system with all managing functions and features
|
27 |
-
* | Uses WP Avatar System, fully compatible with BuddyPress and other profiling plugins
|
28 |
-
* | Secure and Anti-Spam features will not allow spammers to comment
|
29 |
-
* | Comment voting with positive and negative result
|
30 |
-
* | Smart voting system with tracking by logged-in user and cookies
|
31 |
-
* | Post sharing options: Facebook, Twitter and Google+
|
32 |
-
*
|
33 |
-
* | **Dashboard**
|
34 |
-
* |
|
35 |
-
* | Option to
|
36 |
-
* |
|
37 |
-
* | Option to
|
38 |
-
* | Option
|
39 |
-
* | Option to
|
40 |
-
* | Option to
|
41 |
-
* | Option to
|
42 |
-
* |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
==
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WpDiscuz - Wordpress Comments ===
|
2 |
+
Contributors: gVectors Team
|
3 |
+
Tags: Wordpress Comments, Post Comments, comments box, comments, discussions, comment template
|
4 |
+
Requires at least: 2.7
|
5 |
+
Tested up to: 4.0
|
6 |
+
Stable tag: 1.0.1
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
15 |
+
|
16 |
+
**wpDiscuz Features:**
|
17 |
+
|
18 |
+
* | **Front-end**
|
19 |
+
* | Adds interactive comment box on posts and other content types
|
20 |
+
* | Responsive comments form and comment threads design
|
21 |
+
* | Clean, simple and easy user interface and user experience
|
22 |
+
* | Fast and easy comment form with ajax validation and data submitting
|
23 |
+
* | Allows to create a new discussion thread and reply to existing comment
|
24 |
+
* | Ajax button "Load More Comments" instead of simple comments pagination
|
25 |
+
* | Fully integrated and compatible with Wordpress
|
26 |
+
* | Uses Wordpress Comment system with all managing functions and features
|
27 |
+
* | Uses WP Avatar System, fully compatible with BuddyPress and other profiling plugins
|
28 |
+
* | Secure and Anti-Spam features will not allow spammers to comment
|
29 |
+
* | Comment voting with positive and negative result
|
30 |
+
* | Smart voting system with tracking by logged-in user and cookies
|
31 |
+
* | Post sharing options: Facebook, Twitter and Google+
|
32 |
+
*
|
33 |
+
* | **Dashboard**
|
34 |
+
* | Option to display comment form for certain post types
|
35 |
+
* | Option to set Discussion Tab as the first opened Tab on product page
|
36 |
+
* | Options to turn On/Off Comment Voting and Sharing features
|
37 |
+
* | Option to hide/show CAPTCHA field on comment form
|
38 |
+
* | Option for "User Must be registered to comment"
|
39 |
+
* | Option to held new comments for moderation
|
40 |
+
* | Option to hide user labels/titles
|
41 |
+
* | Option to set number of comment threads per page (for "load more comments" button)
|
42 |
+
* | Option to notify administrators and comment authors on new comment/reply
|
43 |
+
* | Option to manage font color
|
44 |
+
* | Option to manage comment/reply background colors
|
45 |
+
* | Option to manage author name and label color
|
46 |
+
* | Option to manage reply/share/vote link colors
|
47 |
+
* | Front-end phrase managing options, you'll be able to translate or change all phrases
|
48 |
+
|
49 |
+
== Installation ==
|
50 |
+
|
51 |
+
1. Upload plugin folder to the '/wp-content/plugins/' directory,
|
52 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
53 |
+
|
54 |
+
== Frequently Asked Questions ==
|
55 |
+
|
56 |
+
= Please Check the Following wpDiscuz Resources =
|
57 |
+
|
58 |
+
* Support Forum: <http://gvectors.com/questions/>
|
59 |
+
|
60 |
+
== Changelog ==
|
61 |
+
|
62 |
+
= 1.0.1 =
|
63 |
+
|
64 |
+
* Changed : Comment Box Header
|
65 |
+
* Fixed Bug : CSS Issues
|
66 |
+
* Fixed Bug : Layout Issues with some themes
|
67 |
+
|
68 |
+
= 1.0.0 =
|
69 |
+
Initial version
|
tasks.txt
CHANGED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
User role issue - multisite
|
2 |
+
|
3 |
+
1. post types - option
|
4 |
+
2. comments open
|
5 |
+
3. post type support comment
|
wc-css.php
CHANGED
@@ -13,11 +13,13 @@ class WC_CSS {
|
|
13 |
public function init_styles() {
|
14 |
?>
|
15 |
<style type="text/css">
|
|
|
16 |
#wpcomm form .item {display: block;} .item input {}
|
17 |
-
#wpcomm { margin:
|
18 |
#wpcomm form { margin:0px; padding:0px; background:none; border:none; }
|
19 |
#wpcomm form div{ margin:0px; }
|
20 |
-
|
|
|
21 |
#wpcomm .wc-author-data{ margin-bottom:10px; }
|
22 |
#wpcomm .wc-field-submit{ padding:5px 0px 13px 0px; }
|
23 |
#wpcomm .wc-field-name{ width:49%; float:left; }
|
@@ -37,47 +39,48 @@ class WC_CSS {
|
|
37 |
#wpcomm input[type="text"], #wpcomm input[type="email"], #wpcomm textarea{ font-size:14px; color:#666666; font-family:Lato,sans-serif; box-sizing: border-box; margin:0px; }
|
38 |
#wpcomm .wc-copyright{ margin: 0px 0px 0px auto; text-align:right; display: block; padding-top: 2px; }
|
39 |
#wpcomm .wc-copyright a{ font-size: 9px; color: #AAAAAA; cursor:help; text-decoration:none; margin:0px; padding:0px; border:none;}
|
40 |
-
#wpcomm .wc-thread-wrapper{ padding:10px 0px; margin-bottom:
|
41 |
#wpcomm .wc-comment { margin-bottom:13px; }
|
42 |
#wpcomm .wc-comment .wc-field-submit{ padding:5px 0px 5px 0px; }
|
43 |
#wpcomm .wc-comment .wc-form-wrapper{ padding:10px 10px 2px 10px; }
|
44 |
#wpcomm .wc-comment .wc-comment-left{ width:62px; float:left; position:absolute; text-align:center; font-family:Lato,sans-serif; line-height:16px; }
|
45 |
-
#wpcomm .wc-comment .wc-comment-right{ margin-left:70px; border:#F5F5F5 1px solid; padding:10px 10px 3px 10px; background:<?php echo $this->wc_options->
|
46 |
#wpcomm .wc-reply .wc-comment-right{ margin-left:70px; border:#F5F5F5 1px solid; padding:10px 10px 3px 10px; }
|
47 |
#wpcomm .wc-reply { margin-top: 10px; margin-bottom:0px; margin-left:40px; }
|
48 |
-
#wpcomm .wc-reply .wc-comment-right{ background:<?php echo $this->wc_options->
|
49 |
-
#wpcomm .wc-comment-title{ margin:0px; font-size:18px; line-height:18px; font-weight:bold; padding:10px; margin-bottom:10px; }
|
50 |
#wpcomm .wc-must-login{ margin:0px; font-size:14px; line-height:16px; padding:10px }
|
51 |
#wpcomm hr{ background-color: rgba(0, 0, 0, 0.1); border: 0 none; height: 1px; margin:10px 0px; }
|
52 |
#wpcomm .avatar{ border: 1px solid rgba(0, 0, 0, 0.1); padding: 2px; margin:0px; float:none; }
|
53 |
-
#wpcomm .wc-comment-text{ font-size:13px; text-align:left; color:<?php echo $this->wc_options->
|
54 |
#wpcomm .wc-comment-header{ margin-bottom:7px; font-family:Lato,sans-serif; }
|
55 |
-
#wpcomm .wc-comment-author{ color:<?php echo $this->wc_options->
|
56 |
-
#wpcomm .wc-comment-label{ background:<?php echo $this->wc_options->
|
57 |
#wpcomm .wc-comment-date{ font-size:12px; color:#999999; width:59%; float:right; text-align:right; white-space:nowrap; line-height:27px; }
|
58 |
-
#wpcomm .wc-comment-footer { font-size:12px; font-weight:normal; color:#999999; margin-top:
|
59 |
-
#wpcomm .wc-comment-footer a{ text-decoration:none; font-size:13px; font-weight:bold; color:<?php echo $this->wc_options->
|
60 |
#wpcomm .wc-comment-footer .share_buttons_box img{ vertical-align:middle; }
|
61 |
#wpcomm .wc-comment-footer .wc-voted{ color:#666666; cursor:default; }
|
62 |
-
#wpcomm .wc-comment-footer .wc-vote-result{ padding:2px 6px 2px 5px; background:<?php echo $this->wc_options->
|
63 |
#wpcomm .wc-toggle{ float:right; text-align:right; padding-right:0px; margin-right:0px; color:#999999; cursor:pointer; font-size:12px; }
|
64 |
#wpcomm .item { background: none; border-radius: 0px; box-shadow: none; }
|
65 |
#wc_response_info img{ margin: 0px auto 0px auto; }
|
66 |
#wpcomm .share_buttons_box img { display:inline!important; width:16px; height:16px; }
|
67 |
#wpcomm .wc-captcha-label img{ display: inline!important; border:none; padding:0px 1px; margin:0px; }
|
68 |
-
#wpcomm .wc-reply-link, #wpcomm .wc-vote-link, #wpcomm .wc-share-link { cursor: pointer; font-size:13px; font-weight:bold; color: <?php echo $this->wc_options->
|
69 |
#wpcomm .wc-form-footer, #wpcomm .wc-secondary-forms-wrapper {display: none;}
|
70 |
#wpcomm .wc-field-captcha .wc-captcha-label { margin-left: 5px; padding: 0; display: inline-block; }
|
71 |
#wpcomm .wc_captcha_refresh_img {cursor: pointer; margin-left: 3px;}
|
72 |
#wpcomm .share_buttons_box {display: none;/*position: absolute;left: 40%;*/}
|
73 |
#wpcomm .wc-no-left-margin {margin-left: 0 !important;}
|
74 |
div.wc_modal { background: none repeat scroll 0 0 #EDEDED; color:#444444; font-size: 18px; font-weight: normal; padding: 45px 10px 50px 10px!important; text-align: center; line-height:25px;}
|
75 |
-
.wc-load-more-submit-wrap { width: 100%; text-align: center; }
|
76 |
.wc-load-more-submit { width: 100%; text-align: center; }
|
77 |
#wc_openModalFormAction > div#wc_response_info { width: 200px; background: none repeat scroll 0 0 #EDEDED; color:#444444; font-size: 18px; font-weight: normal; padding: 45px 10px 50px 10px!important; text-align: center; line-height:25px;}
|
78 |
#wc_openModalFormAction > div#wc_response_info { /*z-index: 10000;*/ }
|
79 |
#wc_openModalFormAction > div#wc_response_info a.close { background: url("<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/x.png'); ?>") no-repeat; background-position-x: right; background-position-y: top; }
|
80 |
-
|
|
|
|
|
81 |
<?php
|
82 |
}
|
83 |
|
13 |
public function init_styles() {
|
14 |
?>
|
15 |
<style type="text/css">
|
16 |
+
.wc-comment-header{ padding-top:20px; display:block; float:none; clear:both; font-size:18px;} /*#2892BF*/
|
17 |
#wpcomm form .item {display: block;} .item input {}
|
18 |
+
#wpcomm { margin:15px auto; padding:1px 0px 10px 0px; border-top:#DDDDDD solid 1px; }
|
19 |
#wpcomm form { margin:0px; padding:0px; background:none; border:none; }
|
20 |
#wpcomm form div{ margin:0px; }
|
21 |
+
#wpcomm .wc-comment-title{ margin:0px; line-height:18px; font-weight:bold; padding:10px; margin-bottom:10px; font-size:13px; text-align:right; border-bottom:#CCCCCC dotted 1px; padding-bottom:10px; }
|
22 |
+
#wpcomm .wc-form-wrapper{ padding:10px; background:#F9F9F9; margin-top:20px; border:1px solid #F1F1F1; }
|
23 |
#wpcomm .wc-author-data{ margin-bottom:10px; }
|
24 |
#wpcomm .wc-field-submit{ padding:5px 0px 13px 0px; }
|
25 |
#wpcomm .wc-field-name{ width:49%; float:left; }
|
39 |
#wpcomm input[type="text"], #wpcomm input[type="email"], #wpcomm textarea{ font-size:14px; color:#666666; font-family:Lato,sans-serif; box-sizing: border-box; margin:0px; }
|
40 |
#wpcomm .wc-copyright{ margin: 0px 0px 0px auto; text-align:right; display: block; padding-top: 2px; }
|
41 |
#wpcomm .wc-copyright a{ font-size: 9px; color: #AAAAAA; cursor:help; text-decoration:none; margin:0px; padding:0px; border:none;}
|
42 |
+
#wpcomm .wc-thread-wrapper{ padding:10px 0px; margin-bottom:10px;}
|
43 |
#wpcomm .wc-comment { margin-bottom:13px; }
|
44 |
#wpcomm .wc-comment .wc-field-submit{ padding:5px 0px 5px 0px; }
|
45 |
#wpcomm .wc-comment .wc-form-wrapper{ padding:10px 10px 2px 10px; }
|
46 |
#wpcomm .wc-comment .wc-comment-left{ width:62px; float:left; position:absolute; text-align:center; font-family:Lato,sans-serif; line-height:16px; }
|
47 |
+
#wpcomm .wc-comment .wc-comment-right{ margin-left:70px; border:#F5F5F5 1px solid; padding:10px 10px 3px 10px; background:<?php echo $this->wc_options->wc_options_serialized->wc_comment_bg_color; ?>}
|
48 |
#wpcomm .wc-reply .wc-comment-right{ margin-left:70px; border:#F5F5F5 1px solid; padding:10px 10px 3px 10px; }
|
49 |
#wpcomm .wc-reply { margin-top: 10px; margin-bottom:0px; margin-left:40px; }
|
50 |
+
#wpcomm .wc-reply .wc-comment-right{ background:<?php echo $this->wc_options->wc_options_serialized->wc_reply_bg_color; ?>; }
|
|
|
51 |
#wpcomm .wc-must-login{ margin:0px; font-size:14px; line-height:16px; padding:10px }
|
52 |
#wpcomm hr{ background-color: rgba(0, 0, 0, 0.1); border: 0 none; height: 1px; margin:10px 0px; }
|
53 |
#wpcomm .avatar{ border: 1px solid rgba(0, 0, 0, 0.1); padding: 2px; margin:0px; float:none; }
|
54 |
+
#wpcomm .wc-comment-text{ font-size:13px; text-align:left; color:<?php echo $this->wc_options->wc_options_serialized->wc_comment_text_color; ?>; padding-bottom:5px; }
|
55 |
#wpcomm .wc-comment-header{ margin-bottom:7px; font-family:Lato,sans-serif; }
|
56 |
+
#wpcomm .wc-comment-author{ color:<?php echo $this->wc_options->wc_options_serialized->wc_author_title_color; ?>; font-size:16px; width:40%; float:left; white-space:nowrap; }
|
57 |
+
#wpcomm .wc-comment-label{ background:<?php echo $this->wc_options->wc_options_serialized->wc_author_title_color; ?>; color:#FFFFFF; padding:2px 5px; font-size:12px; margin:4px auto; text-align:center; display:table; line-height:16px; }
|
58 |
#wpcomm .wc-comment-date{ font-size:12px; color:#999999; width:59%; float:right; text-align:right; white-space:nowrap; line-height:27px; }
|
59 |
+
#wpcomm .wc-comment-footer { font-size:12px; font-weight:normal; color:#999999; margin-top:12px; min-height: 28px; font-family:Lato,sans-serif; }
|
60 |
+
#wpcomm .wc-comment-footer a{ text-decoration:none; font-size:13px; font-weight:bold; color:<?php echo $this->wc_options->wc_options_serialized->wc_vote_reply_color; ?>; }
|
61 |
#wpcomm .wc-comment-footer .share_buttons_box img{ vertical-align:middle; }
|
62 |
#wpcomm .wc-comment-footer .wc-voted{ color:#666666; cursor:default; }
|
63 |
+
#wpcomm .wc-comment-footer .wc-vote-result{ padding:2px 6px 2px 5px; background:<?php echo $this->wc_options->wc_options_serialized->wc_vote_reply_color; ?>; color:#FFFFFF; font-size:12px; font-weight:bold; display:inline; margin-right:5px;}
|
64 |
#wpcomm .wc-toggle{ float:right; text-align:right; padding-right:0px; margin-right:0px; color:#999999; cursor:pointer; font-size:12px; }
|
65 |
#wpcomm .item { background: none; border-radius: 0px; box-shadow: none; }
|
66 |
#wc_response_info img{ margin: 0px auto 0px auto; }
|
67 |
#wpcomm .share_buttons_box img { display:inline!important; width:16px; height:16px; }
|
68 |
#wpcomm .wc-captcha-label img{ display: inline!important; border:none; padding:0px 1px; margin:0px; }
|
69 |
+
#wpcomm .wc-reply-link, #wpcomm .wc-vote-link, #wpcomm .wc-share-link { cursor: pointer; font-size:13px; font-weight:bold; color: <?php echo $this->wc_options->wc_options_serialized->wc_vote_reply_color; ?>; }
|
70 |
#wpcomm .wc-form-footer, #wpcomm .wc-secondary-forms-wrapper {display: none;}
|
71 |
#wpcomm .wc-field-captcha .wc-captcha-label { margin-left: 5px; padding: 0; display: inline-block; }
|
72 |
#wpcomm .wc_captcha_refresh_img {cursor: pointer; margin-left: 3px;}
|
73 |
#wpcomm .share_buttons_box {display: none;/*position: absolute;left: 40%;*/}
|
74 |
#wpcomm .wc-no-left-margin {margin-left: 0 !important;}
|
75 |
div.wc_modal { background: none repeat scroll 0 0 #EDEDED; color:#444444; font-size: 18px; font-weight: normal; padding: 45px 10px 50px 10px!important; text-align: center; line-height:25px;}
|
76 |
+
.wc-load-more-submit-wrap { width: 100%; text-align: center; margin-bottom:20px; }
|
77 |
.wc-load-more-submit { width: 100%; text-align: center; }
|
78 |
#wc_openModalFormAction > div#wc_response_info { width: 200px; background: none repeat scroll 0 0 #EDEDED; color:#444444; font-size: 18px; font-weight: normal; padding: 45px 10px 50px 10px!important; text-align: center; line-height:25px;}
|
79 |
#wc_openModalFormAction > div#wc_response_info { /*z-index: 10000;*/ }
|
80 |
#wc_openModalFormAction > div#wc_response_info a.close { background: url("<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/x.png'); ?>") no-repeat; background-position-x: right; background-position-y: top; }
|
81 |
+
#wpcomm .by-wpdiscuz{ text-align:right; border-top:#DDDDDD solid 1px; padding:3px 1px 1px 1px; }
|
82 |
+
#wpcomm .by-wpdiscuz a{ font-size:11px; font-weight:bold; text-align:right; color:#CCCCCC; padding:1px; margin:0px; line-height:12px; border:none; text-decoration:none; }
|
83 |
+
</style>
|
84 |
<?php
|
85 |
}
|
86 |
|
wc-options-serialize.php
CHANGED
@@ -156,7 +156,7 @@ class WC_Options_Serialize {
|
|
156 |
$this->init_phrases();
|
157 |
$this->add_options();
|
158 |
$this->init_options(get_option($this->wc_options_slug));
|
159 |
-
add_action('plugins_loaded', array(&$this, 'init_phrases_on_load'),
|
160 |
}
|
161 |
|
162 |
public function init_options($serialize_options) {
|
@@ -185,6 +185,8 @@ class WC_Options_Serialize {
|
|
185 |
*/
|
186 |
public function init_phrases() {
|
187 |
$this->wc_phrases = array(
|
|
|
|
|
188 |
'wc_header_text' => 'Comment',
|
189 |
'wc_header_on_text' => 'on',
|
190 |
'wc_comment_start_text' => 'Start the discussion',
|
@@ -279,8 +281,8 @@ class WC_Options_Serialize {
|
|
279 |
'wc_comment_bg_color' => '#fefefe',
|
280 |
'wc_reply_bg_color' => '#f8f8f8',
|
281 |
'wc_comment_text_color' => '#555',
|
282 |
-
'wc_author_title_color' => '#
|
283 |
-
'wc_vote_reply_color' => '#
|
284 |
);
|
285 |
add_option($this->wc_options_slug, serialize($options));
|
286 |
}
|
156 |
$this->init_phrases();
|
157 |
$this->add_options();
|
158 |
$this->init_options(get_option($this->wc_options_slug));
|
159 |
+
add_action('plugins_loaded', array(&$this, 'init_phrases_on_load'), 2126);
|
160 |
}
|
161 |
|
162 |
public function init_options($serialize_options) {
|
185 |
*/
|
186 |
public function init_phrases() {
|
187 |
$this->wc_phrases = array(
|
188 |
+
'wc_leave_a_reply_text' => 'Leave a Reply',
|
189 |
+
'wc_be_the_first_text' => 'Be the First to Comment!',
|
190 |
'wc_header_text' => 'Comment',
|
191 |
'wc_header_on_text' => 'on',
|
192 |
'wc_comment_start_text' => 'Start the discussion',
|
281 |
'wc_comment_bg_color' => '#fefefe',
|
282 |
'wc_reply_bg_color' => '#f8f8f8',
|
283 |
'wc_comment_text_color' => '#555',
|
284 |
+
'wc_author_title_color' => '#00B38F',
|
285 |
+
'wc_vote_reply_color' => '#666666'
|
286 |
);
|
287 |
add_option($this->wc_options_slug, serialize($options));
|
288 |
}
|
wc-options.php
CHANGED
@@ -4,13 +4,13 @@ include_once 'includes/wc-db-helper.php';
|
|
4 |
|
5 |
class WC_Options {
|
6 |
|
7 |
-
public $
|
8 |
public $wc_db_helper;
|
9 |
private $wc_post_types;
|
10 |
|
11 |
public function __construct() {
|
12 |
$this->wc_db_helper = new WC_DB_Helper();
|
13 |
-
$this->
|
14 |
}
|
15 |
|
16 |
/**
|
@@ -35,25 +35,25 @@ class WC_Options {
|
|
35 |
check_admin_referer('wc_options_form');
|
36 |
}
|
37 |
|
38 |
-
$this->
|
39 |
-
$this->
|
40 |
-
$this->
|
41 |
-
$this->
|
42 |
-
$this->
|
43 |
-
$this->
|
44 |
-
$this->
|
45 |
-
$this->
|
46 |
-
$this->
|
47 |
-
$this->
|
48 |
-
$this->
|
49 |
-
$this->
|
50 |
-
$this->
|
51 |
-
$this->
|
52 |
-
$this->
|
53 |
-
$this->
|
54 |
-
$this->
|
55 |
-
|
56 |
-
$this->
|
57 |
}
|
58 |
?>
|
59 |
|
@@ -112,60 +112,61 @@ class WC_Options {
|
|
112 |
check_admin_referer('wc_phrases_form');
|
113 |
}
|
114 |
|
115 |
-
|
116 |
-
$this->
|
117 |
-
$this->
|
118 |
-
$this->
|
119 |
-
$this->
|
120 |
-
$this->
|
121 |
-
$this->
|
122 |
-
$this->
|
123 |
-
$this->
|
124 |
-
$this->
|
125 |
-
$this->
|
126 |
-
$this->
|
127 |
-
$this->
|
128 |
-
$this->
|
129 |
-
$this->
|
130 |
-
$this->
|
131 |
-
$this->
|
132 |
-
$this->
|
133 |
-
$this->
|
134 |
-
$this->
|
135 |
-
$this->
|
136 |
-
$this->
|
137 |
-
$this->
|
138 |
-
$this->
|
139 |
-
$this->
|
140 |
-
|
141 |
-
|
142 |
-
$this->
|
143 |
-
$this->
|
144 |
-
$this->
|
145 |
-
$this->
|
146 |
-
$this->
|
147 |
-
$this->
|
148 |
-
$this->
|
149 |
-
$this->
|
150 |
-
|
151 |
-
|
152 |
-
$this->
|
153 |
-
$this->
|
154 |
-
$this->
|
155 |
-
$this->
|
156 |
-
$this->
|
157 |
-
$this->
|
158 |
-
$this->
|
159 |
-
$this->
|
160 |
-
$this->
|
161 |
-
$this->
|
162 |
-
$this->
|
163 |
-
$this->
|
164 |
-
|
165 |
-
|
|
|
166 |
}
|
167 |
if ($this->wc_db_helper->is_phrase_exists('wc_discuss_tab')) {
|
168 |
-
$this->
|
169 |
}
|
170 |
?>
|
171 |
<div class="wrap wpdiscuz_options_page">
|
4 |
|
5 |
class WC_Options {
|
6 |
|
7 |
+
public $wc_options_serialized;
|
8 |
public $wc_db_helper;
|
9 |
private $wc_post_types;
|
10 |
|
11 |
public function __construct() {
|
12 |
$this->wc_db_helper = new WC_DB_Helper();
|
13 |
+
$this->wc_options_serialized = new WC_Options_Serialize($this->wc_db_helper);
|
14 |
}
|
15 |
|
16 |
/**
|
35 |
check_admin_referer('wc_options_form');
|
36 |
}
|
37 |
|
38 |
+
$this->wc_options_serialized->wc_post_types = isset($_POST['wc_post_types']) ? $_POST['wc_post_types'] : array();
|
39 |
+
$this->wc_options_serialized->wc_voting_buttons_show_hide = isset($_POST['wc_voting_buttons_show_hide']) ? $_POST['wc_voting_buttons_show_hide'] : 0;
|
40 |
+
$this->wc_options_serialized->wc_share_buttons_show_hide = isset($_POST['wc_share_buttons_show_hide']) ? $_POST['wc_share_buttons_show_hide'] : 0;
|
41 |
+
$this->wc_options_serialized->wc_captcha_show_hide = isset($_POST['wc_captcha_show_hide']) ? $_POST['wc_captcha_show_hide'] : 0;
|
42 |
+
$this->wc_options_serialized->wc_user_must_be_registered = isset($_POST['wc_user_must_be_registered']) ? $_POST['wc_user_must_be_registered'] : 0;
|
43 |
+
$this->wc_options_serialized->wc_held_comment_to_moderate = isset($_POST['wc_held_comment_to_moderate']) ? $_POST['wc_held_comment_to_moderate'] : 0;
|
44 |
+
$this->wc_options_serialized->wc_reply_button_guests_show_hide = isset($_POST['wc_reply_button_guests_show_hide']) ? $_POST['wc_reply_button_guests_show_hide'] : 0;
|
45 |
+
$this->wc_options_serialized->wc_reply_button_members_show_hide = isset($_POST['wc_reply_button_members_show_hide']) ? $_POST['wc_reply_button_members_show_hide'] : 0;
|
46 |
+
$this->wc_options_serialized->wc_author_titles_show_hide = isset($_POST['wc_author_titles_show_hide']) ? $_POST['wc_author_titles_show_hide'] : 0;
|
47 |
+
$this->wc_options_serialized->wc_comment_count = isset($_POST['wc_comment_count']) ? $_POST['wc_comment_count'] : 10;
|
48 |
+
$this->wc_options_serialized->wc_notify_moderator = isset($_POST['wc_notify_moderator']) ? $_POST['wc_notify_moderator'] : 0;
|
49 |
+
$this->wc_options_serialized->wc_notify_comment_author = isset($_POST['wc_notify_comment_author']) ? $_POST['wc_notify_comment_author'] : 0;
|
50 |
+
$this->wc_options_serialized->wc_comment_bg_color = isset($_POST['wc_comment_bg_color']) ? $_POST['wc_comment_bg_color'] : '#fefefe';
|
51 |
+
$this->wc_options_serialized->wc_reply_bg_color = isset($_POST['wc_reply_bg_color']) ? $_POST['wc_reply_bg_color'] : '#f8f8f8';
|
52 |
+
$this->wc_options_serialized->wc_comment_text_color = isset($_POST['wc_comment_text_color']) ? $_POST['wc_comment_text_color'] : '#555';
|
53 |
+
$this->wc_options_serialized->wc_author_title_color = isset($_POST['wc_author_title_color']) ? $_POST['wc_author_title_color'] : '#00B38F';
|
54 |
+
$this->wc_options_serialized->wc_vote_reply_color = isset($_POST['wc_vote_reply_color']) ? $_POST['wc_vote_reply_color'] : '#666666';
|
55 |
+
|
56 |
+
$this->wc_options_serialized->update_options();
|
57 |
}
|
58 |
?>
|
59 |
|
112 |
check_admin_referer('wc_phrases_form');
|
113 |
}
|
114 |
|
115 |
+
$this->wc_options_serialized->wc_phrases['wc_leave_a_reply_text'] = isset($_POST['wc_leave_a_reply_text']) ? $_POST['wc_leave_a_reply_text'] : 'Leave a Reply';
|
116 |
+
$this->wc_options_serialized->wc_phrases['wc_be_the_first_text'] = isset($_POST['wc_be_the_first_text']) ? $_POST['wc_be_the_first_text'] : 'Be the First to Comment!';
|
117 |
+
$this->wc_options_serialized->wc_phrases['wc_header_text'] = isset($_POST['wc_header_text']) ? $_POST['wc_header_text'] : 'Comment';
|
118 |
+
$this->wc_options_serialized->wc_phrases['wc_header_on_text'] = isset($_POST['wc_header_on_text']) ? $_POST['wc_header_on_text'] : 'on';
|
119 |
+
$this->wc_options_serialized->wc_phrases['wc_comment_start_text'] = isset($_POST['wc_comment_start_text']) ? $_POST['wc_comment_start_text'] : 'Start the discussion';
|
120 |
+
$this->wc_options_serialized->wc_phrases['wc_comment_join_text'] = isset($_POST['wc_comment_join_text']) ? $_POST['wc_comment_join_text'] : 'Join the discussion';
|
121 |
+
$this->wc_options_serialized->wc_phrases['wc_email_text'] = isset($_POST['wc_email_text']) ? $_POST['wc_email_text'] : 'Email';
|
122 |
+
$this->wc_options_serialized->wc_phrases['wc_name_text'] = isset($_POST['wc_name_text']) ? $_POST['wc_name_text'] : 'Name';
|
123 |
+
$this->wc_options_serialized->wc_phrases['wc_captcha_text'] = isset($_POST['wc_captcha_text']) ? $_POST['wc_captcha_text'] : 'Please insert the code above to comment';
|
124 |
+
$this->wc_options_serialized->wc_phrases['wc_submit_text'] = isset($_POST['wc_submit_text']) ? $_POST['wc_submit_text'] : 'Post Comment';
|
125 |
+
$this->wc_options_serialized->wc_phrases['wc_load_more_submit_text'] = isset($_POST['wc_load_more_submit_text']) ? $_POST['wc_load_more_submit_text'] : 'Load More';
|
126 |
+
$this->wc_options_serialized->wc_phrases['wc_reply_text'] = isset($_POST['wc_reply_text']) ? $_POST['wc_reply_text'] : 'Reply';
|
127 |
+
$this->wc_options_serialized->wc_phrases['wc_share_text'] = isset($_POST['wc_share_text']) ? $_POST['wc_share_text'] : 'Share';
|
128 |
+
$this->wc_options_serialized->wc_phrases['wc_share_facebook'] = isset($_POST['wc_share_facebook']) ? $_POST['wc_share_facebook'] : 'Share On Facebook';
|
129 |
+
$this->wc_options_serialized->wc_phrases['wc_share_twitter'] = isset($_POST['wc_share_twitter']) ? $_POST['wc_share_twitter'] : 'Share On Twitter';
|
130 |
+
$this->wc_options_serialized->wc_phrases['wc_share_google'] = isset($_POST['wc_share_google']) ? $_POST['wc_share_google'] : 'Share On Google';
|
131 |
+
$this->wc_options_serialized->wc_phrases['wc_hide_replies_text'] = isset($_POST['wc_hide_replies_text']) ? $_POST['wc_hide_replies_text'] : 'Hide Replies';
|
132 |
+
$this->wc_options_serialized->wc_phrases['wc_show_replies_text'] = isset($_POST['wc_show_replies_text']) ? $_POST['wc_show_replies_text'] : 'Show Replies';
|
133 |
+
$this->wc_options_serialized->wc_phrases['wc_user_title_guest_text'] = isset($_POST['wc_user_title_guest_text']) ? $_POST['wc_user_title_guest_text'] : 'Guest';
|
134 |
+
$this->wc_options_serialized->wc_phrases['wc_user_title_member_text'] = isset($_POST['wc_user_title_member_text']) ? $_POST['wc_user_title_member_text'] : 'Member';
|
135 |
+
$this->wc_options_serialized->wc_phrases['wc_user_title_author_text'] = isset($_POST['wc_user_title_author_text']) ? $_POST['wc_user_title_author_text'] : 'Author';
|
136 |
+
$this->wc_options_serialized->wc_phrases['wc_user_title_admin_text'] = isset($_POST['wc_user_title_admin_text']) ? $_POST['wc_user_title_admin_text'] : 'Admin';
|
137 |
+
$this->wc_options_serialized->wc_phrases['wc_email_subject'] = isset($_POST['wc_email_subject']) ? $_POST['wc_email_subject'] : 'New Comment';
|
138 |
+
$this->wc_options_serialized->wc_phrases['wc_email_message'] = isset($_POST['wc_email_message']) ? $_POST['wc_email_message'] : 'New comment on the product discussion section you\'ve been interested in';
|
139 |
+
$this->wc_options_serialized->wc_phrases['wc_error_empty_text'] = isset($_POST['wc_error_empty_text']) ? $_POST['wc_error_empty_text'] : 'please fill out this field to comment';
|
140 |
+
$this->wc_options_serialized->wc_phrases['wc_error_email_text'] = isset($_POST['wc_error_email_text']) ? $_POST['wc_error_email_text'] : 'email address is invalid';
|
141 |
+
|
142 |
+
$this->wc_options_serialized->wc_phrases['wc_year_text']['datetime'][0] = isset($_POST['wc_year_text']) ? $_POST['wc_year_text'] : 'year';
|
143 |
+
$this->wc_options_serialized->wc_phrases['wc_month_text']['datetime'][0] = isset($_POST['wc_month_text']) ? $_POST['wc_month_text'] : 'month';
|
144 |
+
$this->wc_options_serialized->wc_phrases['wc_day_text']['datetime'][0] = isset($_POST['wc_day_text']) ? $_POST['wc_day_text'] : 'day';
|
145 |
+
$this->wc_options_serialized->wc_phrases['wc_hour_text']['datetime'][0] = isset($_POST['wc_hour_text']) ? $_POST['wc_hour_text'] : 'hour';
|
146 |
+
$this->wc_options_serialized->wc_phrases['wc_minute_text']['datetime'][0] = isset($_POST['wc_minute_text']) ? $_POST['wc_minute_text'] : 'minute';
|
147 |
+
$this->wc_options_serialized->wc_phrases['wc_second_text']['datetime'][0] = isset($_POST['wc_second_text']) ? $_POST['wc_second_text'] : 'second';
|
148 |
+
$this->wc_options_serialized->wc_phrases['wc_plural_text'] = isset($_POST['wc_plural_text']) ? $_POST['wc_plural_text'] : 's';
|
149 |
+
$this->wc_options_serialized->wc_phrases['wc_right_now_text'] = isset($_POST['wc_right_now_text']) ? $_POST['wc_right_now_text'] : 'right now';
|
150 |
+
$this->wc_options_serialized->wc_phrases['wc_ago_text'] = isset($_POST['wc_ago_text']) ? $_POST['wc_ago_text'] : 'ago';
|
151 |
+
|
152 |
+
$this->wc_options_serialized->wc_phrases['wc_you_must_be_text'] = isset($_POST['wc_you_must_be_text']) ? $_POST['wc_you_must_be_text'] : 'You must be';
|
153 |
+
$this->wc_options_serialized->wc_phrases['wc_logged_in_text'] = isset($_POST['wc_logged_in_text']) ? $_POST['wc_logged_in_text'] : 'logged in';
|
154 |
+
$this->wc_options_serialized->wc_phrases['wc_to_post_comment_text'] = isset($_POST['wc_to_post_comment_text']) ? $_POST['wc_to_post_comment_text'] : 'to post a comment';
|
155 |
+
$this->wc_options_serialized->wc_phrases['wc_vote_counted'] = isset($_POST['wc_vote_counted']) ? $_POST['wc_vote_counted'] : 'Vote Counted';
|
156 |
+
$this->wc_options_serialized->wc_phrases['wc_vote_up'] = isset($_POST['wc_vote_up']) ? $_POST['wc_vote_up'] : 'Vote Up';
|
157 |
+
$this->wc_options_serialized->wc_phrases['wc_vote_down'] = isset($_POST['wc_vote_down']) ? $_POST['wc_vote_down'] : 'Vote Down';
|
158 |
+
$this->wc_options_serialized->wc_phrases['wc_held_for_moderate'] = isset($_POST['wc_held_for_moderate']) ? $_POST['wc_held_for_moderate'] : 'Your Comment waiting moderation';
|
159 |
+
$this->wc_options_serialized->wc_phrases['wc_vote_only_one_time'] = isset($_POST['wc_vote_only_one_time']) ? $_POST['wc_vote_only_one_time'] : 'You\'ve already voted for this comment';
|
160 |
+
$this->wc_options_serialized->wc_phrases['wc_voting_error'] = isset($_POST['wc_voting_error']) ? $_POST['wc_voting_error'] : 'Voting Error';
|
161 |
+
$this->wc_options_serialized->wc_phrases['wc_self_vote'] = isset($_POST['wc_self_vote']) ? $_POST['wc_self_vote'] : 'You cannot vote for your comment';
|
162 |
+
$this->wc_options_serialized->wc_phrases['wc_login_to_vote'] = isset($_POST['wc_login_to_vote']) ? $_POST['wc_login_to_vote'] : 'You Must Be Logged In To Vote';
|
163 |
+
$this->wc_options_serialized->wc_phrases['wc_invalid_captcha'] = isset($_POST['wc_invalid_captcha']) ? $_POST['wc_invalid_captcha'] : 'Invalid Captcha Code';
|
164 |
+
$this->wc_options_serialized->wc_phrases['wc_invalid_field'] = isset($_POST['wc_invalid_field']) ? $_POST['wc_invalid_field'] : 'Some of field value is invalid';
|
165 |
+
|
166 |
+
$this->wc_db_helper->update_phrases($this->wc_options_serialized->wc_phrases);
|
167 |
}
|
168 |
if ($this->wc_db_helper->is_phrase_exists('wc_discuss_tab')) {
|
169 |
+
$this->wc_options_serialized->wc_phrases = $this->wc_db_helper->get_phrases();
|
170 |
}
|
171 |
?>
|
172 |
<div class="wrap wpdiscuz_options_page">
|
wc.php
CHANGED
@@ -1,449 +1,449 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: WpDiscuz
|
5 |
-
Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
6 |
-
Version: 1.0.
|
7 |
-
Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
|
8 |
-
Author URI: http://www.gvectors.com/
|
9 |
-
Plugin URI: http://www.gvectors.com/
|
10 |
-
*/
|
11 |
-
|
12 |
-
include_once 'wc-options.php';
|
13 |
-
include_once 'helper/wc-helper.php';
|
14 |
-
include_once 'includes/wc-db-helper.php';
|
15 |
-
include_once 'comment-form/tpl-comment.php';
|
16 |
-
include_once 'dto/wc-comment.php';
|
17 |
-
include_once 'wc-css.php';
|
18 |
-
|
19 |
-
class WC_Core {
|
20 |
-
|
21 |
-
public $wc_options;
|
22 |
-
public $comment_types;
|
23 |
-
public $reviews_count;
|
24 |
-
public $wc_db_helper;
|
25 |
-
public $wc_helper;
|
26 |
-
public $comment_tpl_builder;
|
27 |
-
public $wc_css;
|
28 |
-
public $wc_parent_comments_count;
|
29 |
-
public $commetns_count = 0;
|
30 |
-
public $comment_count_text;
|
31 |
-
public static $PLUGIN_DIRECTORY;
|
32 |
-
public $post_type;
|
33 |
-
|
34 |
-
function __construct() {
|
35 |
-
add_action('init', array(&$this, 'init_plugin_dir_name'), 1);
|
36 |
-
|
37 |
-
$this->wc_options = new WC_Options();
|
38 |
-
$this->wc_db_helper = $this->wc_options->wc_db_helper;
|
39 |
-
|
40 |
-
register_activation_hook(__FILE__, array($this, 'db_operations'));
|
41 |
-
|
42 |
-
|
43 |
-
$this->wc_helper = new WC_Helper($this->wc_options->
|
44 |
-
$this->wc_css = new WC_CSS($this->wc_options);
|
45 |
-
$this->comment_tpl_builder = new WC_Comment_Template_Builder($this->wc_helper, $this->wc_db_helper, $this->wc_options);
|
46 |
-
|
47 |
-
add_action('init', array(&$this, 'register_session'), 2);
|
48 |
-
|
49 |
-
add_action('admin_enqueue_scripts', array(&$this, 'admin_page_styles_scripts'), 2315);
|
50 |
-
add_action('wp_enqueue_scripts', array(&$this, 'front_end_styles_scripts'));
|
51 |
-
add_action('wp_enqueue_scripts', array(&$this->wc_css, 'init_styles'));
|
52 |
-
|
53 |
-
add_action('admin_menu', array(&$this, 'add_plugin_options_page'), -191);
|
54 |
-
|
55 |
-
add_action('wp_ajax_wc_comms_via_ajax', array(&$this, 'comment_submit_via_ajax'));
|
56 |
-
add_action('wp_ajax_nopriv_wc_comms_via_ajax', array(&$this, 'comment_submit_via_ajax'));
|
57 |
-
|
58 |
-
add_action('wp_ajax_wc_load_more_comments', array(&$this, 'load_more_comments'));
|
59 |
-
add_action('wp_ajax_nopriv_wc_load_more_comments', array(&$this, 'load_more_comments'));
|
60 |
-
|
61 |
-
add_action('wp_ajax_wc_vote_via_ajax', array(&$this, 'vote_on_comment'));
|
62 |
-
add_action('wp_ajax_nopriv_wc_vote_via_ajax', array(&$this, 'vote_on_comment'));
|
63 |
-
|
64 |
-
add_action('wp_ajax_email_notification', array(&$this, 'email_notification'));
|
65 |
-
add_action('wp_ajax_nopriv_email_notification', array(&$this, 'email_notification'));
|
66 |
-
add_filter('preprocess_comment', array(&$this, 'wc_new_comment'));
|
67 |
-
|
68 |
-
add_action('wp_head', array(&$this, 'init_current_post_type'));
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* create table
|
73 |
-
* updates the comments to set comment type review if comment id is exists in comment meta table
|
74 |
-
*/
|
75 |
-
public function db_operations() {
|
76 |
-
$this->wc_db_helper->create_tables();
|
77 |
-
}
|
78 |
-
|
79 |
-
/*
|
80 |
-
* register new session
|
81 |
-
*/
|
82 |
-
|
83 |
-
public function register_session() {
|
84 |
-
if (!session_id()) {
|
85 |
-
@session_start();
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* change comment type
|
91 |
-
*/
|
92 |
-
public function wc_new_comment($commentdata) {
|
93 |
-
|
94 |
-
$commentdata['comment_type'] = isset($commentdata['comment_type']) ? $commentdata['comment_type'] : '';
|
95 |
-
$comment_post = get_post($commentdata['comment_post_ID']);
|
96 |
-
if ($comment_post->post_type === 'product' && $commentdata['comment_type'] != 'wpdiscuz') {
|
97 |
-
$com_parent = $commentdata['comment_parent'];
|
98 |
-
if ($com_parent != 0) {
|
99 |
-
$parent_comment = get_comment($com_parent);
|
100 |
-
if ($parent_comment->comment_type == 'wpdiscuz') {
|
101 |
-
$commentdata['comment_type'] = 'wpdiscuz';
|
102 |
-
} else {
|
103 |
-
$commentdata['comment_type'] = 'wpdiscuz_review';
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
$commentdata['comment_type'] = 'wpdiscuz_review';
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
return $commentdata;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* register options page for plugin
|
115 |
-
*/
|
116 |
-
public function add_plugin_options_page() {
|
117 |
-
if (function_exists('add_options_page')) {
|
118 |
-
add_menu_page('WpDiscuz', 'WpDiscuz', 'manage_options', 'wpdiscuz_options_page', array(&$this->wc_options, 'main_options_form'), plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/plugin-icon/plugin-icon-20.png'), 1246);
|
119 |
-
add_submenu_page('wpdiscuz_options_page', 'Phrases', 'Phrases', 'manage_options', 'wpdiscuz_phrases_page', array(&$this->wc_options, 'phrases_options_form'));
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Styles and scripts registration to use on front page
|
125 |
-
*/
|
126 |
-
public function front_end_styles_scripts() {
|
127 |
-
|
128 |
-
|
129 |
-
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
130 |
-
|
131 |
-
if (preg_match('/MSIE/i', $u_agent)) {
|
132 |
-
wp_enqueue_script('wc-html5-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/js/html5.js'), array('jquery'), '1.2', false);
|
133 |
-
|
134 |
-
wp_register_style('modal-css-ie', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box-ie.css'));
|
135 |
-
wp_enqueue_style('modal-css-ie');
|
136 |
-
}
|
137 |
-
|
138 |
-
wp_register_style('modal-box-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box.css'));
|
139 |
-
wp_enqueue_style('modal-box-css');
|
140 |
-
|
141 |
-
wp_enqueue_script('form-validator-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/validator.js'), array('jquery'), '1.0.0', false);
|
142 |
-
|
143 |
-
wp_register_style('validator-style', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/css/fv.css'));
|
144 |
-
wp_enqueue_style('validator-style');
|
145 |
-
|
146 |
-
wp_enqueue_script('wc-ajax-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/wc-ajax.js'), array('jquery'), '1.0.0', false);
|
147 |
-
wp_localize_script('wc-ajax-js', 'wc_ajax_obj', array('url' => admin_url('admin-ajax.php')));
|
148 |
-
|
149 |
-
wp_enqueue_script('wc-cookie-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/jquery.cookie.js'), array('jquery'), '1.4.1', false);
|
150 |
-
|
151 |
-
wp_register_style('wc-tooltipster-style', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/css/tooltipster.css'));
|
152 |
-
wp_enqueue_style('wc-tooltipster-style');
|
153 |
-
|
154 |
-
wp_enqueue_script('wc-tooltipster-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/js/jquery.tooltipster.min.js'), array('jquery'), '1.2', false);
|
155 |
-
|
156 |
-
wp_enqueue_script('autogrowtextarea-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/jquery.autogrowtextarea.min.js'), array('jquery'), '3.0', false);
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Scripts and styles registration on administration pages
|
161 |
-
*/
|
162 |
-
public function admin_page_styles_scripts() {
|
163 |
-
|
164 |
-
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
165 |
-
if (preg_match('/MSIE/i', $u_agent)) {
|
166 |
-
wp_register_style('modal-css-ie', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box-ie.css'));
|
167 |
-
wp_enqueue_style('modal-css-ie');
|
168 |
-
}
|
169 |
-
|
170 |
-
wp_register_style('modal-box-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box.css'));
|
171 |
-
wp_enqueue_style('modal-box-css');
|
172 |
-
|
173 |
-
wp_register_style('colorpicker-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/colorpicker/css/colorpicker.css'));
|
174 |
-
wp_enqueue_style('colorpicker-css');
|
175 |
-
|
176 |
-
wp_register_script('wc-colorpicker-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/colorpicker/js/colorpicker.js'), array('jquery'), '2.0.0.9', false);
|
177 |
-
wp_enqueue_script('wc-colorpicker-js');
|
178 |
-
|
179 |
-
wp_register_style('wc-options-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/css/options-css.css'));
|
180 |
-
wp_enqueue_style('wc-options-css');
|
181 |
-
|
182 |
-
wp_register_script('wc-option-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/options-js.js'), array('jquery'));
|
183 |
-
wp_enqueue_script('wc-option-js');
|
184 |
-
|
185 |
-
wp_register_script('wc-scripts-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/wc-scripts.js'), array('jquery'));
|
186 |
-
wp_enqueue_script('wc-scripts-js');
|
187 |
-
}
|
188 |
-
|
189 |
-
/*
|
190 |
-
* post comment via ajax
|
191 |
-
*/
|
192 |
-
|
193 |
-
public function comment_submit_via_ajax() {
|
194 |
-
|
195 |
-
$message_array = array();
|
196 |
-
$comment_post_ID = intval(filter_input(INPUT_POST, 'comment_post_ID'));
|
197 |
-
$comment_parent = intval(filter_input(INPUT_POST, 'comment_parent'));
|
198 |
-
if (!$this->wc_options->
|
199 |
-
if (!is_user_logged_in()) {
|
200 |
-
$sess_captcha = $_SESSION['wc_captcha'][$comment_post_ID . '-' . $comment_parent];
|
201 |
-
$captcha = filter_input(INPUT_POST, 'captcha');
|
202 |
-
if (md5(strtolower($captcha)) !== $sess_captcha) {
|
203 |
-
$message_array['code'] = -1;
|
204 |
-
$message_array['message'] = $this->wc_options->
|
205 |
-
echo json_encode($message_array);
|
206 |
-
exit;
|
207 |
-
}
|
208 |
-
}
|
209 |
-
}
|
210 |
-
$comment = filter_input(INPUT_POST, 'comment');
|
211 |
-
|
212 |
-
if (is_user_logged_in()) {
|
213 |
-
$user_id = get_current_user_id();
|
214 |
-
$user = get_userdata($user_id);
|
215 |
-
$name = $user->display_name;
|
216 |
-
$email = $user->user_email;
|
217 |
-
$user_url = $user->user_url;
|
218 |
-
} else {
|
219 |
-
$name = filter_input(INPUT_POST, 'name');
|
220 |
-
$email = filter_input(INPUT_POST, 'email');
|
221 |
-
$user_id = 0;
|
222 |
-
$user_url = '';
|
223 |
-
}
|
224 |
-
|
225 |
-
$comment = preg_replace('|[\n]+|', '<br />', wp_kses($comment, 'default'));
|
226 |
-
|
227 |
-
if ($name && filter_var($email, FILTER_VALIDATE_EMAIL) && $comment && filter_var($comment_post_ID)) {
|
228 |
-
|
229 |
-
$held_moderate = 1;
|
230 |
-
if ($this->wc_options->
|
231 |
-
$held_moderate = 0;
|
232 |
-
}
|
233 |
-
|
234 |
-
$new_commentdata = array(
|
235 |
-
'user_id' => $user_id,
|
236 |
-
'comment_post_ID' => $comment_post_ID,
|
237 |
-
'comment_parent' => $comment_parent,
|
238 |
-
'comment_author' => $name,
|
239 |
-
'comment_author_email' => $email,
|
240 |
-
'comment_content' => $comment,
|
241 |
-
'comment_author_url' => $user_url,
|
242 |
-
'comment_approved' => $held_moderate
|
243 |
-
);
|
244 |
-
if (!$held_moderate) {
|
245 |
-
$new_comment_id = wp_new_comment($new_commentdata);
|
246 |
-
$new_inserted_comment = get_comment($new_comment_id);
|
247 |
-
if ($new_inserted_comment->comment_approved) {
|
248 |
-
$held_moderate = 1;
|
249 |
-
}
|
250 |
-
} else {
|
251 |
-
$new_comment_id = wp_insert_comment($new_commentdata);
|
252 |
-
}
|
253 |
-
$new_comment = new WC_Comment(get_comment($new_comment_id, OBJECT));
|
254 |
-
|
255 |
-
if (!$held_moderate) {
|
256 |
-
$message_array['code'] = -2;
|
257 |
-
$message_array['message'] = $this->wc_options->
|
258 |
-
} else {
|
259 |
-
$message_array['code'] = 1;
|
260 |
-
$message_array['message'] = $this->comment_tpl_builder->get_comment_template($new_comment);
|
261 |
-
}
|
262 |
-
$message_array['wc_new_comment_id'] = $new_comment_id;
|
263 |
-
} else {
|
264 |
-
$message_array['code'] = -1;
|
265 |
-
$message_array['wc_new_comment_id'] = -1;
|
266 |
-
$message_array['message'] = $this->wc_options->
|
267 |
-
}
|
268 |
-
echo json_encode($message_array);
|
269 |
-
exit;
|
270 |
-
}
|
271 |
-
|
272 |
-
/**
|
273 |
-
* notify on new comments
|
274 |
-
*/
|
275 |
-
public function email_notification() {
|
276 |
-
|
277 |
-
$wc_new_comment_id = isset($_POST['wc_new_comment_id']) ? intval($_POST['wc_new_comment_id']) : -1;
|
278 |
-
$wc_comment_parent = isset($_POST['wc_comment_parent']) ? intval($_POST['wc_comment_parent']) : -1;
|
279 |
-
if ($wc_new_comment_id !== -1 && $wc_comment_parent !== -1) {
|
280 |
-
if ($this->wc_options->
|
281 |
-
wp_notify_postauthor($wc_new_comment_id);
|
282 |
-
}
|
283 |
-
if ($this->wc_options->
|
284 |
-
$wc_new_comment_content = get_comment($wc_new_comment_id)->comment_content;
|
285 |
-
$comment = get_comment($wc_comment_parent);
|
286 |
-
$to = $comment->comment_author_email;
|
287 |
-
$subject = $this->wc_options->
|
288 |
-
$permalink = get_comment_link($wc_comment_parent);
|
289 |
-
$message = $this->wc_options->
|
290 |
-
$message .= "<br/><br/><a href='$permalink'>$permalink</a>";
|
291 |
-
$message .= "<br/><br/>$wc_new_comment_content";
|
292 |
-
$headers = array();
|
293 |
-
$headers[] = "Content-Type: text/html; charset=UTF-8";
|
294 |
-
$headers[] = "From: " . get_bloginfo('name') . "\r\n";
|
295 |
-
wp_mail($to, $subject, $message, $headers);
|
296 |
-
}
|
297 |
-
}
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* vote on comment via ajax
|
302 |
-
*/
|
303 |
-
public function vote_on_comment() {
|
304 |
-
$messageArray = array();
|
305 |
-
$messageArray['code'] = -1;
|
306 |
-
$comment_id = '';
|
307 |
-
if (!is_user_logged_in()) {
|
308 |
-
$messageArray['message'] = $this->wc_options->
|
309 |
-
echo json_encode($messageArray);
|
310 |
-
exit();
|
311 |
-
}
|
312 |
-
if (isset($_POST['comment_ID']) && isset($_POST['vote_type']) && intval($_POST['comment_ID']) && intval($_POST['vote_type'])) {
|
313 |
-
$comment_id = $_POST['comment_ID'];
|
314 |
-
$user_id = get_current_user_id();
|
315 |
-
$vote_type = $_POST['vote_type'];
|
316 |
-
|
317 |
-
$is_user_voted = $this->wc_db_helper->is_user_voted($user_id, $comment_id);
|
318 |
-
$comment = get_comment($comment_id);
|
319 |
-
if ($comment->user_id == $user_id) {
|
320 |
-
$messageArray['message'] = $this->wc_options->
|
321 |
-
echo json_encode($messageArray);
|
322 |
-
exit();
|
323 |
-
}
|
324 |
-
|
325 |
-
if ($is_user_voted != '') {
|
326 |
-
$vote = intval($is_user_voted) + intval($vote_type);
|
327 |
-
if ($vote >= -1 && $vote <= 1) {
|
328 |
-
$this->wc_db_helper->update_vote_type($user_id, $comment_id, $vote);
|
329 |
-
$vote_count = intval(get_comment_meta($comment_id, 'wpdiscuz_votes', true)) + intval($vote_type);
|
330 |
-
update_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_count);
|
331 |
-
$messageArray['code'] = 1;
|
332 |
-
$messageArray['message'] = $this->wc_options->
|
333 |
-
} else {
|
334 |
-
$messageArray['message'] = $this->wc_options->
|
335 |
-
}
|
336 |
-
} else {
|
337 |
-
$this->wc_db_helper->add_vote_type($user_id, $comment_id, $vote_type);
|
338 |
-
$vote_count = get_comment_meta($comment_id, 'wpdiscuz_votes', true);
|
339 |
-
if ($vote_count == '') {
|
340 |
-
add_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_type);
|
341 |
-
} else {
|
342 |
-
$vote_count = intval($vote_count) + intval($vote_type);
|
343 |
-
update_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_count);
|
344 |
-
}
|
345 |
-
$messageArray['code'] = 1;
|
346 |
-
$messageArray['message'] = $this->wc_options->
|
347 |
-
}
|
348 |
-
} else {
|
349 |
-
$messageArray['message'] = $this->wc_options->
|
350 |
-
}
|
351 |
-
|
352 |
-
echo json_encode($messageArray);
|
353 |
-
exit();
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* get comments by comment type
|
358 |
-
*/
|
359 |
-
public function get_wp_comments($comments_offset, $post_id = null) {
|
360 |
-
global $post;
|
361 |
-
|
362 |
-
if (!$post_id) {
|
363 |
-
$post_id = $post->ID;
|
364 |
-
}
|
365 |
-
$wc_comment_count = $this->wc_options->
|
366 |
-
|
367 |
-
$comm_list_args = array(
|
368 |
-
'callback' => array(&$this, 'wc_comment_callback'),
|
369 |
-
'style' => 'div',
|
370 |
-
'per_page' => $comments_offset * $wc_comment_count,
|
371 |
-
'max_depth' => 2
|
372 |
-
);
|
373 |
-
|
374 |
-
$comments = get_comments(
|
375 |
-
array('post_id' => $post_id, 'status' => 'approve')
|
376 |
-
);
|
377 |
-
|
378 |
-
$wc_comments = $this->init_wc_comments($comments);
|
379 |
-
wp_list_comments($comm_list_args, $wc_comments);
|
380 |
-
return $this->wc_parent_comments_count;
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* load more comments by offset
|
385 |
-
*/
|
386 |
-
public function load_more_comments() {
|
387 |
-
$c_offset = intval($_POST['comments_offset']);
|
388 |
-
$c_offset = ($c_offset) ? $c_offset : 1;
|
389 |
-
$post_id = intval($_POST['wc_post_id']);
|
390 |
-
if ($c_offset && $post_id) {
|
391 |
-
$this->get_wp_comments($c_offset, $post_id);
|
392 |
-
}
|
393 |
-
exit();
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* initialize WPC comments
|
398 |
-
*/
|
399 |
-
public function init_wc_comments($comments) {
|
400 |
-
$wc_comments = array();
|
401 |
-
if ($comments) {
|
402 |
-
foreach ($comments as $comment) {
|
403 |
-
if (!$comment->comment_parent) {
|
404 |
-
$this->wc_parent_comments_count++;
|
405 |
-
}
|
406 |
-
$wc_comments[] = new WC_Comment($comment);
|
407 |
-
}
|
408 |
-
}
|
409 |
-
return $wc_comments;
|
410 |
-
}
|
411 |
-
|
412 |
-
public function wc_comment_callback($comment, $args, $depth) {
|
413 |
-
$GLOBALS['comment'] = $comment;
|
414 |
-
echo $this->comment_tpl_builder->get_comment_template($comment);
|
415 |
-
}
|
416 |
-
|
417 |
-
public function is_guest_can_comment() {
|
418 |
-
$user_can_comment = TRUE;
|
419 |
-
if ($this->wc_options->
|
420 |
-
if (!is_user_logged_in()) {
|
421 |
-
$user_can_comment = FALSE;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
return $user_can_comment;
|
425 |
-
}
|
426 |
-
|
427 |
-
public function init_plugin_dir_name() {
|
428 |
-
$plugin_dir_path = plugin_dir_path(__FILE__);
|
429 |
-
$path_array = array_values(array_filter(explode(DIRECTORY_SEPARATOR, $plugin_dir_path)));
|
430 |
-
$path_last_part = $path_array[count($path_array) - 1];
|
431 |
-
WC_Core::$PLUGIN_DIRECTORY = untrailingslashit($path_last_part);
|
432 |
-
}
|
433 |
-
|
434 |
-
public function init_current_post_type() {
|
435 |
-
global $post;
|
436 |
-
if (in_array($post->post_type, $this->wc_options->
|
437 |
-
add_filter('comments_template', array(&$this, 'remove_comments_template_on_pages'), 1);
|
438 |
-
}
|
439 |
-
}
|
440 |
-
|
441 |
-
function remove_comments_template_on_pages($file) {
|
442 |
-
$file = dirname(__FILE__) . '/comment-form/form.php';
|
443 |
-
return $file;
|
444 |
-
}
|
445 |
-
|
446 |
-
}
|
447 |
-
|
448 |
-
$wc_core = new WC_Core();
|
449 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: WpDiscuz - Wordpress Comments
|
5 |
+
Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
6 |
+
Version: 1.0.1
|
7 |
+
Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
|
8 |
+
Author URI: http://www.gvectors.com/
|
9 |
+
Plugin URI: http://www.gvectors.com/wpdiscuz/
|
10 |
+
*/
|
11 |
+
|
12 |
+
include_once 'wc-options.php';
|
13 |
+
include_once 'helper/wc-helper.php';
|
14 |
+
include_once 'includes/wc-db-helper.php';
|
15 |
+
include_once 'comment-form/tpl-comment.php';
|
16 |
+
include_once 'dto/wc-comment.php';
|
17 |
+
include_once 'wc-css.php';
|
18 |
+
|
19 |
+
class WC_Core {
|
20 |
+
|
21 |
+
public $wc_options;
|
22 |
+
public $comment_types;
|
23 |
+
public $reviews_count;
|
24 |
+
public $wc_db_helper;
|
25 |
+
public $wc_helper;
|
26 |
+
public $comment_tpl_builder;
|
27 |
+
public $wc_css;
|
28 |
+
public $wc_parent_comments_count;
|
29 |
+
public $commetns_count = 0;
|
30 |
+
public $comment_count_text;
|
31 |
+
public static $PLUGIN_DIRECTORY;
|
32 |
+
public $post_type;
|
33 |
+
|
34 |
+
function __construct() {
|
35 |
+
add_action('init', array(&$this, 'init_plugin_dir_name'), 1);
|
36 |
+
|
37 |
+
$this->wc_options = new WC_Options();
|
38 |
+
$this->wc_db_helper = $this->wc_options->wc_db_helper;
|
39 |
+
|
40 |
+
register_activation_hook(__FILE__, array($this, 'db_operations'));
|
41 |
+
|
42 |
+
|
43 |
+
$this->wc_helper = new WC_Helper($this->wc_options->wc_options_serialized);
|
44 |
+
$this->wc_css = new WC_CSS($this->wc_options);
|
45 |
+
$this->comment_tpl_builder = new WC_Comment_Template_Builder($this->wc_helper, $this->wc_db_helper, $this->wc_options);
|
46 |
+
|
47 |
+
add_action('init', array(&$this, 'register_session'), 2);
|
48 |
+
|
49 |
+
add_action('admin_enqueue_scripts', array(&$this, 'admin_page_styles_scripts'), 2315);
|
50 |
+
add_action('wp_enqueue_scripts', array(&$this, 'front_end_styles_scripts'));
|
51 |
+
add_action('wp_enqueue_scripts', array(&$this->wc_css, 'init_styles'));
|
52 |
+
|
53 |
+
add_action('admin_menu', array(&$this, 'add_plugin_options_page'), -191);
|
54 |
+
|
55 |
+
add_action('wp_ajax_wc_comms_via_ajax', array(&$this, 'comment_submit_via_ajax'));
|
56 |
+
add_action('wp_ajax_nopriv_wc_comms_via_ajax', array(&$this, 'comment_submit_via_ajax'));
|
57 |
+
|
58 |
+
add_action('wp_ajax_wc_load_more_comments', array(&$this, 'load_more_comments'));
|
59 |
+
add_action('wp_ajax_nopriv_wc_load_more_comments', array(&$this, 'load_more_comments'));
|
60 |
+
|
61 |
+
add_action('wp_ajax_wc_vote_via_ajax', array(&$this, 'vote_on_comment'));
|
62 |
+
add_action('wp_ajax_nopriv_wc_vote_via_ajax', array(&$this, 'vote_on_comment'));
|
63 |
+
|
64 |
+
add_action('wp_ajax_email_notification', array(&$this, 'email_notification'));
|
65 |
+
add_action('wp_ajax_nopriv_email_notification', array(&$this, 'email_notification'));
|
66 |
+
add_filter('preprocess_comment', array(&$this, 'wc_new_comment'));
|
67 |
+
|
68 |
+
add_action('wp_head', array(&$this, 'init_current_post_type'));
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* create table
|
73 |
+
* updates the comments to set comment type review if comment id is exists in comment meta table
|
74 |
+
*/
|
75 |
+
public function db_operations() {
|
76 |
+
$this->wc_db_helper->create_tables();
|
77 |
+
}
|
78 |
+
|
79 |
+
/*
|
80 |
+
* register new session
|
81 |
+
*/
|
82 |
+
|
83 |
+
public function register_session() {
|
84 |
+
if (!session_id()) {
|
85 |
+
@session_start();
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* change comment type
|
91 |
+
*/
|
92 |
+
public function wc_new_comment($commentdata) {
|
93 |
+
|
94 |
+
$commentdata['comment_type'] = isset($commentdata['comment_type']) ? $commentdata['comment_type'] : '';
|
95 |
+
$comment_post = get_post($commentdata['comment_post_ID']);
|
96 |
+
if ($comment_post->post_type === 'product' && $commentdata['comment_type'] != 'wpdiscuz') {
|
97 |
+
$com_parent = $commentdata['comment_parent'];
|
98 |
+
if ($com_parent != 0) {
|
99 |
+
$parent_comment = get_comment($com_parent);
|
100 |
+
if ($parent_comment->comment_type == 'wpdiscuz') {
|
101 |
+
$commentdata['comment_type'] = 'wpdiscuz';
|
102 |
+
} else {
|
103 |
+
$commentdata['comment_type'] = 'wpdiscuz_review';
|
104 |
+
}
|
105 |
+
} else {
|
106 |
+
$commentdata['comment_type'] = 'wpdiscuz_review';
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
return $commentdata;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* register options page for plugin
|
115 |
+
*/
|
116 |
+
public function add_plugin_options_page() {
|
117 |
+
if (function_exists('add_options_page')) {
|
118 |
+
add_menu_page('WpDiscuz', 'WpDiscuz', 'manage_options', 'wpdiscuz_options_page', array(&$this->wc_options, 'main_options_form'), plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/plugin-icon/plugin-icon-20.png'), 1246);
|
119 |
+
add_submenu_page('wpdiscuz_options_page', 'Phrases', 'Phrases', 'manage_options', 'wpdiscuz_phrases_page', array(&$this->wc_options, 'phrases_options_form'));
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Styles and scripts registration to use on front page
|
125 |
+
*/
|
126 |
+
public function front_end_styles_scripts() {
|
127 |
+
|
128 |
+
|
129 |
+
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
130 |
+
|
131 |
+
if (preg_match('/MSIE/i', $u_agent)) {
|
132 |
+
wp_enqueue_script('wc-html5-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/js/html5.js'), array('jquery'), '1.2', false);
|
133 |
+
|
134 |
+
wp_register_style('modal-css-ie', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box-ie.css'));
|
135 |
+
wp_enqueue_style('modal-css-ie');
|
136 |
+
}
|
137 |
+
|
138 |
+
wp_register_style('modal-box-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box.css'));
|
139 |
+
wp_enqueue_style('modal-box-css');
|
140 |
+
|
141 |
+
wp_enqueue_script('form-validator-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/validator.js'), array('jquery'), '1.0.0', false);
|
142 |
+
|
143 |
+
wp_register_style('validator-style', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/css/fv.css'));
|
144 |
+
wp_enqueue_style('validator-style');
|
145 |
+
|
146 |
+
wp_enqueue_script('wc-ajax-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/wc-ajax.js'), array('jquery'), '1.0.0', false);
|
147 |
+
wp_localize_script('wc-ajax-js', 'wc_ajax_obj', array('url' => admin_url('admin-ajax.php')));
|
148 |
+
|
149 |
+
wp_enqueue_script('wc-cookie-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/jquery.cookie.js'), array('jquery'), '1.4.1', false);
|
150 |
+
|
151 |
+
wp_register_style('wc-tooltipster-style', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/css/tooltipster.css'));
|
152 |
+
wp_enqueue_style('wc-tooltipster-style');
|
153 |
+
|
154 |
+
wp_enqueue_script('wc-tooltipster-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/tooltipster/js/jquery.tooltipster.min.js'), array('jquery'), '1.2', false);
|
155 |
+
|
156 |
+
wp_enqueue_script('autogrowtextarea-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/jquery.autogrowtextarea.min.js'), array('jquery'), '3.0', false);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Scripts and styles registration on administration pages
|
161 |
+
*/
|
162 |
+
public function admin_page_styles_scripts() {
|
163 |
+
|
164 |
+
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
165 |
+
if (preg_match('/MSIE/i', $u_agent)) {
|
166 |
+
wp_register_style('modal-css-ie', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box-ie.css'));
|
167 |
+
wp_enqueue_style('modal-css-ie');
|
168 |
+
}
|
169 |
+
|
170 |
+
wp_register_style('modal-box-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/modal-box/modal-box.css'));
|
171 |
+
wp_enqueue_style('modal-box-css');
|
172 |
+
|
173 |
+
wp_register_style('colorpicker-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/colorpicker/css/colorpicker.css'));
|
174 |
+
wp_enqueue_style('colorpicker-css');
|
175 |
+
|
176 |
+
wp_register_script('wc-colorpicker-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/third-party/colorpicker/js/colorpicker.js'), array('jquery'), '2.0.0.9', false);
|
177 |
+
wp_enqueue_script('wc-colorpicker-js');
|
178 |
+
|
179 |
+
wp_register_style('wc-options-css', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/css/options-css.css'));
|
180 |
+
wp_enqueue_style('wc-options-css');
|
181 |
+
|
182 |
+
wp_register_script('wc-option-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/options-js.js'), array('jquery'));
|
183 |
+
wp_enqueue_script('wc-option-js');
|
184 |
+
|
185 |
+
wp_register_script('wc-scripts-js', plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/js/wc-scripts.js'), array('jquery'));
|
186 |
+
wp_enqueue_script('wc-scripts-js');
|
187 |
+
}
|
188 |
+
|
189 |
+
/*
|
190 |
+
* post comment via ajax
|
191 |
+
*/
|
192 |
+
|
193 |
+
public function comment_submit_via_ajax() {
|
194 |
+
|
195 |
+
$message_array = array();
|
196 |
+
$comment_post_ID = intval(filter_input(INPUT_POST, 'comment_post_ID'));
|
197 |
+
$comment_parent = intval(filter_input(INPUT_POST, 'comment_parent'));
|
198 |
+
if (!$this->wc_options->wc_options_serialized->wc_captcha_show_hide) {
|
199 |
+
if (!is_user_logged_in()) {
|
200 |
+
$sess_captcha = $_SESSION['wc_captcha'][$comment_post_ID . '-' . $comment_parent];
|
201 |
+
$captcha = filter_input(INPUT_POST, 'captcha');
|
202 |
+
if (md5(strtolower($captcha)) !== $sess_captcha) {
|
203 |
+
$message_array['code'] = -1;
|
204 |
+
$message_array['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_invalid_captcha'];
|
205 |
+
echo json_encode($message_array);
|
206 |
+
exit;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
$comment = filter_input(INPUT_POST, 'comment');
|
211 |
+
|
212 |
+
if (is_user_logged_in()) {
|
213 |
+
$user_id = get_current_user_id();
|
214 |
+
$user = get_userdata($user_id);
|
215 |
+
$name = $user->display_name;
|
216 |
+
$email = $user->user_email;
|
217 |
+
$user_url = $user->user_url;
|
218 |
+
} else {
|
219 |
+
$name = filter_input(INPUT_POST, 'name');
|
220 |
+
$email = filter_input(INPUT_POST, 'email');
|
221 |
+
$user_id = 0;
|
222 |
+
$user_url = '';
|
223 |
+
}
|
224 |
+
|
225 |
+
$comment = preg_replace('|[\n]+|', '<br />', wp_kses($comment, 'default'));
|
226 |
+
|
227 |
+
if ($name && filter_var($email, FILTER_VALIDATE_EMAIL) && $comment && filter_var($comment_post_ID)) {
|
228 |
+
|
229 |
+
$held_moderate = 1;
|
230 |
+
if ($this->wc_options->wc_options_serialized->wc_held_comment_to_moderate) {
|
231 |
+
$held_moderate = 0;
|
232 |
+
}
|
233 |
+
|
234 |
+
$new_commentdata = array(
|
235 |
+
'user_id' => $user_id,
|
236 |
+
'comment_post_ID' => $comment_post_ID,
|
237 |
+
'comment_parent' => $comment_parent,
|
238 |
+
'comment_author' => $name,
|
239 |
+
'comment_author_email' => $email,
|
240 |
+
'comment_content' => $comment,
|
241 |
+
'comment_author_url' => $user_url,
|
242 |
+
'comment_approved' => $held_moderate
|
243 |
+
);
|
244 |
+
if (!$held_moderate) {
|
245 |
+
$new_comment_id = wp_new_comment($new_commentdata);
|
246 |
+
$new_inserted_comment = get_comment($new_comment_id);
|
247 |
+
if ($new_inserted_comment->comment_approved) {
|
248 |
+
$held_moderate = 1;
|
249 |
+
}
|
250 |
+
} else {
|
251 |
+
$new_comment_id = wp_insert_comment($new_commentdata);
|
252 |
+
}
|
253 |
+
$new_comment = new WC_Comment(get_comment($new_comment_id, OBJECT));
|
254 |
+
|
255 |
+
if (!$held_moderate) {
|
256 |
+
$message_array['code'] = -2;
|
257 |
+
$message_array['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_held_for_moderate'];
|
258 |
+
} else {
|
259 |
+
$message_array['code'] = 1;
|
260 |
+
$message_array['message'] = $this->comment_tpl_builder->get_comment_template($new_comment);
|
261 |
+
}
|
262 |
+
$message_array['wc_new_comment_id'] = $new_comment_id;
|
263 |
+
} else {
|
264 |
+
$message_array['code'] = -1;
|
265 |
+
$message_array['wc_new_comment_id'] = -1;
|
266 |
+
$message_array['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_invalid_field'];
|
267 |
+
}
|
268 |
+
echo json_encode($message_array);
|
269 |
+
exit;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* notify on new comments
|
274 |
+
*/
|
275 |
+
public function email_notification() {
|
276 |
+
|
277 |
+
$wc_new_comment_id = isset($_POST['wc_new_comment_id']) ? intval($_POST['wc_new_comment_id']) : -1;
|
278 |
+
$wc_comment_parent = isset($_POST['wc_comment_parent']) ? intval($_POST['wc_comment_parent']) : -1;
|
279 |
+
if ($wc_new_comment_id !== -1 && $wc_comment_parent !== -1) {
|
280 |
+
if ($this->wc_options->wc_options_serialized->wc_notify_moderator) {
|
281 |
+
wp_notify_postauthor($wc_new_comment_id);
|
282 |
+
}
|
283 |
+
if ($this->wc_options->wc_options_serialized->wc_notify_comment_author && $wc_comment_parent) {
|
284 |
+
$wc_new_comment_content = get_comment($wc_new_comment_id)->comment_content;
|
285 |
+
$comment = get_comment($wc_comment_parent);
|
286 |
+
$to = $comment->comment_author_email;
|
287 |
+
$subject = $this->wc_options->wc_options_serialized->wc_phrases['wc_email_subject'];
|
288 |
+
$permalink = get_comment_link($wc_comment_parent);
|
289 |
+
$message = $this->wc_options->wc_options_serialized->wc_phrases['wc_email_message'];
|
290 |
+
$message .= "<br/><br/><a href='$permalink'>$permalink</a>";
|
291 |
+
$message .= "<br/><br/>$wc_new_comment_content";
|
292 |
+
$headers = array();
|
293 |
+
$headers[] = "Content-Type: text/html; charset=UTF-8";
|
294 |
+
$headers[] = "From: " . get_bloginfo('name') . "\r\n";
|
295 |
+
wp_mail($to, $subject, $message, $headers);
|
296 |
+
}
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* vote on comment via ajax
|
302 |
+
*/
|
303 |
+
public function vote_on_comment() {
|
304 |
+
$messageArray = array();
|
305 |
+
$messageArray['code'] = -1;
|
306 |
+
$comment_id = '';
|
307 |
+
if (!is_user_logged_in()) {
|
308 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_login_to_vote'];
|
309 |
+
echo json_encode($messageArray);
|
310 |
+
exit();
|
311 |
+
}
|
312 |
+
if (isset($_POST['comment_ID']) && isset($_POST['vote_type']) && intval($_POST['comment_ID']) && intval($_POST['vote_type'])) {
|
313 |
+
$comment_id = $_POST['comment_ID'];
|
314 |
+
$user_id = get_current_user_id();
|
315 |
+
$vote_type = $_POST['vote_type'];
|
316 |
+
|
317 |
+
$is_user_voted = $this->wc_db_helper->is_user_voted($user_id, $comment_id);
|
318 |
+
$comment = get_comment($comment_id);
|
319 |
+
if ($comment->user_id == $user_id) {
|
320 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_self_vote'];
|
321 |
+
echo json_encode($messageArray);
|
322 |
+
exit();
|
323 |
+
}
|
324 |
+
|
325 |
+
if ($is_user_voted != '') {
|
326 |
+
$vote = intval($is_user_voted) + intval($vote_type);
|
327 |
+
if ($vote >= -1 && $vote <= 1) {
|
328 |
+
$this->wc_db_helper->update_vote_type($user_id, $comment_id, $vote);
|
329 |
+
$vote_count = intval(get_comment_meta($comment_id, 'wpdiscuz_votes', true)) + intval($vote_type);
|
330 |
+
update_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_count);
|
331 |
+
$messageArray['code'] = 1;
|
332 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_vote_counted'];
|
333 |
+
} else {
|
334 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_vote_only_one_time'];
|
335 |
+
}
|
336 |
+
} else {
|
337 |
+
$this->wc_db_helper->add_vote_type($user_id, $comment_id, $vote_type);
|
338 |
+
$vote_count = get_comment_meta($comment_id, 'wpdiscuz_votes', true);
|
339 |
+
if ($vote_count == '') {
|
340 |
+
add_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_type);
|
341 |
+
} else {
|
342 |
+
$vote_count = intval($vote_count) + intval($vote_type);
|
343 |
+
update_comment_meta($comment_id, 'wpdiscuz_votes', '' . $vote_count);
|
344 |
+
}
|
345 |
+
$messageArray['code'] = 1;
|
346 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_vote_counted'];
|
347 |
+
}
|
348 |
+
} else {
|
349 |
+
$messageArray['message'] = $this->wc_options->wc_options_serialized->wc_phrases['wc_voting_error'];
|
350 |
+
}
|
351 |
+
|
352 |
+
echo json_encode($messageArray);
|
353 |
+
exit();
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* get comments by comment type
|
358 |
+
*/
|
359 |
+
public function get_wp_comments($comments_offset, $post_id = null) {
|
360 |
+
global $post;
|
361 |
+
|
362 |
+
if (!$post_id) {
|
363 |
+
$post_id = $post->ID;
|
364 |
+
}
|
365 |
+
$wc_comment_count = $this->wc_options->wc_options_serialized->wc_comment_count;
|
366 |
+
|
367 |
+
$comm_list_args = array(
|
368 |
+
'callback' => array(&$this, 'wc_comment_callback'),
|
369 |
+
'style' => 'div',
|
370 |
+
'per_page' => $comments_offset * $wc_comment_count,
|
371 |
+
'max_depth' => 2
|
372 |
+
);
|
373 |
+
|
374 |
+
$comments = get_comments(
|
375 |
+
array('post_id' => $post_id, 'status' => 'approve')
|
376 |
+
);
|
377 |
+
|
378 |
+
$wc_comments = $this->init_wc_comments($comments);
|
379 |
+
wp_list_comments($comm_list_args, $wc_comments);
|
380 |
+
return $this->wc_parent_comments_count;
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* load more comments by offset
|
385 |
+
*/
|
386 |
+
public function load_more_comments() {
|
387 |
+
$c_offset = intval($_POST['comments_offset']);
|
388 |
+
$c_offset = ($c_offset) ? $c_offset : 1;
|
389 |
+
$post_id = intval($_POST['wc_post_id']);
|
390 |
+
if ($c_offset && $post_id) {
|
391 |
+
$this->get_wp_comments($c_offset, $post_id);
|
392 |
+
}
|
393 |
+
exit();
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* initialize WPC comments
|
398 |
+
*/
|
399 |
+
public function init_wc_comments($comments) {
|
400 |
+
$wc_comments = array();
|
401 |
+
if ($comments) {
|
402 |
+
foreach ($comments as $comment) {
|
403 |
+
if (!$comment->comment_parent) {
|
404 |
+
$this->wc_parent_comments_count++;
|
405 |
+
}
|
406 |
+
$wc_comments[] = new WC_Comment($comment);
|
407 |
+
}
|
408 |
+
}
|
409 |
+
return $wc_comments;
|
410 |
+
}
|
411 |
+
|
412 |
+
public function wc_comment_callback($comment, $args, $depth) {
|
413 |
+
$GLOBALS['comment'] = $comment;
|
414 |
+
echo $this->comment_tpl_builder->get_comment_template($comment);
|
415 |
+
}
|
416 |
+
|
417 |
+
public function is_guest_can_comment() {
|
418 |
+
$user_can_comment = TRUE;
|
419 |
+
if ($this->wc_options->wc_options_serialized->wc_user_must_be_registered) {
|
420 |
+
if (!is_user_logged_in()) {
|
421 |
+
$user_can_comment = FALSE;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
return $user_can_comment;
|
425 |
+
}
|
426 |
+
|
427 |
+
public function init_plugin_dir_name() {
|
428 |
+
$plugin_dir_path = plugin_dir_path(__FILE__);
|
429 |
+
$path_array = array_values(array_filter(explode(DIRECTORY_SEPARATOR, $plugin_dir_path)));
|
430 |
+
$path_last_part = $path_array[count($path_array) - 1];
|
431 |
+
WC_Core::$PLUGIN_DIRECTORY = untrailingslashit($path_last_part);
|
432 |
+
}
|
433 |
+
|
434 |
+
public function init_current_post_type() {
|
435 |
+
global $post;
|
436 |
+
if (in_array($post->post_type, $this->wc_options->wc_options_serialized->wc_post_types) && comments_open($post->ID)) {
|
437 |
+
add_filter('comments_template', array(&$this, 'remove_comments_template_on_pages'), 1);
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
function remove_comments_template_on_pages($file) {
|
442 |
+
$file = dirname(__FILE__) . '/comment-form/form.php';
|
443 |
+
return $file;
|
444 |
+
}
|
445 |
+
|
446 |
+
}
|
447 |
+
|
448 |
+
$wc_core = new WC_Core();
|
449 |
?>
|