CommentLuv - Version 2.92.3

Version Description

  • updated : fetch feed function updated to try 1 more alternative if all else fails
  • fixed : wpdb->prepare notice fix
Download this release

Release Info

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

Code changes from version 2.92.2 to 2.92.3

Files changed (2) hide show
  1. commentluv.php +20 -9
  2. readme.txt +9 -4
commentluv.php CHANGED
@@ -2,7 +2,7 @@
2
  Plugin Name: CommentLuv
3
  Plugin URI: http://comluv.com/
4
  Description: 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.
5
- Version: 2.92.2
6
  Author: Andy Bailey
7
  Author URI: http://www.commentluv.com
8
  Copyright (C) <2011> <Andy Bailey>
@@ -28,7 +28,7 @@
28
  var $plugin_url;
29
  var $plugin_dir;
30
  var $db_option = 'commentluv_options';
31
- var $version = "2.92.2";
32
  var $slug = 'commentluv-options';
33
  var $localize;
34
  var $is_commentluv_request = false;
@@ -876,10 +876,21 @@
876
  }
877
  $rss->set_feed_url($url);
878
  $rss->init();
879
- if(stripos($ferror,'invalid')){
880
- //get raw file to show any errors
881
- $rawfile = new $rss->file_class($rss->feed_url, $rss->timeout, 5, null, $rss->useragent, $rss->force_fsockopen);
882
- $rawfile = $rawfile->body;
 
 
 
 
 
 
 
 
 
 
 
883
  }
884
  }
885
  $rss->handle_content_type();
@@ -1015,8 +1026,8 @@
1015
  * This function registers styles and scripts
1016
  */
1017
  function init(){
1018
- wp_register_style( 'commentluv_style',$this->plugin_url.'css/commentluv.css' );
1019
- wp_register_script( 'commentluv_script', $this->plugin_url.'js/commentluv.js',array('jquery') );
1020
  }
1021
  /** install
1022
  * This function is called when the plugin activation hook is fired when
@@ -1050,7 +1061,7 @@
1050
  }
1051
  // has the comment meta table?
1052
  global $wpdb;
1053
- $query = $wpdb->prepare("SHOW tables LIKE '{$wpdb->commentmeta}'");
1054
  $dbtable = $wpdb->get_var($query);
1055
  //$o['dbtable'] = $dbtable;
1056
  if(!$dbtable){
2
  Plugin Name: CommentLuv
3
  Plugin URI: http://comluv.com/
4
  Description: 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.
5
+ Version: 2.92.3
6
  Author: Andy Bailey
7
  Author URI: http://www.commentluv.com
8
  Copyright (C) <2011> <Andy Bailey>
28
  var $plugin_url;
29
  var $plugin_dir;
30
  var $db_option = 'commentluv_options';
31
+ var $version = "2.92.3";
32
  var $slug = 'commentluv-options';
33
  var $localize;
34
  var $is_commentluv_request = false;
876
  }
877
  $rss->set_feed_url($url);
878
  $rss->init();
879
+ $ferror = $rss->error();
880
+ if($ferror || stripos($ferror,'invalid')){
881
+ unset($rss);
882
+ $rss = new SimplePie();
883
+ $rss->set_useragent('Commentluv /'.$this->version.' (Feed Parser; http://www.commentluv.com; Allow like Gecko) Build/20110502' );
884
+ $rss->enable_cache ( FALSE );
885
+ $rss->set_feed_url($url);
886
+ $rss->init();
887
+ $ferror = $rss->error();
888
+ // go back to original URL if error persisted
889
+ if(stripos($ferror,'invalid')){
890
+ //get raw file to show any errors
891
+ $rawfile = new $rss->file_class($rss->feed_url, $rss->timeout, 5, null, $rss->useragent, $rss->force_fsockopen);
892
+ $rawfile = $rawfile->body;
893
+ }
894
  }
895
  }
896
  $rss->handle_content_type();
1026
  * This function registers styles and scripts
1027
  */
1028
  function init(){
1029
+ wp_register_style( 'commentluv_style',$this->plugin_url.'css/commentluv.css' , $this->version);
1030
+ wp_register_script( 'commentluv_script', $this->plugin_url.'js/commentluv.js',array('jquery'),$this->version );
1031
  }
1032
  /** install
1033
  * This function is called when the plugin activation hook is fired when
1061
  }
1062
  // has the comment meta table?
1063
  global $wpdb;
1064
+ $query = $wpdb->prepare("SHOW tables LIKE %s",$wpdb->commentmeta);
1065
  $dbtable = $wpdb->get_var($query);
1066
  //$o['dbtable'] = $dbtable;
1067
  if(!$dbtable){
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: commentluv, @hishaman (css additions)
3
  Donate link:http://comluv.com/about/donate
4
  Tags: commentluv, comments, last blog post, linkluv, comment luv , commentlove, comment love
5
  Requires at least: 3.0
6
- Tested up to: 3.4
7
- Stable tag: 2.92.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
 
@@ -86,6 +86,11 @@ Please see the videos in the settings page for explanations of how they work.
86
 
87
  == ChangeLog ==
88
 
 
 
 
 
 
89
  = 2.92.2 =
90
 
91
  * updated : updated Italian translation (thanks Gianni!)
@@ -366,9 +371,9 @@ Please see the videos in the settings page for explanations of how they work.
366
 
367
  == Upgrade Notice ==
368
 
369
- = 2.92 =
370
 
371
- Fix jetpack plugin compatibility (dont enable comments module) . Italian translation updated
372
 
373
  == Configuration ==
374
 
3
  Donate link:http://comluv.com/about/donate
4
  Tags: commentluv, comments, last blog post, linkluv, comment luv , commentlove, comment love
5
  Requires at least: 3.0
6
+ Tested up to: 3.5
7
+ Stable tag: 2.92.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
 
86
 
87
  == ChangeLog ==
88
 
89
+ = 2.92.3 =
90
+
91
+ * updated : fetch feed function updated to try 1 more alternative if all else fails
92
+ * fixed : wpdb->prepare notice fix
93
+
94
  = 2.92.2 =
95
 
96
  * updated : updated Italian translation (thanks Gianni!)
371
 
372
  == Upgrade Notice ==
373
 
374
+ = 2.92.3 =
375
 
376
+ Fix for wordpress 3.5 wpdb->prepare notice
377
 
378
  == Configuration ==
379