kk Star Ratings - Version 1.0

Version Description

Download this release

Release Info

Developer bhittani
Plugin Icon 128x128 kk Star Ratings
Version 1.0
Comparing to
See all releases

Code changes from version 1.1 to 1.0

Files changed (4) hide show
  1. admin/options.php +5 -1
  2. js/kk-ratings.js +1 -2
  3. kk-ratings.php +1 -3
  4. readme.txt +2 -3
admin/options.php CHANGED
@@ -50,8 +50,12 @@
50
  <p>
51
  <strong>NOTE</strong> : For manual, please use shortcode <span style="color:#06F;">[kkratings]</span>
52
  <br />in any post or page you need the ratings.
53
-
54
  </p>
 
 
 
 
 
55
  </td>
56
  </tr>
57
  <tr>
50
  <p>
51
  <strong>NOTE</strong> : For manual, please use shortcode <span style="color:#06F;">[kkratings]</span>
52
  <br />in any post or page you need the ratings.
 
53
  </p>
54
+ <p>
55
+ For theme files use: <span style="color:#093;">&lt;?php if(function_exists('kk_star_ratings')) : echo kk_star_ratings(post_id); endif; ?&gt;</span>
56
+ <br />
57
+ Where <strong>post_id</strong> is the id of the post.
58
+ </p>
59
  </td>
60
  </tr>
61
  <tr>
js/kk-ratings.js CHANGED
@@ -81,7 +81,7 @@ jQuery(document).ready( function($){
81
  }
82
  $('.stars-turned-on', obj).fadeIn(1000);
83
  });
84
-
85
  var id = $("span:eq(0)",obj).html();
86
  $(obj).addClass('open');
87
  $.ajax({
@@ -89,7 +89,6 @@ jQuery(document).ready( function($){
89
  url: settings.path+"ajax/kk-ratings-ajax.php",
90
  data: '_ajax_nonce='+settings.nonce+'&root='+settings.root+"&op=get&id="+id,
91
  success: function(msg){
92
-
93
  msg = msg.replace(/^\s+|\s+$/g,"");
94
  var response = msg.split('|||');
95
  if(response[0]=='SUCCESS')
81
  }
82
  $('.stars-turned-on', obj).fadeIn(1000);
83
  });
84
+
85
  var id = $("span:eq(0)",obj).html();
86
  $(obj).addClass('open');
87
  $.ajax({
89
  url: settings.path+"ajax/kk-ratings-ajax.php",
90
  data: '_ajax_nonce='+settings.nonce+'&root='+settings.root+"&op=get&id="+id,
91
  success: function(msg){
 
92
  msg = msg.replace(/^\s+|\s+$/g,"");
93
  var response = msg.split('|||');
94
  if(response[0]=='SUCCESS')
kk-ratings.php CHANGED
@@ -105,8 +105,6 @@ if(!class_exists('kk_Ratings') && !isset($kkratings)) :
105
  }
106
  public function activate()
107
  {
108
- $this->options['legend'] = '[avg]([per]) [total] votes'; // [total]=total ratings, [rating]=average, [per]=percentage
109
- $this->update_options();
110
  if(!count($this->options)) :
111
  $this->options['enable'] = 1; // 1, 0
112
  $this->options['clear'] = 0; // 1, 0
@@ -116,7 +114,7 @@ if(!class_exists('kk_Ratings') && !isset($kkratings)) :
116
  $this->options['show_in_pages'] = 0; // 1, 0
117
  $this->options['unique'] = 0; // 1, 0
118
  $this->options['position'] = 'top-left'; // 'top-left', 'top-right', 'bottom-left', 'bottom-right'
119
- $this->options['legend'] = '[avg]([per]) [total] votes'; // [total]=total ratings, [rating]=average, [per]=percentage
120
  $this->options['init_msg'] = 'Be the first to rate it!'; // string
121
  $this->update_options();
122
  endif;
105
  }
106
  public function activate()
107
  {
 
 
108
  if(!count($this->options)) :
109
  $this->options['enable'] = 1; // 1, 0
110
  $this->options['clear'] = 0; // 1, 0
114
  $this->options['show_in_pages'] = 0; // 1, 0
115
  $this->options['unique'] = 0; // 1, 0
116
  $this->options['position'] = 'top-left'; // 'top-left', 'top-right', 'bottom-left', 'bottom-right'
117
+ $this->options['legend'] = '[rating]([per]) [total] votes'; // [total]=total ratings, [rating]=average, [per]=percentage
118
  $this->options['init_msg'] = 'Be the first to rate it!'; // string
119
  $this->update_options();
120
  endif;
readme.txt CHANGED
@@ -11,7 +11,7 @@ Requires at least: 3.0
11
 
12
  Tested up to: 3.1.3
13
 
14
- Stable tag: 1.1
15
 
16
 
17
  kk Star Ratings allows blog visitors to involve and interact more effectively with your website by rating posts.
@@ -79,10 +79,9 @@ First of all make sure you have selected where to display the ratings in the set
79
  2. The Output
80
 
81
 
 
82
  == Changelog ==
83
 
84
- = 1.1 =
85
- * Fixed the [avg] error, so now it will display average ratings properly.
86
 
87
 
88
  == Upgrade Notice ==
11
 
12
  Tested up to: 3.1.3
13
 
14
+ Stable tag: 1.0
15
 
16
 
17
  kk Star Ratings allows blog visitors to involve and interact more effectively with your website by rating posts.
79
  2. The Output
80
 
81
 
82
+
83
  == Changelog ==
84
 
 
 
85
 
86
 
87
  == Upgrade Notice ==