WP Social Bookmarking Light - Version 1.7.4

Version Description

  • Fixed: Google +1
  • Added: both option
Download this release

Release Info

Developer utahvich
Plugin Icon wp plugin WP Social Bookmarking Light
Version 1.7.4
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.4

modules/admin.php CHANGED
@@ -292,6 +292,7 @@ function wp_social_bookmarking_light_options_page()
292
  <select name='position'>
293
  <option value='top' <?php if( $options['position'] == 'top' ) echo 'selected'; ?>>Top</option>
294
  <option value='bottom' <?php if( $options['position'] == 'bottom' ) echo 'selected'; ?>>Bottom</option>
 
295
  <option value='none' <?php if( $options['position'] == 'none' ) echo 'selected'; ?>>None</option>
296
  </select>
297
  </td>
@@ -727,14 +728,22 @@ function wp_social_bookmarking_light_options_page()
727
  </td>
728
  </tr>
729
  <tr>
730
- <th scope="row">Include count:</th>
731
  <td>
732
- <select name='google_plus_one_count'>
733
- <option value='true' <?php if( $options['google_plus_one']['count'] == true ) echo 'selected'; ?>>Yes</option>
734
- <option value='false' <?php if( $options['google_plus_one']['count'] == false ) echo 'selected'; ?>>No</option>
 
735
  </select>
736
  </td>
737
  </tr>
 
 
 
 
 
 
 
738
  </table>
739
  </div>
740
 
292
  <select name='position'>
293
  <option value='top' <?php if( $options['position'] == 'top' ) echo 'selected'; ?>>Top</option>
294
  <option value='bottom' <?php if( $options['position'] == 'bottom' ) echo 'selected'; ?>>Bottom</option>
295
+ <option value='both' <?php if( $options['position'] == 'both' ) echo 'selected'; ?>>Both</option>
296
  <option value='none' <?php if( $options['position'] == 'none' ) echo 'selected'; ?>>None</option>
297
  </select>
298
  </td>
728
  </td>
729
  </tr>
730
  <tr>
731
+ <th scope="row">Annotation:</th>
732
  <td>
733
+ <select name='google_plus_one_annotation'>
734
+ <option value='none' <?php if( $options['google_plus_one']['annotation'] == "none" ) echo 'selected'; ?>>none</option>
735
+ <option value='bubble' <?php if( $options['google_plus_one']['annotation'] == "bubble" ) echo 'selected'; ?>>bubble</option>
736
+ <option value='inline' <?php if( $options['google_plus_one']['annotation'] == "inline" ) echo 'selected'; ?>>inline</option>
737
  </select>
738
  </td>
739
  </tr>
740
+ <tr>
741
+ <th scope="row">Inline size:</th>
742
+ <td>
743
+ <input type="text" name='google_plus_one_inline_size' value="<?php echo $options['google_plus_one']["inline_size"] ?>" />
744
+ </td>
745
+ </tr>
746
+
747
  </table>
748
  </div>
749
 
modules/content.php CHANGED
@@ -92,11 +92,6 @@ function wp_social_bookmarking_light_wp_head()
92
  $locale = ($locale == '' ? 'en_US' : $locale);
93
  echo '<script type="text/javascript" src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'."\n";
94
  }
95
- // Google +1
96
- if(in_array('google_plus_one', $services)){
97
- $lang = $options['google_plus_one']['lang'];
98
- echo '<script type="text/javascript" src="http://apis.google.com/js/plusone.js">{lang:\''.$lang.'\'}</script>'."\n";
99
- }
100
 
101
  // css
102
  ?>
@@ -134,6 +129,9 @@ function wp_social_bookmarking_light_the_content( $content )
134
  else if( $options['position'] == 'bottom' ){
135
  return "{$content}{$out}";
136
  }
 
 
 
137
  return $content;
138
  }
139
 
@@ -156,6 +154,22 @@ function wp_social_bookmarking_light_wp_footer()
156
  if(in_array('evernote', $services)){
157
  echo '<script type="text/javascript" src="http://static.evernote.com/noteit.js"></script>'."\n";
158
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  ?>
160
  <!-- END: WP Social Bookmarking Light -->
161
  <?php
92
  $locale = ($locale == '' ? 'en_US' : $locale);
93
  echo '<script type="text/javascript" src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'."\n";
94
  }
 
 
 
 
 
95
 
96
  // css
97
  ?>
129
  else if( $options['position'] == 'bottom' ){
130
  return "{$content}{$out}";
131
  }
132
+ else if( $options['position'] == 'both'){
133
+ return "{$out}{$content}{$out}";
134
+ }
135
  return $content;
136
  }
137
 
154
  if(in_array('evernote', $services)){
155
  echo '<script type="text/javascript" src="http://static.evernote.com/noteit.js"></script>'."\n";
156
  }
157
+ // Google +1
158
+ if(in_array('google_plus_one', $services)){
159
+ $lang = $options['google_plus_one']['lang'];
160
+ ?>
161
+ <script type="text/javascript">
162
+ window.___gcfg = {lang: '<?php echo $lang ?>'};
163
+
164
+ (function() {
165
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
166
+ po.src = 'https://apis.google.com/js/plusone.js';
167
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
168
+ })();
169
+ </script>
170
+ <?php
171
+ }
172
+
173
  ?>
174
  <!-- END: WP Social Bookmarking Light -->
175
  <?php
modules/options.php CHANGED
@@ -79,8 +79,9 @@ EOT;
79
  'tumblr' => array('button_type' => '1'),
80
  'atode' => array('button_type' => 'iconsja'),
81
  'google_plus_one' => array('button_size' => 'medium',
82
- 'lang' => 'en-US',
83
- 'count' => true),
 
84
  'line' => array('button_type' => 'line88x20'),
85
  );
86
  }
@@ -140,8 +141,9 @@ function wp_social_bookmarking_light_save_options($data)
140
  'tumblr' => array('button_type' => $data['tumblr_button_type']),
141
  'atode' => array('button_type' => $data['atode_button_type']),
142
  'google_plus_one' => array('button_size' => $data['google_plus_one_button_size'],
143
- 'lang' => $data['google_plus_one_lang'],
144
- 'count' => $data['google_plus_one_count'] == 'true'),
 
145
  'line' => array('button_type' => $data['line_button_type']),
146
  );
147
  update_option( 'wp_social_bookmarking_light_options', $options );
79
  'tumblr' => array('button_type' => '1'),
80
  'atode' => array('button_type' => 'iconsja'),
81
  'google_plus_one' => array('button_size' => 'medium',
82
+ 'lang' => 'en-US',
83
+ 'annotation' => 'none',
84
+ 'inline_size' => '250'),
85
  'line' => array('button_type' => 'line88x20'),
86
  );
87
  }
141
  'tumblr' => array('button_type' => $data['tumblr_button_type']),
142
  'atode' => array('button_type' => $data['atode_button_type']),
143
  'google_plus_one' => array('button_size' => $data['google_plus_one_button_size'],
144
+ 'lang' => $data['google_plus_one_lang'],
145
+ 'annotation' => $data['google_plus_one_annotation'],
146
+ 'inline_size' => $data['google_plus_one_inline_size']),
147
  'line' => array('button_type' => $data['line_button_type']),
148
  );
149
  update_option( 'wp_social_bookmarking_light_options', $options );
modules/services.php CHANGED
@@ -312,8 +312,9 @@ class WpSocialBookmarkingLight
312
  {
313
  $options = wp_social_bookmarking_light_options();
314
  $button_size = $options['google_plus_one']['button_size'];
315
- $include_count = $options['google_plus_one']['count'] ? '' : 'count="false"';
316
- $raw = '<g:plusone size="'.$button_size.'" '.$include_count.' href="'.$this->url.'"></g:plusone>';
 
317
  return $this->link_raw($raw);
318
  }
319
 
312
  {
313
  $options = wp_social_bookmarking_light_options();
314
  $button_size = $options['google_plus_one']['button_size'];
315
+ $annotation = $options['google_plus_one']['annotation'];
316
+ $width = $annotation == 'inline' ? 'width="'.$options['google_plus_one']['inline_size'].'"' : "";
317
+ $raw = '<g:plusone size="'.$button_size.'" annotation="'.$annotation.'" href="'.$this->url.'" '.$width.'></g:plusone>';
318
  return $this->link_raw($raw);
319
  }
320
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: links, social, bookmarks, bookmarking, Hatena, Livedoor Clip, BuzzURL, @nifty clip, Twitter, Tumblr, FC2 Bookmark, newsing, Choix, Yahoo!JAPAN Bookmark, Yahoo!Buzz, Google Bookmark, Delicious, Digg, FriendFeed, Google Buzz, Facebook, reddit, LinkedIn, Evernote, Instapaper, StumbleUpon, mixi, gree, atode, toread
5
  Requires at least: 2.9.0
6
  Tested up to: 3.5
7
- Stable tag: 1.7.3
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
@@ -59,6 +59,10 @@ This is the list of used social sites:
59
 
60
  == Changelog ==
61
 
 
 
 
 
62
  = 1.7.3 =
63
  * Added: LINE Button
64
  * Improved: Custom CSS
4
  Tags: links, social, bookmarks, bookmarking, Hatena, Livedoor Clip, BuzzURL, @nifty clip, Twitter, Tumblr, FC2 Bookmark, newsing, Choix, Yahoo!JAPAN Bookmark, Yahoo!Buzz, Google Bookmark, Delicious, Digg, FriendFeed, Google Buzz, Facebook, reddit, LinkedIn, Evernote, Instapaper, StumbleUpon, mixi, gree, atode, toread
5
  Requires at least: 2.9.0
6
  Tested up to: 3.5
7
+ Stable tag: 1.7.4
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.7.4 =
63
+ * Fixed: Google +1
64
+ * Added: both option
65
+
66
  = 1.7.3 =
67
  * Added: LINE Button
68
  * Improved: Custom CSS
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
wp-social-bookmarking-light.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ninxit.com/blog/2010/06/13/wp-social-bookmarking-light/
5
  Description: This plugin inserts social share links at the top or bottom of each post.
6
  Author: utahta
7
  Author URI: http://www.ninxit.com/blog/
8
- Version: 1.7.3
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)
5
  Description: This plugin inserts social share links at the top or bottom of each post.
6
  Author: utahta
7
  Author URI: http://www.ninxit.com/blog/
8
+ Version: 1.7.4
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)