CommentLuv - Version 2.81.3

Version Description

  • Change the way to detect if on a multi site install or not
  • updated one of the badges
Download this release

Release Info

Developer commentluv
Plugin Icon 128x128 CommentLuv
Version 2.81.3
Comparing to
See all releases

Code changes from version 2.81.2 to 2.81.3

Files changed (4) hide show
  1. commentluv.php +19 -4
  2. images/CL91_White.gif +0 -0
  3. js/commentluv.js +5 -0
  4. readme.txt +8 -4
commentluv.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php /* CommentLuv 2.81.2
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.81.2
6
  Author: Andy Bailey
7
  Author URI: http://fiddyp.co.uk/
8
  */
@@ -14,7 +14,7 @@ if (! class_exists ( 'commentluv' )) {
14
  var $plugin_domain = 'commentluv';
15
  var $plugin_url;
16
  var $db_option = 'commentluv_options';
17
- var $cl_version = 281.2;
18
  var $api_url;
19
  var $test = false;
20
 
@@ -290,7 +290,7 @@ if (! class_exists ( 'commentluv' )) {
290
  $url = "http://".$url;
291
  }
292
  // check for MU blog
293
- if (function_exists ( 'is_site_admin' )) {
294
  if (! $url || $url == "http://") {
295
  $userbloginfo = get_blogs_of_user ( $userid, 1 );
296
  $url = $userbloginfo [1]->siteurl;
@@ -478,6 +478,21 @@ if (! class_exists ( 'commentluv' )) {
478
  }
479
  return $content;
480
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  // find last occurrence of string in string (for php 4)
482
  function my_strrpos($haystack, $needle, $offset = 0) {
483
  // same as strrpos, except $needle can be a string
1
+ <?php /* CommentLuv 2.81.3
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.81.3
6
  Author: Andy Bailey
7
  Author URI: http://fiddyp.co.uk/
8
  */
14
  var $plugin_domain = 'commentluv';
15
  var $plugin_url;
16
  var $db_option = 'commentluv_options';
17
+ var $cl_version = 281.3;
18
  var $api_url;
19
  var $test = false;
20
 
290
  $url = "http://".$url;
291
  }
292
  // check for MU blog
293
+ if ($this->check_this_is_multsite()) {
294
  if (! $url || $url == "http://") {
295
  $userbloginfo = get_blogs_of_user ( $userid, 1 );
296
  $url = $userbloginfo [1]->siteurl;
478
  }
479
  return $content;
480
  }
481
+
482
+ // from http://frumph.net/wordpress/wordpress-plugin-theme-check-for-multisitewpmu/
483
+ // check for multisite. Returns boolean
484
+ function check_this_is_multsite() {
485
+ global $wpmu_version;
486
+ if (function_exists('is_multisite')){
487
+ if (is_multisite()) {
488
+ return true;
489
+ }
490
+ if (!empty($wpmu_version)){
491
+ return true;
492
+ }
493
+ }
494
+ return false;
495
+ }
496
  // find last occurrence of string in string (for php 4)
497
  function my_strrpos($haystack, $needle, $offset = 0) {
498
  // same as strrpos, except $needle can be a string
images/CL91_White.gif CHANGED
Binary file
js/commentluv.js CHANGED
@@ -161,6 +161,11 @@
161
  $('#lastposts').empty();
162
  // get if is a member and other meta data
163
  var ismember = data.meta[0].ismember;
 
 
 
 
 
164
  $('#cl_memberid').val(ismember);
165
  cl_settings['request_id'] = data.meta[0].request_id;
166
  cl_settings['alert_message'] = data.meta[0].alert_message;
161
  $('#lastposts').empty();
162
  // get if is a member and other meta data
163
  var ismember = data.meta[0].ismember;
164
+ if(ismember < 2){
165
+ // uncomment below to only show luv to registered comluv users.
166
+ //$('#mylastpost').html('Only registered comluv users can receive luv');
167
+ //return;
168
+ }
169
  $('#cl_memberid').val(ismember);
170
  cl_settings['request_id'] = data.meta[0].request_id;
171
  cl_settings['alert_message'] = data.meta[0].alert_message;
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === CommentLuv ===
2
- Contributors: teamplaylotto, @commentluv, @hishaman (css additions)
3
  Donate link:http://comluv.com/about/donate
4
  Tags: commentluv, comments, last blog post, linkluv, comment luv
5
  Requires at least: 2.9.2
6
  Tested up to: 3.0.1
7
- Stable tag: 2.81.2
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
 
@@ -53,6 +53,10 @@ You can submit a support ticket at http://comluv.com
53
  4. edit post comments
54
 
55
  == ChangeLog ==
 
 
 
 
56
  = 2.81.2 =
57
  * silly me, put the version number wrong!
58
  * Set back to default settings if upgrading from less than 2.81
@@ -141,9 +145,9 @@ You can submit a support ticket at http://comluv.com
141
 
142
  == Upgrade Notice ==
143
 
144
- = 2.81.2 =
145
 
146
- Shows url field on buddypress and fixes version number and badge display.
147
 
148
 
149
  == Configuration ==
1
  === CommentLuv ===
2
+ Contributors: commentluv, @hishaman (css additions)
3
  Donate link:http://comluv.com/about/donate
4
  Tags: commentluv, comments, last blog post, linkluv, comment luv
5
  Requires at least: 2.9.2
6
  Tested up to: 3.0.1
7
+ Stable tag: 2.81.3
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
 
53
  4. edit post comments
54
 
55
  == ChangeLog ==
56
+ = 2.81.3 =
57
+ * Change the way to detect if on a multi site install or not
58
+ * updated one of the badges
59
+
60
  = 2.81.2 =
61
  * silly me, put the version number wrong!
62
  * Set back to default settings if upgrading from less than 2.81
145
 
146
  == Upgrade Notice ==
147
 
148
+ = 2.81.3 =
149
 
150
+ Fix : change the way multisite is detected to prevent errors on versions of wordpress less than 3.0
151
 
152
 
153
  == Configuration ==