CommentLuv - Version 2.94

Version Description

  • fixed : undefined index error on display of feed if can't found in settings page
  • added : you can now uncheck the option to use the security nonce for ajax calls (in cases where blogs are using a peristent cache)
Download this release

Release Info

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

Code changes from version 2.93.8 to 2.94

Files changed (2) hide show
  1. commentluv.php +23 -11
  2. readme.txt +23 -2
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.93.8
6
  Author: Andy Bailey
7
  Author URI: http://www.commentluv.com
8
  Copyright (C) <2011> <Andy Bailey>
@@ -28,7 +28,7 @@ if (! class_exists ( 'commentluv' )) {
28
  var $plugin_url;
29
  var $plugin_dir;
30
  var $db_option = 'commentluv_options';
31
- var $version = "2.93.8";
32
  var $slug = 'commentluv-options';
33
  var $localize;
34
  var $is_commentluv_request = false;
@@ -587,10 +587,12 @@ if (! class_exists ( 'commentluv' )) {
587
  * sends back json encoded string for the content of the panel
588
  */
589
  function do_info(){
590
-
591
- check_ajax_referer('info');
592
- global $wpdb;
593
  $options = $this->get_options();
 
 
 
 
 
594
  $isreg = false;
595
  $cid = intval($_POST['cid']);
596
  $cl_prem = $_POST['cl_prem'];
@@ -811,9 +813,12 @@ if (! class_exists ( 'commentluv' )) {
811
  function fetch_feed(){
812
  // check nonce
813
  //debugbreak();
814
- $checknonce = check_ajax_referer('fetch',false,false);
815
- if(!$checknonce){
816
- die(' error! not authorized '.strip_tags($_REQUEST['_ajax_nonce']));
 
 
 
817
  }
818
  if(!$_POST['url']){
819
  die('no url');
@@ -825,7 +830,7 @@ if (! class_exists ( 'commentluv' )) {
825
  @ini_set('display_errors',0);
826
  @error_reporting(0);
827
  include_once(ABSPATH.WPINC.'/class-simplepie.php');
828
- $options = $this->get_options();
829
  $num = 1;
830
  $url = esc_url($_POST['url']);
831
  $orig_url = $url;
@@ -1018,7 +1023,7 @@ if (! class_exists ( 'commentluv' )) {
1018
  'badge_choice' => 'drop_down', 'badge_type'=>'default', 'link'=>'off','infopanel'=>'on', 'infoback'=>'white', 'infotext'=>'black',
1019
  'comment_text'=>'[name] '.__('recently posted',$this->plugin_domain).'...[lastpost]', 'whogets'=>'registered', 'dofollow' => 'registered',
1020
  'unreg_user_text'=>__('If you register as a user on my site, you can get your 10 most recent blog posts to choose from in this box.',$this->plugin_domain).' '.$register_link,
1021
- 'unreg_user_text_panel'=>__('If this user had registered to my site then they could get 10 last posts to choose from when they comment and you would be able to see a list of their recent posts in this panel',$this->plugin_domain),
1022
  'template_insert'=>'','minifying'=>'','api_url'=>admin_url('admin-ajax.php'),'author_name'=>'author','email_name'=>'email','url_name'=>'url','comment_name'=>'comment',
1023
  'hide_link_no_url'=>'nothing','hide_link_no_url_match'=>'nothing');
1024
  $options = get_option ( $this->db_option, $default);
@@ -1081,6 +1086,11 @@ if (! class_exists ( 'commentluv' )) {
1081
  $options['enable'] = 'yes';
1082
  update_option($this->db_option,$options);
1083
  }
 
 
 
 
 
1084
  // update cl_version in db
1085
  if($this->php_version($this->version) != $installed_version){
1086
  update_option('cl_version',$this->version);
@@ -1744,6 +1754,8 @@ if (! class_exists ( 'commentluv' )) {
1744
 
1745
  <td>
1746
  <input type="checkbox" name="<?php echo $dbo;?>[allow_jpc]" <?php if(isset($o['allow_jpc'])) checked($o['allow_jpc'],'on');?> value="on"/><label for="<?php echo $dbo;?>[allow_jpc]"> <?php _e('Allow Jetpack comments module to activate?',$pd);?></label>
 
 
1747
  </td>
1748
  </tr>
1749
  <tr>
@@ -1782,7 +1794,7 @@ if (! class_exists ( 'commentluv' )) {
1782
  $maxitems = $rss->get_item_quantity(2);
1783
  $rssitems = $rss->get_items(0,$maxitems);
1784
  }
1785
- if(is_array($rssitems)){
1786
  foreach($rssitems as $item){
1787
  echo '<div><a href="'.esc_url( $item->get_permalink() ).'">'.esc_html($item->get_title()).'</a>';
1788
  echo '<p>'.$item->get_content().'</p></div>';
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.94
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.94";
32
  var $slug = 'commentluv-options';
33
  var $localize;
34
  var $is_commentluv_request = false;
587
  * sends back json encoded string for the content of the panel
588
  */
589
  function do_info(){
 
 
 
590
  $options = $this->get_options();
591
+ if(isset($options['use_nonce'])){
592
+ check_ajax_referer('info');
593
+ }
594
+ global $wpdb;
595
+
596
  $isreg = false;
597
  $cid = intval($_POST['cid']);
598
  $cl_prem = $_POST['cl_prem'];
813
  function fetch_feed(){
814
  // check nonce
815
  //debugbreak();
816
+ $options = $this->get_options();
817
+ if(isset($options['use_nonce'])){
818
+ $checknonce = check_ajax_referer('fetch',false,false);
819
+ if(!$checknonce){
820
+ die(' error! not authorized '.strip_tags($_REQUEST['_ajax_nonce']));
821
+ }
822
  }
823
  if(!$_POST['url']){
824
  die('no url');
830
  @ini_set('display_errors',0);
831
  @error_reporting(0);
832
  include_once(ABSPATH.WPINC.'/class-simplepie.php');
833
+
834
  $num = 1;
835
  $url = esc_url($_POST['url']);
836
  $orig_url = $url;
1023
  'badge_choice' => 'drop_down', 'badge_type'=>'default', 'link'=>'off','infopanel'=>'on', 'infoback'=>'white', 'infotext'=>'black',
1024
  'comment_text'=>'[name] '.__('recently posted',$this->plugin_domain).'...[lastpost]', 'whogets'=>'registered', 'dofollow' => 'registered',
1025
  'unreg_user_text'=>__('If you register as a user on my site, you can get your 10 most recent blog posts to choose from in this box.',$this->plugin_domain).' '.$register_link,
1026
+ 'unreg_user_text_panel'=>__('If this user had registered to my site then they could get 10 last posts to choose from when they comment and you would be able to see a list of their recent posts in this panel',$this->plugin_domain),'use_nonce'=>'on',
1027
  'template_insert'=>'','minifying'=>'','api_url'=>admin_url('admin-ajax.php'),'author_name'=>'author','email_name'=>'email','url_name'=>'url','comment_name'=>'comment',
1028
  'hide_link_no_url'=>'nothing','hide_link_no_url_match'=>'nothing');
1029
  $options = get_option ( $this->db_option, $default);
1086
  $options['enable'] = 'yes';
1087
  update_option($this->db_option,$options);
1088
  }
1089
+ // new check for use_nonce
1090
+ if(version_compare($installed_version,'2.94','<')){
1091
+ $options['use_nonce'] = 'on';
1092
+ update_option($this->db_option,$options);
1093
+ }
1094
  // update cl_version in db
1095
  if($this->php_version($this->version) != $installed_version){
1096
  update_option('cl_version',$this->version);
1754
 
1755
  <td>
1756
  <input type="checkbox" name="<?php echo $dbo;?>[allow_jpc]" <?php if(isset($o['allow_jpc'])) checked($o['allow_jpc'],'on');?> value="on"/><label for="<?php echo $dbo;?>[allow_jpc]"> <?php _e('Allow Jetpack comments module to activate?',$pd);?></label>
1757
+ <br>
1758
+ <input type="checkbox" name="<?php echo $dbo;?>[use_nonce]" <?php if(isset($o['use_nonce'])) checked($o['use_nonce'],'on');?> value="on"/><label for="<?php echo $dbo;?>[use_nonce]"> <?php _e('Use security nonce for ajax calls? <br>(disable if you get Parsing JSON Request failed. error! not authorized error)',$pd);?></label>
1759
  </td>
1760
  </tr>
1761
  <tr>
1794
  $maxitems = $rss->get_item_quantity(2);
1795
  $rssitems = $rss->get_items(0,$maxitems);
1796
  }
1797
+ if(isset($rssitems) && is_array($rssitems)){
1798
  foreach($rssitems as $item){
1799
  echo '<div><a href="'.esc_url( $item->get_permalink() ).'">'.esc_html($item->get_title()).'</a>';
1800
  echo '<p>'.$item->get_content().'</p></div>';
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.6
6
- Tested up to: 4.1.2
7
- Stable tag: 2.93.8
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
 
@@ -79,6 +79,18 @@ If you're upgrading from an older version, please use the 'reset to default sett
79
 
80
  No. The link and associated data is saved to the comment meta table
81
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  = I am having a problem getting it to work =
83
 
84
  Please see the videos in the settings page for explanations of how they work.
@@ -99,6 +111,15 @@ Please tick the box marked "disable UTF8 encoding" in the technical settings are
99
 
100
  == ChangeLog ==
101
 
 
 
 
 
 
 
 
 
 
102
  = 2.93.8 =
103
 
104
  *fixed : videos where not showing in popup (server move broke URLs)
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.6
6
+ Tested up to: 4.2
7
+ Stable tag: 2.94
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
 
79
 
80
  No. The link and associated data is saved to the comment meta table
81
 
82
+ = My comments form does not show the name and url fields, just the textarea
83
+
84
+ Make sure you log out of your blog and view the form as a user would. A logged in user does not see the name, email and url fields because your blog already knows them.
85
+
86
+ = My comment replies are not showing as indented or the thread of the comment is not working
87
+
88
+ This is entirely down to your theme. Commentluv does nothing to the display of the comments, it just adds the link
89
+
90
+ = I installed the plugin but I don't see the comment form or the badge shows but commentluv is not working
91
+
92
+ The plugin only works on wordpress comments systems, it does not work on Disqus or livefyre or jetpack or others. If you are using standard wordpress comments but do not see the form or it is asking you to register then make sure your theme supports comments or you have enabled comments in the settings of your blog or theme
93
+
94
  = I am having a problem getting it to work =
95
 
96
  Please see the videos in the settings page for explanations of how they work.
111
 
112
  == ChangeLog ==
113
 
114
+ = 2.94 =
115
+
116
+ * fixed : undefined index error on display of feed if can't found in settings page
117
+ * added : you can now uncheck the option to use the security nonce for ajax calls (in cases where blogs are using a peristent cache)
118
+
119
+ = 2.93.9 =
120
+
121
+ * updated FAQ
122
+
123
  = 2.93.8 =
124
 
125
  *fixed : videos where not showing in popup (server move broke URLs)