CommentLuv - Version 2.5.3

Version Description

Download this release

Release Info

Developer teamplaylotto
Plugin Icon 128x128 CommentLuv
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

Files changed (4) hide show
  1. commentluv.php +16 -11
  2. js/commentluv.js +17 -6
  3. js/processclick.js +0 -11
  4. readme.txt +1 -1
commentluv.php CHANGED
@@ -2,7 +2,7 @@
2
  Plugin Name: commentluv
3
  Plugin URI: http://www.commentluv.com/download/ajax-commentluv-installation/
4
  Description: Plugin to show a link to the last post from the commenters blog in their comment. Just activate and it's ready. Will parse a feed from most sites that have a feed location specified in its head html. See the <a href="options-general.php?page=commentluv">Settings Page</a> for styling and text output options.
5
- Version: 2.5.2
6
  Author: Andy Bailey
7
  Author URI: http://www.fiddyp.co.uk/
8
 
@@ -10,6 +10,7 @@ Author URI: http://www.fiddyp.co.uk/
10
  You can now edit the options from the dashboard
11
  *********************************************************************
12
  updates:
 
13
  2.5.2 - 4 oct 08 - oh dear silly me, forgot to enclose an ==TRUE with quotes. (line 302) heart info box now can be switched off. thanks Ute from http://www.utes-dezines.de for you feedback.
14
  2.5.1 - fix for pesky IE and Chrome
15
  2.5 2nd oct 08 - fix for the people that can rtfm and added checkbox for traditonal users to be happy. show badge but no action for admin (again for the !rtfm's)
@@ -171,8 +172,8 @@ function commentluv_setup()
171
  function commentluv_activation(){
172
  // set version for future releases if they need to change a value
173
  $version=get_option('cl_version');
174
- if($version<252){
175
- update_option('cl_version','252');
176
  }
177
  }
178
 
@@ -230,7 +231,7 @@ function show_cl_options() {
230
  add_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
231
  add_option('cl_default_on','TRUE');
232
  add_option('cl_heart_tip','TRUE');
233
- add_option('cl_style','border:1px solid; display:block; padding:4px;');
234
  add_option('cl_author_id','author');
235
  add_option('cl_site_id','url');
236
  add_option('cl_comment_id','comment');
@@ -245,7 +246,7 @@ function show_cl_options() {
245
  add_option('cl_badge_pos','');
246
  add_option('cl_prepend','');
247
  commentluv_activation();
248
- add_option('cl_version','252');
249
  add_option('cl_select_text','choose a different post to show');
250
  }
251
 
@@ -280,6 +281,9 @@ function cl_style_script(){
280
  $cl_default_on=get_option('cl_default_on');
281
  $cl_badge=get_option('cl_badge');
282
  $cl_member_id=get_option('cl_member_id');
 
 
 
283
  $plugin_dir = basename(dirname(__FILE__));
284
 
285
  if($cl_badge=='text'){
@@ -292,12 +296,12 @@ function cl_style_script(){
292
 
293
  // start the javascript output
294
  if(is_single()) {
295
- echo '<!-- Styling and script added by commentluv 2.5.2 http://www.commentluv.com -->';
296
  echo '<style type="text/css">abbr em{'.get_option('cl_style').'} #lastposts { width: 300px; } </style>';
297
  echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/commentluv.js\"></script>";
298
- if(get_option('cl_click_track')=="on"){
299
- echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/processclick.js\"></script>\n";
300
- }
301
  if(get_option('cl_heart_tip')=="TRUE"){
302
  echo "<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/commentluv/include/tipstyle.css\" type=\"text/css\" />\n";
303
  echo "<script type=\"text/javascript\"><!--//--><![CDATA[//><!--\n";
@@ -343,8 +347,9 @@ function cl_style_script(){
343
  echo "cl_settings[12]=\"$cl_prepend\";\n";
344
  // switch off for admin
345
  if(current_user_can('edit_users')){
346
- echo "cl_settings[13]=\"admin\";";
347
  }
 
348
  echo "commentluv(cl_settings);\n";
349
 
350
  echo "//--><!]]></script>";
@@ -372,7 +377,7 @@ function cl_options_page(){
372
  update_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
373
  update_option('cl_default_on','TRUE');
374
  update_option('cl_heart_tip','TRUE');
375
- update_option('cl_style','border:1px solid; display:block; padding:4px;');
376
  update_option('cl_author_id','author');
377
  update_option('cl_site_id','url');
378
  update_option('cl_comment_id','comment');
2
  Plugin Name: commentluv
3
  Plugin URI: http://www.commentluv.com/download/ajax-commentluv-installation/
4
  Description: Plugin to show a link to the last post from the commenters blog in their comment. Just activate and it's ready. Will parse a feed from most sites that have a feed location specified in its head html. See the <a href="options-general.php?page=commentluv">Settings Page</a> for styling and text output options.
5
+ Version: 2.5.3
6
  Author: Andy Bailey
7
  Author URI: http://www.fiddyp.co.uk/
8
 
10
  You can now edit the options from the dashboard
11
  *********************************************************************
12
  updates:
13
+ 2.5.3 - fix for clicktracking off. needs quotes around the 1 too! prettied up default styling for abbr em and fixed an error with click tracking not adding member id by moving the click function to inline with commentluv.js
14
  2.5.2 - 4 oct 08 - oh dear silly me, forgot to enclose an ==TRUE with quotes. (line 302) heart info box now can be switched off. thanks Ute from http://www.utes-dezines.de for you feedback.
15
  2.5.1 - fix for pesky IE and Chrome
16
  2.5 2nd oct 08 - fix for the people that can rtfm and added checkbox for traditonal users to be happy. show badge but no action for admin (again for the !rtfm's)
172
  function commentluv_activation(){
173
  // set version for future releases if they need to change a value
174
  $version=get_option('cl_version');
175
+ if($version<253){
176
+ update_option('cl_version','253');
177
  }
178
  }
179
 
231
  add_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
232
  add_option('cl_default_on','TRUE');
233
  add_option('cl_heart_tip','TRUE');
234
+ add_option('cl_style','border:1px solid #ffffff; background-color: #eeeeee; display:block; padding:4px;');
235
  add_option('cl_author_id','author');
236
  add_option('cl_site_id','url');
237
  add_option('cl_comment_id','comment');
246
  add_option('cl_badge_pos','');
247
  add_option('cl_prepend','');
248
  commentluv_activation();
249
+ add_option('cl_version','253');
250
  add_option('cl_select_text','choose a different post to show');
251
  }
252
 
281
  $cl_default_on=get_option('cl_default_on');
282
  $cl_badge=get_option('cl_badge');
283
  $cl_member_id=get_option('cl_member_id');
284
+ if(!$cl_member_id){
285
+ $cl_member_id="0";
286
+ }
287
  $plugin_dir = basename(dirname(__FILE__));
288
 
289
  if($cl_badge=='text'){
296
 
297
  // start the javascript output
298
  if(is_single()) {
299
+ echo '<!-- Styling and script added by commentluv 2.5.3 http://www.commentluv.com -->';
300
  echo '<style type="text/css">abbr em{'.get_option('cl_style').'} #lastposts { width: 300px; } </style>';
301
  echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/commentluv.js\"></script>";
302
+ //if(get_option('cl_click_track')=="on"){
303
+ //echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/processclick.js\"></script>\n";
304
+ //}
305
  if(get_option('cl_heart_tip')=="TRUE"){
306
  echo "<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/commentluv/include/tipstyle.css\" type=\"text/css\" />\n";
307
  echo "<script type=\"text/javascript\"><!--//--><![CDATA[//><!--\n";
347
  echo "cl_settings[12]=\"$cl_prepend\";\n";
348
  // switch off for admin
349
  if(current_user_can('edit_users')){
350
+ echo "cl_settings[13]=\"admin\";\n";
351
  }
352
+ echo "cl_settings[14]=\"$cl_member_id\";\n";
353
  echo "commentluv(cl_settings);\n";
354
 
355
  echo "//--><!]]></script>";
377
  update_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
378
  update_option('cl_default_on','TRUE');
379
  update_option('cl_heart_tip','TRUE');
380
+ update_option('cl_style','border:2px solid #ffffff; display:block; padding:4px;');
381
  update_option('cl_author_id','author');
382
  update_option('cl_site_id','url');
383
  update_option('cl_comment_id','comment');
js/commentluv.js CHANGED
@@ -9,8 +9,19 @@ function commentluv(cl_settings){
9
  jQuery('#'+cl_settings[0]).after(cl_settings[12]+'<div id="mylastpostbox"><div style="float:left"><input type="checkbox" id="luv" '+cl_settings[9]+'/></div><div style="float:left"><span id="mylastpost" style="clear: both"><a href="http://www.commentluv.com">'+cl_badge+'</a></span>' + '<br/><select name="lastposts" id="lastposts"></select></div></div>');
10
  jQuery('#'+parentformname).append('<input type="hidden" id="cl_post" name="cl_post"></input>');
11
  jQuery('#lastposts').hide();
12
- if(cl_settings[10]){
13
- jQuery('abbr em a').click(processclick);
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
  jQuery(cl_settings[3]).focus(function(){
16
  cl_dostuff(cl_settings);
@@ -22,9 +33,9 @@ function commentluv(cl_settings){
22
  jQuery('#mylastpost a').replaceWith('<a href="' + url + '">' + title + '</a>');
23
  jQuery('#cl_post').val('<a href="' + url + '">' + title + '</a>');
24
  });
25
- jQuery(cl_settings[2]).change(function(){
26
  if(jQuery('#luv').is(":checked")){
27
- jQuery('#lastposts').empty();
28
  jQuery(cl_settings[3]).bind('focus',cl_dostuff(cl_settings));
29
  }
30
  });
@@ -34,10 +45,10 @@ function commentluv(cl_settings){
34
  jQuery('#cl_post').val(jQuery('#mylastpost abbr em').html());
35
  jQuery('#lastposts').attr("disabled", false);
36
  jQuery('#mylastpost abbr em').fadeTo("slow", 1);
37
-
38
  } else {
39
  // was checked, user unchecked it so empty hidden field in form
40
- jQuery('#cl_post').val("");
41
  jQuery('#lastposts').attr("disabled", true);
42
  jQuery('#mylastpost abbr em').fadeTo("slow", 0.33);
43
  }
9
  jQuery('#'+cl_settings[0]).after(cl_settings[12]+'<div id="mylastpostbox"><div style="float:left"><input type="checkbox" id="luv" '+cl_settings[9]+'/></div><div style="float:left"><span id="mylastpost" style="clear: both"><a href="http://www.commentluv.com">'+cl_badge+'</a></span>' + '<br/><select name="lastposts" id="lastposts"></select></div></div>');
10
  jQuery('#'+parentformname).append('<input type="hidden" id="cl_post" name="cl_post"></input>');
11
  jQuery('#lastposts').hide();
12
+ if(cl_settings[10]=="1"){
13
+ var cl_member_id=cl_settings[14];
14
+ jQuery('abbr em a').click(function(){
15
+ var url=jQuery(this).attr('href');
16
+ var thelinkobj=jQuery(this);
17
+ var addit=url + "&cl_member_id=" + cl_member_id + "&callback=?";
18
+ var clurl="http://www.commentluv.com/commentluvinc/ajaxcl_click821.php?url=" + addit;
19
+ jQuery.getJSON(clurl,function(data) {
20
+ jQuery.each(data.msg,function(i,item) {
21
+ jQuery(thelinkobj).text(data.msg[i].text);})
22
+ window.location=url;
23
+ }); return false;
24
+ });
25
  }
26
  jQuery(cl_settings[3]).focus(function(){
27
  cl_dostuff(cl_settings);
33
  jQuery('#mylastpost a').replaceWith('<a href="' + url + '">' + title + '</a>');
34
  jQuery('#cl_post').val('<a href="' + url + '">' + title + '</a>');
35
  });
36
+ jQuery(cl_settings[2]).change(function(){
37
  if(jQuery('#luv').is(":checked")){
38
+ jQuery('#lastposts').empty();
39
  jQuery(cl_settings[3]).bind('focus',cl_dostuff(cl_settings));
40
  }
41
  });
45
  jQuery('#cl_post').val(jQuery('#mylastpost abbr em').html());
46
  jQuery('#lastposts').attr("disabled", false);
47
  jQuery('#mylastpost abbr em').fadeTo("slow", 1);
48
+
49
  } else {
50
  // was checked, user unchecked it so empty hidden field in form
51
+ jQuery('#cl_post').val("");
52
  jQuery('#lastposts').attr("disabled", true);
53
  jQuery('#mylastpost abbr em').fadeTo("slow", 0.33);
54
  }
js/processclick.js DELETED
@@ -1,11 +0,0 @@
1
- function processclick(cl_member_id){
2
- var url=jQuery(this).attr('href');
3
- var thelinkobj=jQuery(this);
4
- var cl_member_id="";
5
- var addit=url + "&cl_member_id=" + cl_member_id + "&callback=?";
6
- var clurl="http://www.commentluv.com/commentluvinc/ajaxcl_click821.php?url=" + addit;
7
- jQuery.getJSON(clurl,function(data) {
8
- jQuery.each(data.msg,function(i,item) {
9
- jQuery(thelinkobj).text(data.msg[i].text);})
10
- window.location=url;
11
- }); return false;}
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Andy Bailey
3
  Tags: comments, linkluv
4
  Requires at least: 2.5
5
  Tested up to: 2.6.2
6
- Stable tag: 2.5.2
7
 
8
  Appends a titled link using AJAX to the authors last blog post on their comment giving back some luv to the people that join your discussion. Compatible with logged on users and Wordpress MU. Visit CommentLuv.com for detailed instructions on features.
9
 
3
  Tags: comments, linkluv
4
  Requires at least: 2.5
5
  Tested up to: 2.6.2
6
+ Stable tag: 2.5.3
7
 
8
  Appends a titled link using AJAX to the authors last blog post on their comment giving back some luv to the people that join your discussion. Compatible with logged on users and Wordpress MU. Visit CommentLuv.com for detailed instructions on features.
9