Version Description
Download this release
Release Info
Developer | teamplaylotto |
Plugin | CommentLuv |
Version | 2.7.6.9 |
Comparing to | |
See all releases |
Code changes from version 2.7.6.8 to 2.7.6.9
- commentluv.php +5 -4
- js/commentluv.js +4 -2
- readme.txt +7 -1
commentluv.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Plugin Name: CommentLuv
|
3 |
Plugin URI: http://comluv.com/download/commentluv-wordpress/
|
4 |
Description: Plugin to show a link to the last post from the commenters blog by parsing the feed at their given URL when they leave a comment. Rewards your readers and encourage more comments.
|
5 |
-
Version: 2.7.
|
6 |
Author: Andy Bailey
|
7 |
Author URI: http://fiddyp.co.uk/
|
8 |
*/
|
@@ -252,7 +252,8 @@ if (! class_exists ( 'commentluv' )) {
|
|
252 |
echo '<input type="hidden" name="cl_type" />';
|
253 |
echo '<input type="hidden" name="choice_id" />';
|
254 |
echo '<input type="hidden" name="request_id" />';
|
255 |
-
echo '<input type="hidden" name="
|
|
|
256 |
$fieldsadded = TRUE;
|
257 |
}
|
258 |
// check if using php call comments.php or not
|
@@ -265,7 +266,7 @@ if (! class_exists ( 'commentluv' )) {
|
|
265 |
|
266 |
// hook the pre_comment_content to add the link
|
267 |
function cl_post($commentdata) {
|
268 |
-
if (isset ( $_POST ['
|
269 |
if(!defined('LUVEDIT')){
|
270 |
define("LUVEDIT",1);
|
271 |
} else {
|
@@ -273,7 +274,7 @@ if (! class_exists ( 'commentluv' )) {
|
|
273 |
return $commentdata;
|
274 |
}
|
275 |
// get values posted
|
276 |
-
$luvlink =
|
277 |
if (strstr ( $luvlink, "commentluv.com/error-check" ) || $_POST ['request_id'] == 0) {
|
278 |
return $commentdata;
|
279 |
}
|
2 |
Plugin Name: CommentLuv
|
3 |
Plugin URI: http://comluv.com/download/commentluv-wordpress/
|
4 |
Description: Plugin to show a link to the last post from the commenters blog by parsing the feed at their given URL when they leave a comment. Rewards your readers and encourage more comments.
|
5 |
+
Version: 2.7.69
|
6 |
Author: Andy Bailey
|
7 |
Author URI: http://fiddyp.co.uk/
|
8 |
*/
|
252 |
echo '<input type="hidden" name="cl_type" />';
|
253 |
echo '<input type="hidden" name="choice_id" />';
|
254 |
echo '<input type="hidden" name="request_id" />';
|
255 |
+
echo '<input type="hidden" name="cl_post_title" id="cl_post_title"/>';
|
256 |
+
echo '<input type="hidden" name="cl_post_url" id="cl_post_url"/>';
|
257 |
$fieldsadded = TRUE;
|
258 |
}
|
259 |
// check if using php call comments.php or not
|
266 |
|
267 |
// hook the pre_comment_content to add the link
|
268 |
function cl_post($commentdata) {
|
269 |
+
if (isset ( $_POST ['cl_post_title'] ) && $_POST ['request_id'] != '' && is_numeric ( $_POST ['choice_id'] ) && isset ( $_POST ['cl_type'] )) {
|
270 |
if(!defined('LUVEDIT')){
|
271 |
define("LUVEDIT",1);
|
272 |
} else {
|
274 |
return $commentdata;
|
275 |
}
|
276 |
// get values posted
|
277 |
+
$luvlink = '<a href="'.$_POST ['cl_post_url'].'">'.$_POST['cl_post_title'].'</a>';
|
278 |
if (strstr ( $luvlink, "commentluv.com/error-check" ) || $_POST ['request_id'] == 0) {
|
279 |
return $commentdata;
|
280 |
}
|
js/commentluv.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
(function($) {
|
3 |
$(document).ready(function(){
|
4 |
// get form object that is parent of textarea named "comment"
|
5 |
-
var formObj = $("#
|
6 |
|
7 |
// set url, email, comment and author field objects
|
8 |
var urlObj = cl_settings['urlObj'] = $("input[name='" + cl_settings['url'] + "']",formObj);
|
@@ -175,7 +175,9 @@
|
|
175 |
$('input[name="request_id"]').val(cl_settings['request_id']);
|
176 |
$('input[name="choice_id"]').val("0");
|
177 |
$('input[name="cl_type"]').val(data.items[0]['type']);
|
178 |
-
|
|
|
|
|
179 |
});
|
180 |
// disable focus event
|
181 |
$("textarea[name='" + cl_settings['comment'] + "']").unbind();
|
2 |
(function($) {
|
3 |
$(document).ready(function(){
|
4 |
// get form object that is parent of textarea named "comment"
|
5 |
+
var formObj = $("#cl_post_title").parents("form");
|
6 |
|
7 |
// set url, email, comment and author field objects
|
8 |
var urlObj = cl_settings['urlObj'] = $("input[name='" + cl_settings['url'] + "']",formObj);
|
175 |
$('input[name="request_id"]').val(cl_settings['request_id']);
|
176 |
$('input[name="choice_id"]').val("0");
|
177 |
$('input[name="cl_type"]').val(data.items[0]['type']);
|
178 |
+
//$('#cl_post').val('<a href="' + data.items[0].url + '">' + data.items[0]['title'] + '</a>');
|
179 |
+
$('#cl_post_url').val(data.items[0].url);
|
180 |
+
$('#cl_post_title').val(data.items[0]['title']);
|
181 |
});
|
182 |
// disable focus event
|
183 |
$("textarea[name='" + cl_settings['comment'] + "']").unbind();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:http://comluv.com/about/donate
|
|
4 |
Tags: commentluv, comments, last blog post, linkluv
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.9.2
|
7 |
-
Stable tag: 2.7.
|
8 |
|
9 |
Reward your readers by automatically placing a link to their last blog post at the end of their comment. Encourage a community and discover new posts.
|
10 |
|
@@ -47,6 +47,12 @@ You can submit a support ticket at http://comluv.com
|
|
47 |
|
48 |
== ChangeLog ==
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= 2.768 =
|
51 |
* Added nothing.gif to images (for updated error message from API)
|
52 |
|
4 |
Tags: commentluv, comments, last blog post, linkluv
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.9.2
|
7 |
+
Stable tag: 2.7.69
|
8 |
|
9 |
Reward your readers by automatically placing a link to their last blog post at the end of their comment. Encourage a community and discover new posts.
|
10 |
|
47 |
|
48 |
== ChangeLog ==
|
49 |
|
50 |
+
= 2.769 =
|
51 |
+
* Modified hidden post fields so only URL and title sent instead of html A href link
|
52 |
+
* Modified javascript to take account of new hidden fields.
|
53 |
+
* Temporary fix to try and fix 404 on wp-post-comments.php when commentluv enabled for logged out user
|
54 |
+
* thanks to @kwbridge @duane_scott @dannybrown @morpheas7887 for testing and feedback!
|
55 |
+
|
56 |
= 2.768 =
|
57 |
* Added nothing.gif to images (for updated error message from API)
|
58 |
|