html-thread_display.php
14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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
<?php
if (!defined("ABSPATH")) {
exit();
}
?>
<!-- Option start -->
<div class="wpd-opt-row">
<div class="wpd-opt-intro">
<img class="wpd-opt-img" src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/dashboard/" . $setting["icon"])); ?>" style="height: 70px; padding-top: 5px;"/>
<?php esc_html_e('Here you can find all necessary options to control comment threads loading, displaying and sorting functions. Using "Comment List Loading Type", "Comments Pagination Type" and "Display only parent comments" options, you can get the highest page loading speed. Also you can manage comment thread filtering buttons.', "wpdiscuz"); ?>
</div>
<div class="wpd-opt-doc" style="padding-top: 10px;">
<a href="https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="firstLoadWithAjax">
<div class="wpd-opt-name">
<label for="firstLoadWithAjax"><?php echo esc_html($setting["options"]["firstLoadWithAjax"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["firstLoadWithAjax"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-radio">
<input type="radio" value="0" <?php checked(0 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="disableFirstLoadWithAjax" class="firstLoadWithAjax"/>
<label for="disableFirstLoadWithAjax" class="wpd-radio-circle"></label>
<label for="disableFirstLoadWithAjax"><?php esc_html_e("Load with page", "wpdiscuz") ?></label>
</div>
<div class="wpd-radio">
<input type="radio" value="1" <?php checked(1 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="loadWithAjax" class="firstLoadWithAjax"/>
<label for="loadWithAjax" class="wpd-radio-circle"></label>
<label for="loadWithAjax" title="<?php esc_attr_e("Initiates AJAX loading once page loading is complete", "wpdiscuz") ?>"><?php esc_html_e("Initiate AJAX loading after page", "wpdiscuz") ?></label>
</div>
<div class="wpd-radio">
<input type="radio" value="2" <?php checked(2 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="firstLoadWithAjaxButton" class="firstLoadWithAjax"/>
<label for="firstLoadWithAjaxButton" class="wpd-radio-circle"></label>
<label for="firstLoadWithAjaxButton" title="<?php esc_attr_e("Display [View Comments] button to load comments manually", "wpdiscuz") ?>"><?php esc_html_e("Display [View Comments] button", "wpdiscuz") ?></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["firstLoadWithAjax"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="commentListLoadType">
<div class="wpd-opt-name">
<label for="commentListLoadType"><?php echo esc_html($setting["options"]["commentListLoadType"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["commentListLoadType"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<fieldset>
<div class="wpd-radio">
<input type="radio" value="0" <?php checked(0 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadDefault" class="commentListLoadType"/>
<label for="commentListLoadDefault" class="wpd-radio-circle"></label>
<label for="commentListLoadDefault"><?php esc_html_e("[Load more] Button", "wpdiscuz") ?></label>
</div>
<div class="wpd-radio">
<input type="radio" value="1" <?php checked(1 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadRest" class="commentListLoadType"/>
<label for="commentListLoadRest" class="wpd-radio-circle"></label>
<label for="commentListLoadRest"><?php esc_html_e("[Load rest of all comments] Button", "wpdiscuz") ?></label>
</div>
<div class="wpd-radio">
<input type="radio" value="3" <?php checked(3 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadAll" class="commentListLoadType"/>
<label for="commentListLoadAll" class="wpd-radio-circle"></label>
<label for="commentListLoadAll"><?php esc_html_e("Load all comments", "wpdiscuz") ?></label>
</div>
<div class="wpd-radio">
<input type="radio" value="2" <?php checked(2 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadLazy" class="commentListLoadType"/>
<label for="commentListLoadLazy" class="wpd-radio-circle"></label>
<label for="commentListLoadLazy"><?php esc_html_e("Lazy load comments on scrolling", "wpdiscuz") ?></label>
</div>
</fieldset>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["commentListLoadType"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="isLoadOnlyParentComments">
<div class="wpd-opt-name">
<label for="isLoadOnlyParentComments"><?php echo $setting["options"]["isLoadOnlyParentComments"]["label"] ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["isLoadOnlyParentComments"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["isLoadOnlyParentComments"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[isLoadOnlyParentComments]" id="isLoadOnlyParentComments">
<label for="isLoadOnlyParentComments"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["isLoadOnlyParentComments"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="showReactedFilterButton">
<div class="wpd-opt-name">
<label for="showReactedFilterButton"><?php echo esc_html($setting["options"]["showReactedFilterButton"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["showReactedFilterButton"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["showReactedFilterButton"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showReactedFilterButton]" id="showReactedFilterButton">
<label for="showReactedFilterButton"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["showReactedFilterButton"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="showHottestFilterButton">
<div class="wpd-opt-name">
<label for="showHottestFilterButton"><?php echo esc_html($setting["options"]["showHottestFilterButton"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["showHottestFilterButton"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["showHottestFilterButton"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showHottestFilterButton]" id="showHottestFilterButton">
<label for="showHottestFilterButton"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["showHottestFilterButton"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="showSortingButtons">
<div class="wpd-opt-name">
<label for="showSortingButtons"><?php echo esc_html($setting["options"]["showSortingButtons"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["showSortingButtons"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["showSortingButtons"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showSortingButtons]" id="showSortingButtons">
<label for="showSortingButtons"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["showSortingButtons"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="mostVotedByDefault">
<div class="wpd-opt-name">
<label for="mostVotedByDefault"><?php echo esc_html($setting["options"]["mostVotedByDefault"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["mostVotedByDefault"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["mostVotedByDefault"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[mostVotedByDefault]" id="mostVotedByDefault">
<label for="mostVotedByDefault"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["mostVotedByDefault"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="reverseChildren">
<div class="wpd-opt-name">
<label for="reverseChildren"><?php echo esc_html($setting["options"]["reverseChildren"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["reverseChildren"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["reverseChildren"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[reverseChildren]" id="reverseChildren">
<label for="reverseChildren"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["reverseChildren"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="highlightUnreadComments">
<div class="wpd-opt-name">
<label for="highlightUnreadComments"><?php echo esc_html($setting["options"]["highlightUnreadComments"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["highlightUnreadComments"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["highlightUnreadComments"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[highlightUnreadComments]" id="highlightUnreadComments">
<label for="highlightUnreadComments"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["highlightUnreadComments"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="scrollToComment">
<div class="wpd-opt-name">
<label for="scrollToComment"><?php echo $setting["options"]["scrollToComment"]["label"] ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["scrollToComment"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->thread_display["scrollToComment"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[scrollToComment]" id="scrollToComment">
<label for="scrollToComment"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["scrollToComment"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="orderCommentsBy">
<div class="wpd-opt-name">
<label for="orderCommentsBy"><?php echo esc_html($setting["options"]["orderCommentsBy"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["orderCommentsBy"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switch-field">
<input type="radio" value="comment_ID" <?php checked("comment_ID" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsById" />
<label for="orderCommentsById" style="min-width:60px;"><?php esc_html_e("ID", "wpdiscuz"); ?></label>
<input type="radio" value="comment_date_gmt" <?php checked("comment_date_gmt" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsByDate" />
<label for="orderCommentsByDate" style="min-width:60px;"><?php esc_html_e("Date", "wpdiscuz"); ?></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["orderCommentsBy"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->