Version Description
Download this release
Release Info
Developer | Disqus |
Plugin | Disqus Comment System |
Version | 2.04.3953 |
Comparing to | |
See all releases |
Code changes from version 2.03.3166 to 2.04.3953
- comments.php +27 -31
- disqus.php +37 -5
- manage.php +8 -1
- readme.txt +1 -1
comments.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
global $dsq_response, $dsq_sort;
|
4 |
$site_url = get_option('siteurl');
|
5 |
?>
|
6 |
-
<link rel="stylesheet" href="<?php echo DISQUS_API_URL; ?>/stylesheets/<?php echo strtolower(get_option('disqus_forum_url')); ?>/disqus.css" type="text/css" media="screen" />
|
7 |
|
8 |
<div id="disqus_thread">
|
9 |
<div id="dsq-content">
|
@@ -17,22 +16,22 @@
|
|
17 |
</div>
|
18 |
</div>
|
19 |
<?php else : ?>
|
20 |
-
<span id="dsq-
|
21 |
<?php endif ; ?>
|
22 |
</div>
|
23 |
<div style="margin:10px 0">
|
24 |
-
<a id="dsq-options-toggle" href="#" onclick="Dsq.Thread.toggleOptions(); return false"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/dsq-options-plus.png" /></a>
|
25 |
</div>
|
26 |
|
27 |
<div id="dsq-options" style="display:none">
|
28 |
<span id="dsq-auth-wrap"></span>
|
29 |
<div id="dsq-extra-links">
|
30 |
<li>
|
31 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/bullet-feed.png" /><strong>Subscribe</strong>:
|
32 |
<a href="http://<?php echo strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/' . $dsq_response['thread_slug'] . '/latest.rss'; ?>">This Thread</a>
|
33 |
</li>
|
34 |
<li>
|
35 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/bullet-go.png" /><strong>Go to</strong>:
|
36 |
<a href="<?php echo DISQUS_URL . '/track/'; ?>">My Comments</a> ·
|
37 |
<a href="http://<?php echo strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/' . $dsq_response['thread_slug'] . '/'; ?>">Community Page</a>
|
38 |
</li>
|
@@ -71,7 +70,7 @@
|
|
71 |
<?php else : ?>
|
72 |
<div id="comment-<?php echo $comment['id']; ?>"></div>
|
73 |
<li id="dsq-comment-<?php echo $comment['id']; ?>" style="margin-left:<?php echo $comment['depth'] * 30; ?>px" class="dsq-comment<?php if($comment['user']['is_creator']) { echo ' special'; } ?><?php if($comment['user']['is_moderator']) { echo ' dsq-moderator'; } ?>">
|
74 |
-
<ul class="dsq-comment-rate" id="dsq-rate-loading-<?php echo $comment['id']; ?>" style="display: none"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/loading-small.gif" /></ul>
|
75 |
<ul class="dsq-comment-rate" id="dsq-rate-<?php echo $comment['id']; ?>">
|
76 |
<li id="dsq-rate-up-<?php echo $comment['id']; ?>"><a id="dsq-rate-up-a-<?php echo $comment['id']; ?>" class="dsq-arrows" href="#" title="Rate Up"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/arrow2-up.png" alt="^" /></a></li>
|
77 |
<li id="dsq-rate-down-<?php echo $comment['id']; ?>"><a id="dsq-rate-down-a-<?php echo $comment['id']; ?>" class="dsq-arrows" href="#" title="Rate Down"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/arrow2-down.png" alt="v" /></a></li>
|
@@ -79,7 +78,7 @@
|
|
79 |
<div id="dsq-comment-header-<?php echo $comment['id']; ?>" class="dsq-comment-header">
|
80 |
<div class="dsq-header-avatar" id="dsq-header-avatar-<?php echo $comment['id']; ?>">
|
81 |
<a id="dsq-avatar-<?php echo $comment['id']; ?>" href="<?php echo $dsq_profile_url; ?>" title="Profile">
|
82 |
-
<img src="<?php echo $comment['user']['avatar_url']; ?>" />
|
83 |
</a>
|
84 |
<ul id="dsq-menu-<?php echo $comment['id']; ?>" class="dsq-menu" style="display:none">
|
85 |
<?php if ( $comment['parent_id'] ) : ?>
|
@@ -88,7 +87,7 @@
|
|
88 |
<li><a href="#comment-<?php echo $comment['id']; ?>">Permalink</a></li>
|
89 |
<li style="display: none">
|
90 |
<a id="dsq-admin-toggle-<?php echo $comment['id']; ?>" class="dsq-admin-toggle" href="#">
|
91 |
-
Admin<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/pointer-right.png" />
|
92 |
</a>
|
93 |
</li>
|
94 |
<li id="dsq-admin-panel-<?php echo $comment['id']; ?>" class="dsq-admin-panel" style="display: none">
|
@@ -108,7 +107,7 @@
|
|
108 |
|
109 |
<cite id="dsq-cite-<?php echo $comment['id']; ?>">
|
110 |
<?php if($comment['user']['url']) : ?>
|
111 |
-
<a id="dsq-author-user-<?php echo $comment['id']; ?>" href="<?php echo $comment['user']['url']; ?>">
|
112 |
<?php echo $comment['user']['display_name']; ?>
|
113 |
</a>
|
114 |
<?php else: ?>
|
@@ -136,10 +135,10 @@
|
|
136 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_preview'><a href="http://www.seesmic.com/video/<?php echo $comment['seesmic']['id'][0]; ?>" target='_blank' class='see_link'> </a>
|
137 |
<div style='display:block;width:160px; height:120px; border:none; background-image:url(<?php echo $comment['seesmic']['metadata'][0]; ?>)'>
|
138 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_hide' class='seePlayOverlay' style='display:none;'>
|
139 |
-
<img onclick="see_play_video('<?php echo $comment['seesmic']['id'][0]; ?>',false)" src='<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/stopOverlay.png' width='50' height='50' style='cursor:pointer; cursor:hand; padding-top: 30px; padding-left: 50px' />
|
140 |
</div>
|
141 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_show' class='seePlayOverlay'>
|
142 |
-
<img onclick="see_play_video('<?php echo $comment['seesmic']['id'][0]; ?>',true)" src='<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/playOverlay.png' width='50' height='50' style='cursor:pointer; cursor:hand; border:none; padding-top: 30px; padding-left: 50px' />
|
143 |
</div>
|
144 |
</div>
|
145 |
</div>
|
@@ -153,18 +152,17 @@
|
|
153 |
<span id="dsq-edit-wrap-<?php echo $comment['id'] ?>" style="display: none">
|
154 |
<a href="#" id="dsq-edit-<?php echo $comment['id'] ?>" style="display: none">edit</a>
|
155 |
</span>
|
156 |
-
<span id="dsq-reblog-wrap-<?php echo $comment['id'] ?>" style="display: none">
|
157 |
-
<a href="#" id="dsq-reblog-<?php echo $comment['id'] ?>" class="dsq-reblog">reblog</a>
|
158 |
-
</span>
|
159 |
-
<span id="dsq-post-report-<?php echo $comment['id'] ?>" style="display: none">
|
160 |
-
<a id="dsq-post-report-a-<?php echo $comment['id'] ?>" href="#" class="dsq-post-report">flag</a>
|
161 |
-
</span>
|
162 |
<?php if ( $dsq_response['seesmic_enabled'] ) : ?>
|
163 |
-
<a id="dsq-post-video-<?php echo $comment['id']; ?>" href="#" style="display: none"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/record.png" class="dsq-record-img" /> record video comment</a>
|
164 |
<?php endif ; ?>
|
165 |
-
|
166 |
-
<div id="dsq-reply-<?php echo $comment['id']; ?>"><!-- iframe .dsq-post-reply injected here --></div>
|
167 |
<?php endif ; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
</div>
|
169 |
|
170 |
<div id="dsq-hidden-data-<?php echo $comment['id']; ?>" style="display:none">
|
@@ -190,7 +188,7 @@
|
|
190 |
<span style="display: none" id="dsq-hidden-flickr-<?php echo $comment['id']; ?>"></span>
|
191 |
<span style="display: none" id="dsq-hidden-tumblr-<?php echo $comment['id']; ?>"></span>
|
192 |
<?php endif; ?>
|
193 |
-
<span style="display: none" id="dsq-hidden-avatar-<?php echo $comment['id']; ?>"><img src="<?php echo $comment['user']['avatar_url']; ?>" /></span>
|
194 |
</div>
|
195 |
</li>
|
196 |
<?php endif ; ?>
|
@@ -215,7 +213,7 @@
|
|
215 |
</div>
|
216 |
</div>
|
217 |
<?php else : ?>
|
218 |
-
<span id="dsq-
|
219 |
<?php endif ; ?>
|
220 |
</div>
|
221 |
<?php if ($dsq_response['linkbacks_enabled'] ) : ?>
|
@@ -259,37 +257,37 @@
|
|
259 |
<ul>
|
260 |
<li style="display:none">
|
261 |
<a id="dsq-service-blog" href="#" target="_blank">
|
262 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/blog.png" />
|
263 |
</a>
|
264 |
</li>
|
265 |
<li style="display:none">
|
266 |
<a id="dsq-service-facebook" href="#" target="_blank">
|
267 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/facebook.png" />
|
268 |
</a>
|
269 |
</li>
|
270 |
<li style="display:none">
|
271 |
<a id="dsq-service-linkedin" href="#" target="_blank">
|
272 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/linkedin.png" />
|
273 |
</a>
|
274 |
</li>
|
275 |
<li style="display:none">
|
276 |
<a id="dsq-service-twitter" href="#" target="_blank">
|
277 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/twitter.png" />
|
278 |
</a>
|
279 |
</li>
|
280 |
<li style="display:none">
|
281 |
<a id="dsq-service-delicious" href="#" target="_blank">
|
282 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/delicious.png" />
|
283 |
</a>
|
284 |
</li>
|
285 |
<li style="display:none">
|
286 |
<a id="dsq-service-flickr" href="#" target="_blank">
|
287 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/flickr.png" />
|
288 |
</a>
|
289 |
</li>
|
290 |
<li style="display:none">
|
291 |
<a id="dsq-service-tumblr" href="#" target="_blank">
|
292 |
-
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/tumblr.png" />
|
293 |
</a>
|
294 |
</li>
|
295 |
</ul>
|
@@ -333,8 +331,6 @@
|
|
333 |
<!-- /embed_thread_profile.html -->
|
334 |
|
335 |
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
336 |
-
<script type="text/javascript">
|
337 |
-
</script>
|
338 |
<script type="text/javascript" charset="utf-8">
|
339 |
var disqusMediaUrl = "<?php echo DISQUS_MEDIA_URL; ?>";
|
340 |
var threadEl = document.getElementById('dsq-content');
|
3 |
global $dsq_response, $dsq_sort;
|
4 |
$site_url = get_option('siteurl');
|
5 |
?>
|
|
|
6 |
|
7 |
<div id="disqus_thread">
|
8 |
<div id="dsq-content">
|
16 |
</div>
|
17 |
</div>
|
18 |
<?php else : ?>
|
19 |
+
<span id="dsq-post-add">Comments for this post are closed.</span>
|
20 |
<?php endif ; ?>
|
21 |
</div>
|
22 |
<div style="margin:10px 0">
|
23 |
+
<a id="dsq-options-toggle" href="#" onclick="Dsq.Thread.toggleOptions(); return false"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/dsq-options-plus.png" alt="" /></a>
|
24 |
</div>
|
25 |
|
26 |
<div id="dsq-options" style="display:none">
|
27 |
<span id="dsq-auth-wrap"></span>
|
28 |
<div id="dsq-extra-links">
|
29 |
<li>
|
30 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/bullet-feed.png" alt="" /><strong>Subscribe</strong>:
|
31 |
<a href="http://<?php echo strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/' . $dsq_response['thread_slug'] . '/latest.rss'; ?>">This Thread</a>
|
32 |
</li>
|
33 |
<li>
|
34 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/bullet-go.png" alt="" /><strong>Go to</strong>:
|
35 |
<a href="<?php echo DISQUS_URL . '/track/'; ?>">My Comments</a> ·
|
36 |
<a href="http://<?php echo strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/' . $dsq_response['thread_slug'] . '/'; ?>">Community Page</a>
|
37 |
</li>
|
70 |
<?php else : ?>
|
71 |
<div id="comment-<?php echo $comment['id']; ?>"></div>
|
72 |
<li id="dsq-comment-<?php echo $comment['id']; ?>" style="margin-left:<?php echo $comment['depth'] * 30; ?>px" class="dsq-comment<?php if($comment['user']['is_creator']) { echo ' special'; } ?><?php if($comment['user']['is_moderator']) { echo ' dsq-moderator'; } ?>">
|
73 |
+
<ul class="dsq-comment-rate" id="dsq-rate-loading-<?php echo $comment['id']; ?>" style="display: none"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/loading-small.gif" alt="" /></ul>
|
74 |
<ul class="dsq-comment-rate" id="dsq-rate-<?php echo $comment['id']; ?>">
|
75 |
<li id="dsq-rate-up-<?php echo $comment['id']; ?>"><a id="dsq-rate-up-a-<?php echo $comment['id']; ?>" class="dsq-arrows" href="#" title="Rate Up"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/arrow2-up.png" alt="^" /></a></li>
|
76 |
<li id="dsq-rate-down-<?php echo $comment['id']; ?>"><a id="dsq-rate-down-a-<?php echo $comment['id']; ?>" class="dsq-arrows" href="#" title="Rate Down"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/arrow2-down.png" alt="v" /></a></li>
|
78 |
<div id="dsq-comment-header-<?php echo $comment['id']; ?>" class="dsq-comment-header">
|
79 |
<div class="dsq-header-avatar" id="dsq-header-avatar-<?php echo $comment['id']; ?>">
|
80 |
<a id="dsq-avatar-<?php echo $comment['id']; ?>" href="<?php echo $dsq_profile_url; ?>" title="Profile">
|
81 |
+
<img src="<?php echo $comment['user']['avatar_url']; ?>" alt="" />
|
82 |
</a>
|
83 |
<ul id="dsq-menu-<?php echo $comment['id']; ?>" class="dsq-menu" style="display:none">
|
84 |
<?php if ( $comment['parent_id'] ) : ?>
|
87 |
<li><a href="#comment-<?php echo $comment['id']; ?>">Permalink</a></li>
|
88 |
<li style="display: none">
|
89 |
<a id="dsq-admin-toggle-<?php echo $comment['id']; ?>" class="dsq-admin-toggle" href="#">
|
90 |
+
Admin<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/pointer-right.png" alt="" />
|
91 |
</a>
|
92 |
</li>
|
93 |
<li id="dsq-admin-panel-<?php echo $comment['id']; ?>" class="dsq-admin-panel" style="display: none">
|
107 |
|
108 |
<cite id="dsq-cite-<?php echo $comment['id']; ?>">
|
109 |
<?php if($comment['user']['url']) : ?>
|
110 |
+
<a id="dsq-author-user-<?php echo $comment['id']; ?>" href="<?php echo $comment['user']['url']; ?>" rel="nofollow">
|
111 |
<?php echo $comment['user']['display_name']; ?>
|
112 |
</a>
|
113 |
<?php else: ?>
|
135 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_preview'><a href="http://www.seesmic.com/video/<?php echo $comment['seesmic']['id'][0]; ?>" target='_blank' class='see_link'> </a>
|
136 |
<div style='display:block;width:160px; height:120px; border:none; background-image:url(<?php echo $comment['seesmic']['metadata'][0]; ?>)'>
|
137 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_hide' class='seePlayOverlay' style='display:none;'>
|
138 |
+
<img onclick="see_play_video('<?php echo $comment['seesmic']['id'][0]; ?>',false)" src='<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/stopOverlay.png' width='50' height='50' style='cursor:pointer; cursor:hand; padding-top: 30px; padding-left: 50px' alt="" />
|
139 |
</div>
|
140 |
<div id='<?php echo $comment['seesmic']['id'][0]; ?>_show' class='seePlayOverlay'>
|
141 |
+
<img onclick="see_play_video('<?php echo $comment['seesmic']['id'][0]; ?>',true)" src='<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/playOverlay.png' width='50' height='50' style='cursor:pointer; cursor:hand; border:none; padding-top: 30px; padding-left: 50px' alt="" />
|
142 |
</div>
|
143 |
</div>
|
144 |
</div>
|
152 |
<span id="dsq-edit-wrap-<?php echo $comment['id'] ?>" style="display: none">
|
153 |
<a href="#" id="dsq-edit-<?php echo $comment['id'] ?>" style="display: none">edit</a>
|
154 |
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
<?php if ( $dsq_response['seesmic_enabled'] ) : ?>
|
156 |
+
<a id="dsq-post-video-<?php echo $comment['id']; ?>" href="#" style="display: none"><img src="<?php echo DISQUS_MEDIA_URL; ?>/images/seesmic/record.png" class="dsq-record-img" alt="" /> record video comment</a>
|
157 |
<?php endif ; ?>
|
|
|
|
|
158 |
<?php endif ; ?>
|
159 |
+
<span id="dsq-reblog-wrap-<?php echo $comment['id'] ?>" style="display: none">
|
160 |
+
<a href="#" id="dsq-reblog-<?php echo $comment['id'] ?>" class="dsq-reblog">reblog</a>
|
161 |
+
</span>
|
162 |
+
<span id="dsq-post-report-<?php echo $comment['id'] ?>" style="display: none">
|
163 |
+
<a id="dsq-post-report-a-<?php echo $comment['id'] ?>" href="#" class="dsq-post-report">flag</a>
|
164 |
+
</span>
|
165 |
+
<div id="dsq-reply-<?php echo $comment['id']; ?>"><!-- iframe .dsq-post-reply injected here --></div>
|
166 |
</div>
|
167 |
|
168 |
<div id="dsq-hidden-data-<?php echo $comment['id']; ?>" style="display:none">
|
188 |
<span style="display: none" id="dsq-hidden-flickr-<?php echo $comment['id']; ?>"></span>
|
189 |
<span style="display: none" id="dsq-hidden-tumblr-<?php echo $comment['id']; ?>"></span>
|
190 |
<?php endif; ?>
|
191 |
+
<span style="display: none" id="dsq-hidden-avatar-<?php echo $comment['id']; ?>"><img src="<?php echo $comment['user']['avatar_url']; ?>" alt="" /></span>
|
192 |
</div>
|
193 |
</li>
|
194 |
<?php endif ; ?>
|
213 |
</div>
|
214 |
</div>
|
215 |
<?php else : ?>
|
216 |
+
<span id="dsq-post-add">Comments for this post are closed.</span>
|
217 |
<?php endif ; ?>
|
218 |
</div>
|
219 |
<?php if ($dsq_response['linkbacks_enabled'] ) : ?>
|
257 |
<ul>
|
258 |
<li style="display:none">
|
259 |
<a id="dsq-service-blog" href="#" target="_blank">
|
260 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/blog.png" alt="" />
|
261 |
</a>
|
262 |
</li>
|
263 |
<li style="display:none">
|
264 |
<a id="dsq-service-facebook" href="#" target="_blank">
|
265 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/facebook.png" alt="" />
|
266 |
</a>
|
267 |
</li>
|
268 |
<li style="display:none">
|
269 |
<a id="dsq-service-linkedin" href="#" target="_blank">
|
270 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/linkedin.png" alt="" />
|
271 |
</a>
|
272 |
</li>
|
273 |
<li style="display:none">
|
274 |
<a id="dsq-service-twitter" href="#" target="_blank">
|
275 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/twitter.png" alt="" />
|
276 |
</a>
|
277 |
</li>
|
278 |
<li style="display:none">
|
279 |
<a id="dsq-service-delicious" href="#" target="_blank">
|
280 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/delicious.png" alt="" />
|
281 |
</a>
|
282 |
</li>
|
283 |
<li style="display:none">
|
284 |
<a id="dsq-service-flickr" href="#" target="_blank">
|
285 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/flickr.png" alt="" />
|
286 |
</a>
|
287 |
</li>
|
288 |
<li style="display:none">
|
289 |
<a id="dsq-service-tumblr" href="#" target="_blank">
|
290 |
+
<img src="<?php echo DISQUS_MEDIA_URL; ?>/images/embed/services/tumblr.png" alt="" />
|
291 |
</a>
|
292 |
</li>
|
293 |
</ul>
|
331 |
<!-- /embed_thread_profile.html -->
|
332 |
|
333 |
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
|
|
|
|
334 |
<script type="text/javascript" charset="utf-8">
|
335 |
var disqusMediaUrl = "<?php echo DISQUS_MEDIA_URL; ?>";
|
336 |
var threadEl = document.getElementById('dsq-content');
|
disqus.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: DISQUS Comment System
|
|
4 |
Plugin URI: http://disqus.com/
|
5 |
Description: The DISQUS comment system replaces your WordPress comment system with your comments hosted and powered by DISQUS. Head over to the Comments admin page to set up your DISQUS Comment System.
|
6 |
Author: DISQUS.com <team@disqus.com>
|
7 |
-
Version: 2.
|
8 |
Author URI: http://disqus.com/
|
9 |
|
10 |
*/
|
@@ -24,7 +24,7 @@ require_once('lib/api.php');
|
|
24 |
* @global string $dsq_version
|
25 |
* @since 1.0
|
26 |
*/
|
27 |
-
$dsq_version = '2.
|
28 |
/**
|
29 |
* Response from DISQUS get_thread API call for comments template.
|
30 |
*
|
@@ -159,12 +159,44 @@ function dsq_sync_comments($post, $comments) {
|
|
159 |
wp_insert_comment($commentdata);
|
160 |
}
|
161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
}
|
163 |
|
164 |
/**
|
165 |
* Filters/Actions
|
166 |
*/
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
function dsq_comments_template($value) {
|
169 |
global $dsq_response;
|
170 |
global $dsq_sort;
|
@@ -222,7 +254,7 @@ function dsq_comment_count() {
|
|
222 |
}
|
223 |
|
224 |
?>
|
225 |
-
|
226 |
<script type="text/javascript">
|
227 |
// <![CDATA[
|
228 |
(function() {
|
@@ -234,7 +266,7 @@ function dsq_comment_count() {
|
|
234 |
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
235 |
}
|
236 |
}
|
237 |
-
document.write('<script type="text/javascript" src="<?php echo DISQUS_URL ?>/forums/<?php echo strtolower(get_option('disqus_forum_url')); ?>/get_num_replies.js' + query + '"><' + '/script>');
|
238 |
})();
|
239 |
//]]>
|
240 |
</script>
|
@@ -265,7 +297,7 @@ function dsq_comments_number($comment_text) {
|
|
265 |
$the_permalink = ob_get_contents();
|
266 |
ob_end_clean();
|
267 |
|
268 |
-
return '</a><noscript><a href="http://' . strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/?url=' . $the_permalink .'">View comments</a></noscript><a href="' . $the_permalink . '#disqus_thread">Comments
|
269 |
} else {
|
270 |
return $comment_text;
|
271 |
}
|
4 |
Plugin URI: http://disqus.com/
|
5 |
Description: The DISQUS comment system replaces your WordPress comment system with your comments hosted and powered by DISQUS. Head over to the Comments admin page to set up your DISQUS Comment System.
|
6 |
Author: DISQUS.com <team@disqus.com>
|
7 |
+
Version: 2.04-3953
|
8 |
Author URI: http://disqus.com/
|
9 |
|
10 |
*/
|
24 |
* @global string $dsq_version
|
25 |
* @since 1.0
|
26 |
*/
|
27 |
+
$dsq_version = '2.04';
|
28 |
/**
|
29 |
* Response from DISQUS get_thread API call for comments template.
|
30 |
*
|
159 |
wp_insert_comment($commentdata);
|
160 |
}
|
161 |
}
|
162 |
+
|
163 |
+
if( isset($_POST['dsq_api_key']) && $_POST['dsq_api_key'] == get_option('disqus_api_key') ) {
|
164 |
+
if( isset($_GET['dsq_sync_action']) && isset($_GET['dsq_sync_comment_id']) ) {
|
165 |
+
$comment_parts = explode('=', $_GET['dsq_sync_comment_id']);
|
166 |
+
if( 'wp_id' == $comment_parts[0] ) {
|
167 |
+
$comment_id = intval($comment_parts[1]);
|
168 |
+
} else {
|
169 |
+
$comment_id = $wpdb->get_var('SELECT comment_ID FROM ' . $wpdb->prefix . 'comments WHERE comment_post_ID=' . intval($post->ID) . " AND comment_agent LIKE 'Disqus/1.0:" . intval($comment_parts[1]) . "'");
|
170 |
+
}
|
171 |
+
|
172 |
+
switch( $_GET['dsq_sync_action'] ) {
|
173 |
+
case 'mark_spam':
|
174 |
+
wp_set_comment_status($comment_id, 'spam');
|
175 |
+
echo "<!-- dsq_sync: wp_set_comment_status($comment_id, 'spam') -->";
|
176 |
+
break;
|
177 |
+
case 'mark_approved':
|
178 |
+
wp_set_comment_status($comment_id, 'approve');
|
179 |
+
echo "<!-- dsq_sync: wp_set_comment_status($comment_id, 'approve') -->";
|
180 |
+
break;
|
181 |
+
case 'mark_killed':
|
182 |
+
wp_set_comment_status($comment_id, 'hold');
|
183 |
+
echo "<!-- dsq_sync: wp_set_comment_status($comment_id, 'hold') -->";
|
184 |
+
break;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
}
|
189 |
|
190 |
/**
|
191 |
* Filters/Actions
|
192 |
*/
|
193 |
|
194 |
+
function dsq_get_style() {
|
195 |
+
echo "<link rel=\"stylesheet\" href=\"" . DISQUS_API_URL ."/stylesheets/" . strtolower(get_option('disqus_forum_url')) . "/disqus.css\" type=\"text/css\" media=\"screen\" />";
|
196 |
+
}
|
197 |
+
|
198 |
+
add_action('wp_head','dsq_get_style');
|
199 |
+
|
200 |
function dsq_comments_template($value) {
|
201 |
global $dsq_response;
|
202 |
global $dsq_sort;
|
254 |
}
|
255 |
|
256 |
?>
|
257 |
+
|
258 |
<script type="text/javascript">
|
259 |
// <![CDATA[
|
260 |
(function() {
|
266 |
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
267 |
}
|
268 |
}
|
269 |
+
document.write('<script charset="utf-8" type="text/javascript" src="<?php echo DISQUS_URL ?>/forums/<?php echo strtolower(get_option('disqus_forum_url')); ?>/get_num_replies.js' + query + '"><' + '/script>');
|
270 |
})();
|
271 |
//]]>
|
272 |
</script>
|
297 |
$the_permalink = ob_get_contents();
|
298 |
ob_end_clean();
|
299 |
|
300 |
+
return '</a><noscript><a href="http://' . strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . '/?url=' . $the_permalink .'">View comments</a></noscript><a class="dsq-comment-count" href="' . $the_permalink . '#disqus_thread">Comments';
|
301 |
} else {
|
302 |
return $comment_text;
|
303 |
}
|
manage.php
CHANGED
@@ -6,7 +6,6 @@ if ( !defined('PLUGINDIR') ) {
|
|
6 |
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
|
7 |
}
|
8 |
|
9 |
-
|
10 |
function dsq_plugin_basename($file) {
|
11 |
$file = dirname($file);
|
12 |
|
@@ -33,6 +32,14 @@ if ( !current_user_can('manage_options') ) {
|
|
33 |
die();
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
// HACK: For old versions of WordPress
|
37 |
if ( !function_exists('wp_nonce_field') ) {
|
38 |
function wp_nonce_field() {}
|
6 |
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
|
7 |
}
|
8 |
|
|
|
9 |
function dsq_plugin_basename($file) {
|
10 |
$file = dirname($file);
|
11 |
|
32 |
die();
|
33 |
}
|
34 |
|
35 |
+
if(isset($_POST['dsq_username'])) {
|
36 |
+
$_POST['dsq_username'] = stripslashes($_POST['dsq_username']);
|
37 |
+
}
|
38 |
+
|
39 |
+
if(isset($_POST['dsq_password'])) {
|
40 |
+
$_POST['dsq_password'] = stripslashes($_POST['dsq_password']);
|
41 |
+
}
|
42 |
+
|
43 |
// HACK: For old versions of WordPress
|
44 |
if ( !function_exists('wp_nonce_field') ) {
|
45 |
function wp_nonce_field() {}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: DISQUS.com <team@disqus.com>
|
|
3 |
Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget
|
4 |
Requires at least: 2.0
|
5 |
Tested up to: 2.6.1
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
The DISQUS comment system replaces your WordPress comment system with your comments hosted and powered by DISQUS.
|
9 |
|
3 |
Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget
|
4 |
Requires at least: 2.0
|
5 |
Tested up to: 2.6.1
|
6 |
+
Stable tag: 2.04.3953
|
7 |
|
8 |
The DISQUS comment system replaces your WordPress comment system with your comments hosted and powered by DISQUS.
|
9 |
|