Version Description
- Added : Option to sort comments by comment date with ascending or descending order
Download this release
Release Info
Developer | AdvancedCoding |
Plugin | Comments – wpDiscuz |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- comment-form/form.php +1 -1
- files/css/options-css.css +3 -0
- files/third-party/simple-tabs/css/simple-tabs.css +52 -0
- files/third-party/simple-tabs/js/simple-tabs.js +10 -0
- options-templates/options-template-main.php +17 -0
- readme.txt +15 -3
- wc-css.php +3 -4
- wc-options-serialize.php +35 -21
- wc-options.php +61 -60
- wc.php +5 -6
comment-form/form.php
CHANGED
@@ -45,7 +45,7 @@ $header_text .= ' "' . get_the_title($post) . '"';
|
|
45 |
?>
|
46 |
<div style="clear:both"></div>
|
47 |
<div class="comments-area">
|
48 |
-
<h3
|
49 |
<div id="wpcomm">
|
50 |
<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>
|
51 |
<div class="wc-form-wrapper">
|
45 |
?>
|
46 |
<div style="clear:both"></div>
|
47 |
<div class="comments-area">
|
48 |
+
<h3 id="wc-comment-header"><?php echo $wc_core->wc_options->wc_options_serialized->wc_phrases['wc_leave_a_reply_text']; ?></h3>
|
49 |
<div id="wpcomm">
|
50 |
<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>
|
51 |
<div class="wc-form-wrapper">
|
files/css/options-css.css
CHANGED
@@ -8,3 +8,6 @@
|
|
8 |
width: 300px;
|
9 |
}
|
10 |
|
|
|
|
|
|
8 |
width: 300px;
|
9 |
}
|
10 |
|
11 |
+
.comment_list_order label {
|
12 |
+
float: left;
|
13 |
+
}
|
files/third-party/simple-tabs/css/simple-tabs.css
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.tabs-menu {
|
2 |
+
height: 30px;
|
3 |
+
float: left;
|
4 |
+
clear: both;
|
5 |
+
}
|
6 |
+
|
7 |
+
.tabs-menu li {
|
8 |
+
height: 30px;
|
9 |
+
line-height: 30px;
|
10 |
+
float: left;
|
11 |
+
margin-right: 10px;
|
12 |
+
background-color: #ccc;
|
13 |
+
border-top: 1px solid #d4d4d1;
|
14 |
+
border-right: 1px solid #d4d4d1;
|
15 |
+
border-left: 1px solid #d4d4d1;
|
16 |
+
}
|
17 |
+
|
18 |
+
.tabs-menu li.current {
|
19 |
+
position: relative;
|
20 |
+
background-color: #fff;
|
21 |
+
border-bottom: 1px solid #fff;
|
22 |
+
z-index: 5;
|
23 |
+
}
|
24 |
+
|
25 |
+
.tabs-menu li a {
|
26 |
+
padding: 10px;
|
27 |
+
text-transform: uppercase;
|
28 |
+
color: #fff;
|
29 |
+
text-decoration: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
.tabs-menu .current a {
|
33 |
+
color: #2e7da3;
|
34 |
+
}
|
35 |
+
|
36 |
+
.tab {
|
37 |
+
border: 1px solid #d4d4d1;
|
38 |
+
background-color: #fff;
|
39 |
+
float: left;
|
40 |
+
margin-bottom: 20px;
|
41 |
+
width: auto;
|
42 |
+
}
|
43 |
+
|
44 |
+
.tab-content {
|
45 |
+
width: 660px;
|
46 |
+
padding: 20px;
|
47 |
+
display: none;
|
48 |
+
}
|
49 |
+
|
50 |
+
#tab-1 {
|
51 |
+
display: block;
|
52 |
+
}
|
files/third-party/simple-tabs/js/simple-tabs.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
$(".tabs-menu a").click(function (event) {
|
3 |
+
event.preventDefault();
|
4 |
+
$(this).parent().addClass("current");
|
5 |
+
$(this).parent().siblings().removeClass("current");
|
6 |
+
var tab = $(this).attr("href");
|
7 |
+
$(".tab-content").not(tab).css("display", "none");
|
8 |
+
$(tab).fadeIn();
|
9 |
+
});
|
10 |
+
});
|
options-templates/options-template-main.php
CHANGED
@@ -21,6 +21,23 @@
|
|
21 |
</td>
|
22 |
</tr>
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
<tr valign="top">
|
26 |
<th scope="row">
|
21 |
</td>
|
22 |
</tr>
|
23 |
|
24 |
+
<tr valign="top">
|
25 |
+
<th scope="row">
|
26 |
+
<?php _e('Show the latest comments on', 'wpdiscuz'); ?>
|
27 |
+
</th>
|
28 |
+
<td colspan="3">
|
29 |
+
<fieldset class="comment_list_order">
|
30 |
+
<label title="<?php _e('the top of the list', 'wpdiscuz') ?>">
|
31 |
+
<input type="radio" value="desc" <?php checked('desc' == $this->wc_options_serialized->wc_comment_list_order); ?> name="wc_comment_list_order" id="wc_comment_list_order" />
|
32 |
+
<span><?php _e('top of the threads', 'wpdiscuz') ?></span>
|
33 |
+
</label> <br/>
|
34 |
+
<label title="<?php _e('bottom of the threads', 'wpdiscuz') ?>">
|
35 |
+
<input type="radio" value="asc" <?php checked('asc' == $this->wc_options_serialized->wc_comment_list_order); ?> name="wc_comment_list_order" id="wc_comment_list_order" />
|
36 |
+
<span><?php _e('the bottom of the list', 'wpdiscuz') ?></span>
|
37 |
+
</label><br>
|
38 |
+
</fieldset>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
|
42 |
<tr valign="top">
|
43 |
<th scope="row">
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== wpDiscuz - Wordpress Comments ===
|
2 |
Contributors: gVectors Team
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UC44WQM5XJFPA
|
4 |
-
Tags: wordpress comments, ajax comments, ajax, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 4.0.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -36,7 +36,7 @@ New interactive, Ajax comment system. Wordpress post comments and discussion plu
|
|
36 |
**Dashboard**
|
37 |
|
38 |
* | Option to display comment form for certain post types
|
39 |
-
* | Option to
|
40 |
* | Options to turn On/Off Comment Voting and Sharing features
|
41 |
* | Option to hide/show CAPTCHA field on comment form
|
42 |
* | Option for "User Must be registered to comment"
|
@@ -66,8 +66,20 @@ https://wordpress.org/plugins/woodiscuz-woocommerce-comments/
|
|
66 |
* Support Forum: <http://gvectors.com/questions/>
|
67 |
* Plugin Page: <http://gvectors.com/wpdiscuz/>
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
71 |
= 1.0.5 =
|
72 |
* Added : Comment author names are links to their profile page (BuddyPress, Users Ultra)
|
73 |
* Fixed Bug : CSS Issues
|
1 |
=== wpDiscuz - Wordpress Comments ===
|
2 |
Contributors: gVectors Team
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UC44WQM5XJFPA
|
4 |
+
Tags: wordpress comments, ajax comments, ajax, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 4.0.1
|
7 |
+
Stable tag: 1.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
36 |
**Dashboard**
|
37 |
|
38 |
* | Option to display comment form for certain post types
|
39 |
+
* | Option to show the latest comments on top or bottom of threads
|
40 |
* | Options to turn On/Off Comment Voting and Sharing features
|
41 |
* | Option to hide/show CAPTCHA field on comment form
|
42 |
* | Option for "User Must be registered to comment"
|
66 |
* Support Forum: <http://gvectors.com/questions/>
|
67 |
* Plugin Page: <http://gvectors.com/wpdiscuz/>
|
68 |
|
69 |
+
== Screenshots ==
|
70 |
+
|
71 |
+
1. Ajax Form to add a new discussion thread Screenshot #1
|
72 |
+
2. Discussion Threads with Reply Form Screenshot #2
|
73 |
+
3. Full Front-End View Screenshot #3
|
74 |
+
4. wpDiscuz General Settings #4
|
75 |
+
5. Another Full Front-End View Screenshot #5
|
76 |
+
|
77 |
+
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.0.6 =
|
81 |
+
* Added : Option to sort comments by comment date with ascending or descending order
|
82 |
+
|
83 |
= 1.0.5 =
|
84 |
* Added : Comment author names are links to their profile page (BuddyPress, Users Ultra)
|
85 |
* Fixed Bug : CSS Issues
|
wc-css.php
CHANGED
@@ -14,7 +14,7 @@ class WC_CSS {
|
|
14 |
public function init_styles() {
|
15 |
?>
|
16 |
<style type="text/css">
|
17 |
-
|
18 |
#wpcomm form .item {display: block;} .item input {}
|
19 |
#wpcomm { margin:15px 5px; padding:1px 0px 10px 0px; border-top:#DDDDDD solid 1px; }
|
20 |
#wpcomm form { margin:0px; padding:0px; background:none; border:none; }
|
@@ -32,7 +32,7 @@ class WC_CSS {
|
|
32 |
#wpcomm .wc-field-email input[type="email"]{ width:100%; max-width:100%; padding:5px; font-size:14px; margin:0px; }
|
33 |
#wpcomm .wc-field-captcha input[type="text"]{ width:40%; padding:5px; font-size:14px; margin:0px; }
|
34 |
#wpcomm .wc-field-submit input[type="submit"]{ margin:1px; }
|
35 |
-
#wpcomm .wc-field-submit input[type="button"]{ margin:1px; border:#DDDDDD 1px solid; font-size:
|
36 |
#wpcomm .captcha_msg{ color: #aaaaaa; font-family: Lato,sans-serif; font-size: 12px; line-height: 18px; display:block; clear:both; }
|
37 |
#wpcomm .wc-field-comment textarea{ width:100%; max-width:100%; height:43px; min-height: 43px !important; padding:5px; box-sizing: border-box; }
|
38 |
#wpcomm .wc-label{ display:block; font-size:14px; padding:5px; }
|
@@ -52,7 +52,7 @@ class WC_CSS {
|
|
52 |
#wpcomm .wc-must-login{ margin:0px; font-size:14px; line-height:16px; padding:10px }
|
53 |
#wpcomm hr{ background-color: rgba(0, 0, 0, 0.1); border: 0 none; height: 1px; margin:10px 0px; }
|
54 |
#wpcomm .avatar{ border: 1px solid rgba(0, 0, 0, 0.1); padding: 2px; margin:0px auto; float:none; }
|
55 |
-
#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; }
|
56 |
#wpcomm .wc-comment-header{ margin-bottom:7px; font-family:Lato,sans-serif; }
|
57 |
#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; }
|
58 |
#wpcomm .wc-comment-author a{ color:<?php echo $this->wc_options->wc_options_serialized->wc_author_title_color; ?>; font-size:16px; white-space:nowrap; text-decoration:none; }
|
@@ -87,6 +87,5 @@ class WC_CSS {
|
|
87 |
</style>
|
88 |
<?php
|
89 |
}
|
90 |
-
|
91 |
}
|
92 |
?>
|
14 |
public function init_styles() {
|
15 |
?>
|
16 |
<style type="text/css">
|
17 |
+
#wc-comment-header{ padding:20px 5px 1px 5px; display:block; float:none; clear:both; font-size:18px;} /*#2892BF*/
|
18 |
#wpcomm form .item {display: block;} .item input {}
|
19 |
#wpcomm { margin:15px 5px; padding:1px 0px 10px 0px; border-top:#DDDDDD solid 1px; }
|
20 |
#wpcomm form { margin:0px; padding:0px; background:none; border:none; }
|
32 |
#wpcomm .wc-field-email input[type="email"]{ width:100%; max-width:100%; padding:5px; font-size:14px; margin:0px; }
|
33 |
#wpcomm .wc-field-captcha input[type="text"]{ width:40%; padding:5px; font-size:14px; margin:0px; }
|
34 |
#wpcomm .wc-field-submit input[type="submit"]{ margin:1px; }
|
35 |
+
#wpcomm .wc-field-submit input[type="button"]{ margin:1px; border:#DDDDDD 1px solid; font-size: 13px; line-height: 16px; padding: 6px 25px; }
|
36 |
#wpcomm .captcha_msg{ color: #aaaaaa; font-family: Lato,sans-serif; font-size: 12px; line-height: 18px; display:block; clear:both; }
|
37 |
#wpcomm .wc-field-comment textarea{ width:100%; max-width:100%; height:43px; min-height: 43px !important; padding:5px; box-sizing: border-box; }
|
38 |
#wpcomm .wc-label{ display:block; font-size:14px; padding:5px; }
|
52 |
#wpcomm .wc-must-login{ margin:0px; font-size:14px; line-height:16px; padding:10px }
|
53 |
#wpcomm hr{ background-color: rgba(0, 0, 0, 0.1); border: 0 none; height: 1px; margin:10px 0px; }
|
54 |
#wpcomm .avatar{ border: 1px solid rgba(0, 0, 0, 0.1); padding: 2px; margin:0px auto; float:none; }
|
55 |
+
#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; line-height: 18px; }
|
56 |
#wpcomm .wc-comment-header{ margin-bottom:7px; font-family:Lato,sans-serif; }
|
57 |
#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; }
|
58 |
#wpcomm .wc-comment-author a{ color:<?php echo $this->wc_options->wc_options_serialized->wc_author_title_color; ?>; font-size:16px; white-space:nowrap; text-decoration:none; }
|
87 |
</style>
|
88 |
<?php
|
89 |
}
|
|
|
90 |
}
|
91 |
?>
|
wc-options-serialize.php
CHANGED
@@ -6,21 +6,31 @@ class WC_Options_Serialize {
|
|
6 |
|
7 |
public $wc_options_slug = 'wc_options';
|
8 |
|
9 |
-
|
|
|
10 |
* Available Values - Checked/Unchecked
|
11 |
* Description - On which post types display comment form
|
12 |
* Default Value - Post
|
13 |
*/
|
14 |
public $wc_post_types = array('post');
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
* Available Values - Checked/Unchecked
|
18 |
* Description - Show/Hide Voting buttons
|
19 |
* Default Value - Unchecked
|
20 |
*/
|
21 |
public $wc_voting_buttons_show_hide;
|
22 |
|
23 |
-
|
24 |
* Type - Checkbox
|
25 |
* Available Values - Checked/Unchecked
|
26 |
* Description - Show/Hide Share Buttons
|
@@ -36,7 +46,7 @@ class WC_Options_Serialize {
|
|
36 |
*/
|
37 |
public $wc_captcha_show_hide;
|
38 |
|
39 |
-
|
40 |
* Type - Radiobutton
|
41 |
* Available Values - Yes/No
|
42 |
* Description - User Must be registered to comment
|
@@ -46,7 +56,7 @@ class WC_Options_Serialize {
|
|
46 |
*/
|
47 |
public $wc_user_must_be_registered;
|
48 |
|
49 |
-
|
50 |
* Type - Checkbox
|
51 |
* Available Values - Checked/Unchecked
|
52 |
* Description - If checked held the comment to approve manually
|
@@ -54,7 +64,7 @@ class WC_Options_Serialize {
|
|
54 |
*/
|
55 |
public $wc_held_comment_to_moderate;
|
56 |
|
57 |
-
|
58 |
* Type - Checkbox
|
59 |
* Available Values - Checked/Unchecked
|
60 |
* Description - Show/Hide Reply button for Guests
|
@@ -62,7 +72,7 @@ class WC_Options_Serialize {
|
|
62 |
*/
|
63 |
public $wc_reply_button_guests_show_hide;
|
64 |
|
65 |
-
|
66 |
* Type - Checkbox
|
67 |
* Available Values - Checked/Unchecked
|
68 |
* Description - Show/Hide Reply button for Customers
|
@@ -70,7 +80,7 @@ class WC_Options_Serialize {
|
|
70 |
*/
|
71 |
public $wc_reply_button_members_show_hide;
|
72 |
|
73 |
-
|
74 |
* Type - Checkbox
|
75 |
* Available Values - Checked/Unchecked
|
76 |
* Description - Show/Hide Author Titles
|
@@ -78,7 +88,7 @@ class WC_Options_Serialize {
|
|
78 |
*/
|
79 |
public $wc_author_titles_show_hide;
|
80 |
|
81 |
-
|
82 |
* Type - Input
|
83 |
* Available Values - Integer
|
84 |
* Description - Comment count per click
|
@@ -86,7 +96,7 @@ class WC_Options_Serialize {
|
|
86 |
*/
|
87 |
public $wc_comment_count;
|
88 |
|
89 |
-
|
90 |
* Type - Checkbox
|
91 |
* Available Values - Checked/Unchecked
|
92 |
* Description - Notify moderator on new comment
|
@@ -94,7 +104,7 @@ class WC_Options_Serialize {
|
|
94 |
*/
|
95 |
public $wc_notify_moderator;
|
96 |
|
97 |
-
|
98 |
* Type - Checkbox
|
99 |
* Available Values - Checked/Unchecked
|
100 |
* Description - Notify comment author on new reply
|
@@ -102,7 +112,7 @@ class WC_Options_Serialize {
|
|
102 |
*/
|
103 |
public $wc_notify_comment_author;
|
104 |
|
105 |
-
|
106 |
* Type - Input
|
107 |
* Available Values - color codes
|
108 |
* Description - Comment Background Color
|
@@ -110,7 +120,7 @@ class WC_Options_Serialize {
|
|
110 |
*/
|
111 |
public $wc_comment_bg_color;
|
112 |
|
113 |
-
|
114 |
* Type - Input
|
115 |
* Available Values - color codes
|
116 |
* Description - Reply Background Color
|
@@ -118,7 +128,7 @@ class WC_Options_Serialize {
|
|
118 |
*/
|
119 |
public $wc_reply_bg_color;
|
120 |
|
121 |
-
|
122 |
* Type - Input
|
123 |
* Available Values - color codes
|
124 |
* Description - Comment Text Color
|
@@ -126,7 +136,7 @@ class WC_Options_Serialize {
|
|
126 |
*/
|
127 |
public $wc_comment_text_color;
|
128 |
|
129 |
-
|
130 |
* Type - Input
|
131 |
* Available Values - color codes
|
132 |
* Description - Author title Color, Author title label color
|
@@ -134,7 +144,7 @@ class WC_Options_Serialize {
|
|
134 |
*/
|
135 |
public $wc_author_title_color;
|
136 |
|
137 |
-
|
138 |
* Type - Input
|
139 |
* Available Values - color codes
|
140 |
* Description - Vote, Reply, Share, Edit - text colors
|
@@ -142,8 +152,7 @@ class WC_Options_Serialize {
|
|
142 |
*/
|
143 |
public $wc_vote_reply_color;
|
144 |
|
145 |
-
|
146 |
-
/*
|
147 |
* Type - Textarea
|
148 |
* Available Values - custom css code
|
149 |
* Description - Custom css code
|
@@ -151,15 +160,17 @@ class WC_Options_Serialize {
|
|
151 |
*/
|
152 |
public $wc_custom_css;
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
/*
|
157 |
* Type - HTML elements array
|
158 |
* Available Values - Text
|
159 |
* Description - Phrases for form elements texts
|
160 |
* Default Value -
|
161 |
*/
|
162 |
public $wc_phrases;
|
|
|
|
|
|
|
|
|
163 |
public $wc_db_helper;
|
164 |
|
165 |
function __construct($wc_db_helper) {
|
@@ -173,6 +184,7 @@ class WC_Options_Serialize {
|
|
173 |
public function init_options($serialize_options) {
|
174 |
$options = unserialize($serialize_options);
|
175 |
$this->wc_post_types = $options['wc_post_types'];
|
|
|
176 |
$this->wc_voting_buttons_show_hide = $options['wc_voting_buttons_show_hide'];
|
177 |
$this->wc_share_buttons_show_hide = $options['wc_share_buttons_show_hide'];
|
178 |
$this->wc_captcha_show_hide = $options['wc_captcha_show_hide'];
|
@@ -251,6 +263,7 @@ class WC_Options_Serialize {
|
|
251 |
public function to_array() {
|
252 |
$options = array(
|
253 |
'wc_post_types' => $this->wc_post_types,
|
|
|
254 |
'wc_voting_buttons_show_hide' => $this->wc_voting_buttons_show_hide,
|
255 |
'wc_share_buttons_show_hide' => $this->wc_share_buttons_show_hide,
|
256 |
'wc_captcha_show_hide' => $this->wc_captcha_show_hide,
|
@@ -280,6 +293,7 @@ class WC_Options_Serialize {
|
|
280 |
public function add_options() {
|
281 |
$options = array(
|
282 |
'wc_post_types' => $this->wc_post_types,
|
|
|
283 |
'wc_voting_buttons_show_hide' => '0',
|
284 |
'wc_share_buttons_show_hide' => '0',
|
285 |
'wc_captcha_show_hide' => '0',
|
6 |
|
7 |
public $wc_options_slug = 'wc_options';
|
8 |
|
9 |
+
/**
|
10 |
+
* Type - Checkbox array
|
11 |
* Available Values - Checked/Unchecked
|
12 |
* Description - On which post types display comment form
|
13 |
* Default Value - Post
|
14 |
*/
|
15 |
public $wc_post_types = array('post');
|
16 |
|
17 |
+
/**
|
18 |
+
* Type - Dropdown Menu
|
19 |
+
* Available Values - Selected "..."
|
20 |
+
* Description - Comment list order
|
21 |
+
* Default Value - Post
|
22 |
+
*/
|
23 |
+
public $wc_comment_list_order;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Type - Checkbox
|
27 |
* Available Values - Checked/Unchecked
|
28 |
* Description - Show/Hide Voting buttons
|
29 |
* Default Value - Unchecked
|
30 |
*/
|
31 |
public $wc_voting_buttons_show_hide;
|
32 |
|
33 |
+
/**
|
34 |
* Type - Checkbox
|
35 |
* Available Values - Checked/Unchecked
|
36 |
* Description - Show/Hide Share Buttons
|
46 |
*/
|
47 |
public $wc_captcha_show_hide;
|
48 |
|
49 |
+
/**
|
50 |
* Type - Radiobutton
|
51 |
* Available Values - Yes/No
|
52 |
* Description - User Must be registered to comment
|
56 |
*/
|
57 |
public $wc_user_must_be_registered;
|
58 |
|
59 |
+
/**
|
60 |
* Type - Checkbox
|
61 |
* Available Values - Checked/Unchecked
|
62 |
* Description - If checked held the comment to approve manually
|
64 |
*/
|
65 |
public $wc_held_comment_to_moderate;
|
66 |
|
67 |
+
/**
|
68 |
* Type - Checkbox
|
69 |
* Available Values - Checked/Unchecked
|
70 |
* Description - Show/Hide Reply button for Guests
|
72 |
*/
|
73 |
public $wc_reply_button_guests_show_hide;
|
74 |
|
75 |
+
/**
|
76 |
* Type - Checkbox
|
77 |
* Available Values - Checked/Unchecked
|
78 |
* Description - Show/Hide Reply button for Customers
|
80 |
*/
|
81 |
public $wc_reply_button_members_show_hide;
|
82 |
|
83 |
+
/**
|
84 |
* Type - Checkbox
|
85 |
* Available Values - Checked/Unchecked
|
86 |
* Description - Show/Hide Author Titles
|
88 |
*/
|
89 |
public $wc_author_titles_show_hide;
|
90 |
|
91 |
+
/**
|
92 |
* Type - Input
|
93 |
* Available Values - Integer
|
94 |
* Description - Comment count per click
|
96 |
*/
|
97 |
public $wc_comment_count;
|
98 |
|
99 |
+
/**
|
100 |
* Type - Checkbox
|
101 |
* Available Values - Checked/Unchecked
|
102 |
* Description - Notify moderator on new comment
|
104 |
*/
|
105 |
public $wc_notify_moderator;
|
106 |
|
107 |
+
/**
|
108 |
* Type - Checkbox
|
109 |
* Available Values - Checked/Unchecked
|
110 |
* Description - Notify comment author on new reply
|
112 |
*/
|
113 |
public $wc_notify_comment_author;
|
114 |
|
115 |
+
/**
|
116 |
* Type - Input
|
117 |
* Available Values - color codes
|
118 |
* Description - Comment Background Color
|
120 |
*/
|
121 |
public $wc_comment_bg_color;
|
122 |
|
123 |
+
/**
|
124 |
* Type - Input
|
125 |
* Available Values - color codes
|
126 |
* Description - Reply Background Color
|
128 |
*/
|
129 |
public $wc_reply_bg_color;
|
130 |
|
131 |
+
/**
|
132 |
* Type - Input
|
133 |
* Available Values - color codes
|
134 |
* Description - Comment Text Color
|
136 |
*/
|
137 |
public $wc_comment_text_color;
|
138 |
|
139 |
+
/**
|
140 |
* Type - Input
|
141 |
* Available Values - color codes
|
142 |
* Description - Author title Color, Author title label color
|
144 |
*/
|
145 |
public $wc_author_title_color;
|
146 |
|
147 |
+
/**
|
148 |
* Type - Input
|
149 |
* Available Values - color codes
|
150 |
* Description - Vote, Reply, Share, Edit - text colors
|
152 |
*/
|
153 |
public $wc_vote_reply_color;
|
154 |
|
155 |
+
/**
|
|
|
156 |
* Type - Textarea
|
157 |
* Available Values - custom css code
|
158 |
* Description - Custom css code
|
160 |
*/
|
161 |
public $wc_custom_css;
|
162 |
|
163 |
+
/**
|
|
|
|
|
164 |
* Type - HTML elements array
|
165 |
* Available Values - Text
|
166 |
* Description - Phrases for form elements texts
|
167 |
* Default Value -
|
168 |
*/
|
169 |
public $wc_phrases;
|
170 |
+
|
171 |
+
/**
|
172 |
+
* helper class for database operations
|
173 |
+
*/
|
174 |
public $wc_db_helper;
|
175 |
|
176 |
function __construct($wc_db_helper) {
|
184 |
public function init_options($serialize_options) {
|
185 |
$options = unserialize($serialize_options);
|
186 |
$this->wc_post_types = $options['wc_post_types'];
|
187 |
+
$this->wc_comment_list_order = $options['wc_comment_list_order'];
|
188 |
$this->wc_voting_buttons_show_hide = $options['wc_voting_buttons_show_hide'];
|
189 |
$this->wc_share_buttons_show_hide = $options['wc_share_buttons_show_hide'];
|
190 |
$this->wc_captcha_show_hide = $options['wc_captcha_show_hide'];
|
263 |
public function to_array() {
|
264 |
$options = array(
|
265 |
'wc_post_types' => $this->wc_post_types,
|
266 |
+
'wc_comment_list_order' => $this->wc_comment_list_order,
|
267 |
'wc_voting_buttons_show_hide' => $this->wc_voting_buttons_show_hide,
|
268 |
'wc_share_buttons_show_hide' => $this->wc_share_buttons_show_hide,
|
269 |
'wc_captcha_show_hide' => $this->wc_captcha_show_hide,
|
293 |
public function add_options() {
|
294 |
$options = array(
|
295 |
'wc_post_types' => $this->wc_post_types,
|
296 |
+
'wc_comment_list_order' => 'desc',
|
297 |
'wc_voting_buttons_show_hide' => '0',
|
298 |
'wc_share_buttons_show_hide' => '0',
|
299 |
'wc_captcha_show_hide' => '0',
|
wc-options.php
CHANGED
@@ -36,6 +36,7 @@ class WC_Options {
|
|
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;
|
@@ -65,69 +66,69 @@ class WC_Options {
|
|
65 |
</div>
|
66 |
<h2 style="padding-bottom:20px; padding-top:15px;"><?php _e('wpDiscuz General Settings', 'wpdiscuz'); ?></h2>
|
67 |
<br style="clear:both" />
|
68 |
-
|
69 |
-
|
70 |
-
<link rel="stylesheet" href="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.bxslider.css" type="text/css" />
|
71 |
-
<script src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.min.js"></script>
|
72 |
-
<script src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.bxslider.js"></script>
|
73 |
-
<table width="100%" border="0" cellspacing="1" class="widefat">
|
74 |
-
<tr>
|
75 |
-
<td style="padding:10px; padding-left:0px; vertical-align:top; width:500px;">
|
76 |
-
<div class="slider">
|
77 |
-
<ul class="bxslider">
|
78 |
-
<li><a href="https://wordpress.org/plugins/woodiscuz-woocommerce-comments/screenshots/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/3.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
79 |
-
<li><a href="https://wordpress.org/plugins/woocommerce-pdf-print/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/4.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
80 |
-
<li><a href="https://wordpress.org/plugins/advanced-content-pagination/screenshots/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/1.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
81 |
-
<li><a href="https://wordpress.org/plugins/author-and-post-statistic-widgets/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/2.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
82 |
-
</ul>
|
83 |
-
</div>
|
84 |
-
<div style="clear:both"></div>
|
85 |
-
</td>
|
86 |
-
<td valign="top" style="padding:20px;">
|
87 |
-
|
88 |
-
<table width="100%" border="0" cellspacing="1" class="widefat">
|
89 |
-
<thead>
|
90 |
-
<tr>
|
91 |
-
<th style="font-size:18px;"> Information</th>
|
92 |
-
</tr>
|
93 |
-
</thead>
|
94 |
-
<tr valign="top">
|
95 |
-
<td style="background:#FFF; text-align:left; font-size:14px;">
|
96 |
-
wpDiscuz is alsow available for WooCommerce. The WooCommerce Comments plugin name is <a href="https://wordpress.org/plugins/woodiscuz-woocommerce-comments/" style="color:#993399; text-decoration:underline;"><strong>WooDiscuz</strong></a>. It adds a new "Discussion" Tab on product page and allows your customers ask Pre-Sale Questions and discuss about your products.
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
</table><br />
|
100 |
|
|
|
|
|
|
|
|
|
101 |
<table width="100%" border="0" cellspacing="1" class="widefat">
|
102 |
-
<thead>
|
103 |
<tr>
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
</tr>
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
</ul>
|
116 |
-
</td>
|
117 |
-
</tr>
|
118 |
-
</table>
|
119 |
-
|
120 |
-
</td>
|
121 |
-
</tr>
|
122 |
-
</table>
|
123 |
-
<script>
|
124 |
-
$('.bxslider').bxSlider({
|
125 |
-
mode: 'fade',
|
126 |
-
captions: false,
|
127 |
-
auto: true
|
128 |
-
});
|
129 |
-
</script>
|
130 |
-
<br />
|
131 |
<form action="<?php echo admin_url(); ?>admin.php?page=wpdiscuz_options_page&updated=true" method="post" name="wpdiscuz_options_page" class="wc-main-settings-form wc-form">
|
132 |
<?php
|
133 |
if (function_exists('wp_nonce_field')) {
|
@@ -177,7 +178,7 @@ class WC_Options {
|
|
177 |
}
|
178 |
|
179 |
$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';
|
180 |
-
$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!';
|
181 |
$this->wc_options_serialized->wc_phrases['wc_header_text'] = isset($_POST['wc_header_text']) ? $_POST['wc_header_text'] : 'Comment';
|
182 |
$this->wc_options_serialized->wc_phrases['wc_header_on_text'] = isset($_POST['wc_header_on_text']) ? $_POST['wc_header_on_text'] : 'on';
|
183 |
$this->wc_options_serialized->wc_phrases['wc_comment_start_text'] = isset($_POST['wc_comment_start_text']) ? $_POST['wc_comment_start_text'] : 'Start the discussion';
|
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_comment_list_order = isset($_POST['wc_comment_list_order']) ? $_POST['wc_comment_list_order'] : 'desc';
|
40 |
$this->wc_options_serialized->wc_voting_buttons_show_hide = isset($_POST['wc_voting_buttons_show_hide']) ? $_POST['wc_voting_buttons_show_hide'] : 0;
|
41 |
$this->wc_options_serialized->wc_share_buttons_show_hide = isset($_POST['wc_share_buttons_show_hide']) ? $_POST['wc_share_buttons_show_hide'] : 0;
|
42 |
$this->wc_options_serialized->wc_captcha_show_hide = isset($_POST['wc_captcha_show_hide']) ? $_POST['wc_captcha_show_hide'] : 0;
|
66 |
</div>
|
67 |
<h2 style="padding-bottom:20px; padding-top:15px;"><?php _e('wpDiscuz General Settings', 'wpdiscuz'); ?></h2>
|
68 |
<br style="clear:both" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
|
71 |
+
<link rel="stylesheet" href="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.bxslider.css" type="text/css" />
|
72 |
+
<script src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.min.js"></script>
|
73 |
+
<script src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>bxslider/jquery.bxslider.js"></script>
|
74 |
<table width="100%" border="0" cellspacing="1" class="widefat">
|
|
|
75 |
<tr>
|
76 |
+
<td style="padding:10px; padding-left:0px; vertical-align:top; width:500px;">
|
77 |
+
<div class="slider">
|
78 |
+
<ul class="bxslider">
|
79 |
+
<li><a href="https://wordpress.org/plugins/woodiscuz-woocommerce-comments/screenshots/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/3.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
80 |
+
<li><a href="https://wordpress.org/plugins/woocommerce-pdf-print/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/4.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
81 |
+
<li><a href="https://wordpress.org/plugins/advanced-content-pagination/screenshots/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/1.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
82 |
+
<li><a href="https://wordpress.org/plugins/author-and-post-statistic-widgets/"><img src="<?php echo plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/'); ?>files/img/gc/2.png" title="Free Download from Wordpress.org" style="padding:0px 0px 20px 20px;" /></a></li>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
<div style="clear:both"></div>
|
86 |
+
</td>
|
87 |
+
<td valign="top" style="padding:20px;">
|
88 |
+
|
89 |
+
<table width="100%" border="0" cellspacing="1" class="widefat">
|
90 |
+
<thead>
|
91 |
+
<tr>
|
92 |
+
<th style="font-size:18px;"> Information</th>
|
93 |
+
</tr>
|
94 |
+
</thead>
|
95 |
+
<tr valign="top">
|
96 |
+
<td style="background:#FFF; text-align:left; font-size:14px;">
|
97 |
+
wpDiscuz is alsow available for WooCommerce. The WooCommerce Comments plugin name is <a href="https://wordpress.org/plugins/woodiscuz-woocommerce-comments/" style="color:#993399; text-decoration:underline;"><strong>WooDiscuz</strong></a>. It adds a new "Discussion" Tab on product page and allows your customers ask Pre-Sale Questions and discuss about your products.
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
</table><br />
|
101 |
+
|
102 |
+
<table width="100%" border="0" cellspacing="1" class="widefat">
|
103 |
+
<thead>
|
104 |
+
<tr>
|
105 |
+
<th> Like wpDiscuz plugin?</th>
|
106 |
+
</tr>
|
107 |
+
</thead>
|
108 |
+
<tr valign="top">
|
109 |
+
<td style="background:#FFF; text-align:left; font-size:12px;">
|
110 |
+
<ul>
|
111 |
+
<li>If you like wpDiscuz and want to encourage us to develop and maintain it,why not do any or all of the following:</li>
|
112 |
+
<li>- Link to it so other folks can find out about it.</li>
|
113 |
+
<li>- Give it a good rating on <a href="https://wordpress.org/plugins/wpdiscuz/" target="_blank">WordPress.org.</a></li>
|
114 |
+
<li>- We spend as much of my spare time as possible working on wpDiscuz and any donation is appreciated. Donations play a crucial role in supporting Free and Open Source Software projects. <div style="width:200px; float:right;">
|
115 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="UC44WQM5XJFPA"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>
|
116 |
+
</ul>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
</table>
|
120 |
+
|
121 |
+
</td>
|
122 |
</tr>
|
123 |
+
</table>
|
124 |
+
<script>
|
125 |
+
$('.bxslider').bxSlider({
|
126 |
+
mode: 'fade',
|
127 |
+
captions: false,
|
128 |
+
auto: true
|
129 |
+
});
|
130 |
+
</script>
|
131 |
+
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
<form action="<?php echo admin_url(); ?>admin.php?page=wpdiscuz_options_page&updated=true" method="post" name="wpdiscuz_options_page" class="wc-main-settings-form wc-form">
|
133 |
<?php
|
134 |
if (function_exists('wp_nonce_field')) {
|
178 |
}
|
179 |
|
180 |
$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';
|
181 |
+
$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!';
|
182 |
$this->wc_options_serialized->wc_phrases['wc_header_text'] = isset($_POST['wc_header_text']) ? $_POST['wc_header_text'] : 'Comment';
|
183 |
$this->wc_options_serialized->wc_phrases['wc_header_on_text'] = isset($_POST['wc_header_on_text']) ? $_POST['wc_header_on_text'] : 'on';
|
184 |
$this->wc_options_serialized->wc_phrases['wc_comment_start_text'] = isset($_POST['wc_comment_start_text']) ? $_POST['wc_comment_start_text'] : 'Start the discussion';
|
wc.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: wpDiscuz - Wordpress Comments
|
5 |
Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
|
6 |
-
Version: 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/wpdiscuz/
|
@@ -369,17 +369,16 @@ class WC_Core {
|
|
369 |
$post_id = $post->ID;
|
370 |
}
|
371 |
$wc_comment_count = $this->wc_options->wc_options_serialized->wc_comment_count;
|
372 |
-
|
|
|
373 |
$comm_list_args = array(
|
374 |
'callback' => array(&$this, 'wc_comment_callback'),
|
375 |
'style' => 'div',
|
376 |
'per_page' => $comments_offset * $wc_comment_count,
|
377 |
'max_depth' => 2
|
378 |
);
|
379 |
-
|
380 |
-
$comments = get_comments(
|
381 |
-
array('post_id' => $post_id, 'status' => 'approve')
|
382 |
-
);
|
383 |
|
384 |
$wc_comments = $this->init_wc_comments($comments);
|
385 |
wp_list_comments($comm_list_args, $wc_comments);
|
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.6
|
7 |
Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
|
8 |
Author URI: http://www.gvectors.com/
|
9 |
Plugin URI: http://www.gvectors.com/wpdiscuz/
|
369 |
$post_id = $post->ID;
|
370 |
}
|
371 |
$wc_comment_count = $this->wc_options->wc_options_serialized->wc_comment_count;
|
372 |
+
$wc_comment_list_order = $this->wc_options->wc_options_serialized->wc_comment_list_order;
|
373 |
+
|
374 |
$comm_list_args = array(
|
375 |
'callback' => array(&$this, 'wc_comment_callback'),
|
376 |
'style' => 'div',
|
377 |
'per_page' => $comments_offset * $wc_comment_count,
|
378 |
'max_depth' => 2
|
379 |
);
|
380 |
+
|
381 |
+
$comments = get_comments(array('post_id' => $post_id, 'status' => 'approve', 'order' => $wc_comment_list_order));
|
|
|
|
|
382 |
|
383 |
$wc_comments = $this->init_wc_comments($comments);
|
384 |
wp_list_comments($comm_list_args, $wc_comments);
|