WP Social Bookmarking Light - Version 1.7.6

Version Description

  • Improved: Facebook Like, Share and Send Button
  • Improved: CSS
  • Bug fixed: default option
Download this release

Release Info

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

Code changes from version 1.7.5 to 1.7.6

modules/admin.php CHANGED
@@ -126,9 +126,9 @@ function wsbl_get_service_codes()
126
  */
127
  function wsbl_get_tab_ids(service_id)
128
  {
129
- if(service_id == 'facebook'){
130
- return ['facebook', 'facebook_like', 'facebook_send'];
131
- }
132
  if(service_id == 'mixi'){
133
  return ['mixi', 'mixi_like'];
134
  }
@@ -181,7 +181,8 @@ function wsbl_update_services(is_simply)
181
  jQuery("#services_id").val(vals);
182
 
183
  is_simply = is_simply || false;
184
- var services = ['mixi', 'twitter', 'hatena_button', 'facebook', 'gree', 'evernote', 'tumblr', 'atode', 'google_plus_one', 'line', 'pocket'];
 
185
  for(var i in services){
186
  wsbl_tab_toggle(services[i], is_simply);
187
  }
@@ -271,17 +272,20 @@ function wp_social_bookmarking_light_options_page()
271
  <ul>
272
  <li><a href="#tabs-1"><span><?php _e("General Settings") ?></span></a></li>
273
  <li><a href="#tabs-1_2"><span><?php _e("Styles") ?></span></a></li>
274
- <li id='mixi_settings'><a href="#tabs-2"><span><?php _el("mixi") ?></span></a></li>
275
- <li id='twitter_settings'><a href="#tabs-3"><span><?php _el("twitter") ?></span></a></li>
276
- <li id='hatena_button_settings'><a href="#tabs-4"><span><?php _el("hatena_button") ?></span></a></li>
277
- <li id='facebook_settings'><a href="#tabs-5"><span><?php _el("facebook") ?></span></a></li>
278
- <li id='gree_settings'><a href="#tabs-7"><span><?php _el("gree") ?></span></a></li>
279
- <li id='evernote_settings'><a href="#tabs-8"><span><?php _el("evernote") ?></span></a></li>
 
 
 
280
  <li id='tumblr_settings'><a href="#tabs-9"><span><?php _el("tumblr") ?></span></a></li>
281
  <li id='atode_settings'><a href="#tabs-10"><span><?php _el("atode") ?></span></a></li>
282
- <li id='google_plus_one_settings'><a href="#tabs-11"><span><?php _el("google_plus_one") ?></span></a></li>
283
- <li id='line_settings'><a href="#tabs-12"><span><?php _el("line") ?></span></a></li>
284
- <li id='pocket_settings'><a href="#tabs-13"><span><?php _el("pocket") ?></span></a></li>
285
  </ul>
286
 
287
  <!-- General -->
@@ -465,10 +469,8 @@ function wp_social_bookmarking_light_options_page()
465
  </table>
466
  </div>
467
 
468
- <!-- facebook -->
469
- <div id="tabs-5">
470
- <!-- General -->
471
- <strong>General</strong>
472
  <table class='form-table'>
473
  <tr>
474
  <th scope="row">Locale:</th>
@@ -477,18 +479,38 @@ function wp_social_bookmarking_light_options_page()
477
  <span>en_US, ja_JP, fr_FR ...</span> see more <a href='http://developers.facebook.com/docs/internationalization/' target=_blank>facebook docs</a>
478
  </td>
479
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  </table>
481
- <br/>
482
-
 
 
483
  <!-- Like Button -->
484
- <strong>Like Button</strong>
485
  <table class='form-table'>
486
  <tr>
487
- <th scope="row">Version:</th>
488
  <td>
489
- <select name='facebook_like_version'>
490
- <option value='iframe' <?php if( $options['facebook_like']['version'] == 'iframe' ) echo 'selected'; ?>>iframe</option>
491
- <option value='xfbml' <?php if( $options['facebook_like']['version'] == 'xfbml' ) echo 'selected'; ?>>xfbml</option>
492
  </select>
493
  </td>
494
  </tr>
@@ -502,47 +524,46 @@ function wp_social_bookmarking_light_options_page()
502
  </td>
503
  </tr>
504
  <tr>
505
- <th scope="row">Color Scheme:</th>
506
  <td>
507
- <select name='facebook_like_colorscheme'>
508
- <option value='light' <?php if( $options['facebook_like']['colorscheme'] == 'light' ) echo 'selected'; ?>>light</option>
509
- <option value='dark' <?php if( $options['facebook_like']['colorscheme'] == 'dark' ) echo 'selected'; ?>>dark</option>
510
  </select>
511
  </td>
512
  </tr>
513
  <tr>
514
- <th scope="row">Send button:<br> <span style="font-size:10px">(confirm width size)</span></th>
515
  <td>
516
- <select name='facebook_like_send'>
517
- <option value='true' <?php if( $options['facebook_like']['send'] == true ) echo 'selected'; ?>>Yes</option>
518
- <option value='false' <?php if( $options['facebook_like']['send'] == false ) echo 'selected'; ?>>No</option>
519
- </select>
520
  </td>
521
  </tr>
 
 
 
 
 
 
522
  <tr>
523
- <th scope="row">Width:</th>
524
  <td>
525
- <input type="text" name='facebook_like_width' value="<?php echo $options['facebook_like']['width'] ?>" size=20 />
 
 
 
526
  </td>
527
  </tr>
528
  <tr>
529
- <th scope="row">Font:</th>
530
  <td>
531
- <select name='facebook_like_font'>
532
- <option value='' <?php if( $options['facebook_like']['font'] == '' ) echo 'selected'; ?>></option>
533
- <option value='arial' <?php if( $options['facebook_like']['font'] == 'arial' ) echo 'selected'; ?>>arial</option>
534
- <option value='lucida+grande' <?php if( $options['facebook_like']['font'] == 'lucida+grande' ) echo 'selected'; ?>>lucida grande</option>
535
- <option value='tahoma' <?php if( $options['facebook_like']['font'] == 'tahoma' ) echo 'selected'; ?>>tahoma</option>
536
- <option value='trebuchet+ms' <?php if( $options['facebook_like']['font'] == 'trebuchet+ms' ) echo 'selected'; ?>>trebuchet ms</option>
537
- <option value='verdana' <?php if( $options['facebook_like']['font'] == 'verdana' ) echo 'selected'; ?>>verdana</option>
538
- </select>
539
  </td>
540
  </tr>
541
  </table>
542
- <br/>
543
-
544
- <!-- Send Button -->
545
- <strong>Send Button</strong>
546
  <table class='form-table'>
547
  <tr>
548
  <th scope="row">Color Scheme:</th>
@@ -554,16 +575,15 @@ function wp_social_bookmarking_light_options_page()
554
  </td>
555
  </tr>
556
  <tr>
557
- <th scope="row">Font:</th>
558
  <td>
559
- <select name='facebook_send_font'>
560
- <option value='' <?php if( $options['facebook_send']['font'] == '' ) echo 'selected'; ?>></option>
561
- <option value='arial' <?php if( $options['facebook_send']['font'] == 'arial' ) echo 'selected'; ?>>arial</option>
562
- <option value='lucida+grande' <?php if( $options['facebook_send']['font'] == 'lucida+grande' ) echo 'selected'; ?>>lucida grande</option>
563
- <option value='tahoma' <?php if( $options['facebook_send']['font'] == 'tahoma' ) echo 'selected'; ?>>tahoma</option>
564
- <option value='trebuchet+ms' <?php if( $options['facebook_send']['font'] == 'trebuchet+ms' ) echo 'selected'; ?>>trebuchet ms</option>
565
- <option value='verdana' <?php if( $options['facebook_send']['font'] == 'verdana' ) echo 'selected'; ?>>verdana</option>
566
- </select>
567
  </td>
568
  </tr>
569
  </table>
@@ -822,6 +842,7 @@ function wp_social_bookmarking_light_options_page()
822
  <tr><td>friendfeed</td><td>FriendFeed</td></tr>
823
  <tr><td>facebook</td><td>Facebook Share</td></tr>
824
  <tr><td>facebook_like</td><td>Facebook Like Button</td></tr>
 
825
  <tr><td>facebook_send</td><td>Facebook Send Button</td></tr>
826
  <tr><td>reddit</td><td>reddit</td></tr>
827
  <tr><td>linkedin</td><td>LinkedIn</td></tr>
126
  */
127
  function wsbl_get_tab_ids(service_id)
128
  {
129
+ if(service_id == 'facebook_general'){
130
+ return ['facebook_like', 'facebook_share', 'facebook_send'];
131
+ }
132
  if(service_id == 'mixi'){
133
  return ['mixi', 'mixi_like'];
134
  }
181
  jQuery("#services_id").val(vals);
182
 
183
  is_simply = is_simply || false;
184
+ var services = ['mixi', 'twitter', 'hatena_button', 'facebook_general', 'facebook_like', 'facebook_share', 'facebook_send',
185
+ 'gree', 'evernote', 'tumblr', 'atode', 'google_plus_one', 'line', 'pocket'];
186
  for(var i in services){
187
  wsbl_tab_toggle(services[i], is_simply);
188
  }
272
  <ul>
273
  <li><a href="#tabs-1"><span><?php _e("General Settings") ?></span></a></li>
274
  <li><a href="#tabs-1_2"><span><?php _e("Styles") ?></span></a></li>
275
+ <li id='mixi_settings'><a href="#tabs-2"><span><?php _el("Mixi") ?></span></a></li>
276
+ <li id='twitter_settings'><a href="#tabs-3"><span><?php _el("Twitter") ?></span></a></li>
277
+ <li id='hatena_button_settings'><a href="#tabs-4"><span><?php _el("Hatena") ?></span></a></li>
278
+ <li id='facebook_general_settings'><a href="#tabs-15"><span><?php _el("FB") ?></span></a></li>
279
+ <li id='facebook_like_settings'><a href="#tabs-5"><span><?php _el("FB Like") ?></span></a></li>
280
+ <li id='facebook_share_settings'><a href="#tabs-6"><span><?php _el("FB Share") ?></span></a></li>
281
+ <li id='facebook_send_settings'><a href="#tabs-14"><span><?php _el("FB Send") ?></span></a></li>
282
+ <li id='gree_settings'><a href="#tabs-7"><span><?php _el("GREE") ?></span></a></li>
283
+ <li id='evernote_settings'><a href="#tabs-8"><span><?php _el("Evernote") ?></span></a></li>
284
  <li id='tumblr_settings'><a href="#tabs-9"><span><?php _el("tumblr") ?></span></a></li>
285
  <li id='atode_settings'><a href="#tabs-10"><span><?php _el("atode") ?></span></a></li>
286
+ <li id='google_plus_one_settings'><a href="#tabs-11"><span><?php _el("Google Plus One") ?></span></a></li>
287
+ <li id='line_settings'><a href="#tabs-12"><span><?php _el("LINE") ?></span></a></li>
288
+ <li id='pocket_settings'><a href="#tabs-13"><span><?php _el("Pocket") ?></span></a></li>
289
  </ul>
290
 
291
  <!-- General -->
469
  </table>
470
  </div>
471
 
472
+ <!-- Facebook General -->
473
+ <div id="tabs-15">
 
 
474
  <table class='form-table'>
475
  <tr>
476
  <th scope="row">Locale:</th>
479
  <span>en_US, ja_JP, fr_FR ...</span> see more <a href='http://developers.facebook.com/docs/internationalization/' target=_blank>facebook docs</a>
480
  </td>
481
  </tr>
482
+ <tr>
483
+ <th scope="row">Version:</th>
484
+ <td>
485
+ <select name='facebook_version'>
486
+ <option value='html5' <?php if( $options['facebook']['version'] == 'html5' ) echo 'selected'; ?>>html5</option>
487
+ <option value='xfbml' <?php if( $options['facebook']['version'] == 'xfbml' ) echo 'selected'; ?>>xfbml</option>
488
+ <option value='iframe' <?php if( $options['facebook']['version'] == 'iframe' ) echo 'selected'; ?>>iframe</option>
489
+ </select>
490
+ </td>
491
+ </tr>
492
+ <tr>
493
+ <th scope="row">Add fb-root:</th>
494
+ <td>
495
+ <select name='facebook_fb_root'>
496
+ <option value='true' <?php if( $options['facebook']['fb_root'] == true ) echo 'selected'; ?>>Yes</option>
497
+ <option value='false' <?php if( $options['facebook']['fb_root'] == false ) echo 'selected'; ?>>No</option>
498
+ </select>
499
+ </td>
500
+ </tr>
501
  </table>
502
+ </div>
503
+
504
+ <!-- Facebook Like Button -->
505
+ <div id="tabs-5">
506
  <!-- Like Button -->
 
507
  <table class='form-table'>
508
  <tr>
509
+ <th scope="row">Layout:</th>
510
  <td>
511
+ <select name='facebook_like_layout'>
512
+ <option value='button' <?php if( $options['facebook_like']['layout'] == 'button' ) echo 'selected'; ?>>button</option>
513
+ <option value='button_count' <?php if( $options['facebook_like']['layout'] == 'button_count' ) echo 'selected'; ?>>button_count</option>
514
  </select>
515
  </td>
516
  </tr>
524
  </td>
525
  </tr>
526
  <tr>
527
+ <th scope="row">Share:</th>
528
  <td>
529
+ <select name='facebook_like_share'>
530
+ <option value='true' <?php if( $options['facebook_like']['share'] == true ) echo 'selected'; ?>>Yes</option>
531
+ <option value='false' <?php if( $options['facebook_like']['share'] == false ) echo 'selected'; ?>>No</option>
532
  </select>
533
  </td>
534
  </tr>
535
  <tr>
536
+ <th scope="row">Width:</th>
537
  <td>
538
+ <input type="text" name='facebook_like_width' value="<?php echo $options['facebook_like']['width'] ?>" size=20 />
 
 
 
539
  </td>
540
  </tr>
541
+ </table>
542
+ </div>
543
+
544
+ <!-- Facebook Share Button -->
545
+ <div id="tabs-6">
546
+ <table class='form-table'>
547
  <tr>
548
+ <th scope="row">Layout:</th>
549
  <td>
550
+ <select name='facebook_share_type'>
551
+ <option value='button' <?php if( $options['facebook_share']['type'] == 'button' ) echo 'selected'; ?>>button</option>
552
+ <option value='button_count' <?php if( $options['facebook_share']['type'] == 'button_count' ) echo 'selected'; ?>>button_count</option>
553
+ </select>
554
  </td>
555
  </tr>
556
  <tr>
557
+ <th scope="row">Width:</th>
558
  <td>
559
+ <input type="text" name='facebook_share_width' value="<?php echo $options['facebook_share']['width'] ?>" size=20 />
 
 
 
 
 
 
 
560
  </td>
561
  </tr>
562
  </table>
563
+ </div>
564
+
565
+ <!-- Facebook Send Button -->
566
+ <div id="tabs-14">
567
  <table class='form-table'>
568
  <tr>
569
  <th scope="row">Color Scheme:</th>
575
  </td>
576
  </tr>
577
  <tr>
578
+ <th scope="row">Width:</th>
579
  <td>
580
+ <input type="text" name='facebook_send_width' value="<?php echo $options['facebook_send']['width'] ?>" size=20 />
581
+ </td>
582
+ </tr>
583
+ <tr>
584
+ <th scope="row">Height:</th>
585
+ <td>
586
+ <input type="text" name='facebook_send_height' value="<?php echo $options['facebook_send']['height'] ?>" size=20 />
 
587
  </td>
588
  </tr>
589
  </table>
842
  <tr><td>friendfeed</td><td>FriendFeed</td></tr>
843
  <tr><td>facebook</td><td>Facebook Share</td></tr>
844
  <tr><td>facebook_like</td><td>Facebook Like Button</td></tr>
845
+ <tr><td>facebook_share</td><td>Facebook Share Button</td></tr>
846
  <tr><td>facebook_send</td><td>Facebook Send Button</td></tr>
847
  <tr><td>reddit</td><td>reddit</td></tr>
848
  <tr><td>linkedin</td><td>LinkedIn</td></tr>
modules/content.php CHANGED
@@ -87,10 +87,23 @@ function wp_social_bookmarking_light_wp_head()
87
  ?><script type="text/javascript" src="http://platform.tumblr.com/v1/share.js"></script><?php
88
  }
89
  // facebook
90
- if(in_array('facebook_like', $services) || in_array('facebook_send', $services)){
91
- $locale = $options['facebook']['locale'];
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
87
  ?><script type="text/javascript" src="http://platform.tumblr.com/v1/share.js"></script><?php
88
  }
89
  // facebook
90
+ if(in_array('facebook_like', $services) ||
91
+ in_array('facebook_share', $services) ||
92
+ in_array('facebook_send', $services)){
93
+ $version = $options['facebook']['version'];
94
+ if($version == "html5" || $version == "xfbml"){
95
+ $locale = $options['facebook']['locale'];
96
+ $locale = ($locale == '' ? 'en_US' : $locale);
97
+ ?>
98
+ <script>(function(d, s, id) {
99
+ var js, fjs = d.getElementsByTagName(s)[0];
100
+ if (d.getElementById(id)) return;
101
+ js = d.createElement(s); js.id = id;
102
+ js.src = "//connect.facebook.net/<?php echo $locale ?>/all.js#xfbml=1";
103
+ fjs.parentNode.insertBefore(js, fjs);
104
+ }(document, 'script', 'facebook-jssdk'));</script>
105
+ <?php
106
+ }
107
  }
108
 
109
  // css
modules/options.php CHANGED
@@ -24,7 +24,7 @@ function wp_social_bookmarking_light_default_options()
24
  $styles = <<<EOT
25
  .wp_social_bookmarking_light{
26
  border: 0 !important;
27
- padding: 0 !important;
28
  margin: 0 !important;
29
  }
30
  .wp_social_bookmarking_light div{
@@ -32,7 +32,7 @@ function wp_social_bookmarking_light_default_options()
32
  border: 0 !important;
33
  padding: 0 !important;
34
  margin: 0 5px 0px 0 !important;
35
- height: 23px !important;
36
  text-indent: 0 !important;
37
  }
38
  .wp_social_bookmarking_light img{
@@ -44,12 +44,18 @@ function wp_social_bookmarking_light_default_options()
44
  .wp_social_bookmarking_light_clear{
45
  clear: both !important;
46
  }
 
 
 
47
  .wsbl_twitter{
48
  width: 100px;
49
  }
 
 
 
50
  EOT;
51
 
52
- return array( "services" => "hatena_button, facebook_like, twitter",
53
  "styles" => $styles,
54
  "position" => "top",
55
  "single_page" => true,
@@ -62,17 +68,18 @@ EOT;
62
  'lang' => "en",
63
  'count' => 'horizontal'),
64
  "hatena_button" => array('layout' => 'standard'),
65
- 'facebook' => array('locale' => 'en_US'),
66
- 'facebook_like' => array('version' => 'xfbml',
 
 
67
  'action' => 'like',
68
- 'colorscheme' => 'light',
69
- 'send' => false,
70
- 'width' => '100',
71
- 'font' => '',
72
- 'locale' => ''),
73
  'facebook_send' => array('colorscheme' => 'light',
74
- 'font' => '',
75
- 'locale' => ''),
76
  'gree' => array('button_type' => '4',
77
  'button_size' => '16'),
78
  'evernote' => array('button_type' => 'article-clipper'),
@@ -127,15 +134,18 @@ function wp_social_bookmarking_light_save_options($data)
127
  'lang' => $data['twitter_lang'],
128
  'count' => $data['twitter_count']),
129
  'hatena_button' => array('layout' => $data['hatena_button_layout']),
130
- 'facebook' => array('locale' => trim($data['facebook_locale'])),
131
- 'facebook_like' => array('version' => $data['facebook_like_version'],
 
 
132
  'action' => $data['facebook_like_action'],
133
- 'colorscheme' => $data['facebook_like_colorscheme'],
134
- 'send' => $data['facebook_like_send'] == 'true',
135
- 'width' => $data['facebook_like_width'],
136
- 'font' => $data['facebook_like_font']),
137
  'facebook_send' => array('colorscheme' => $data['facebook_send_colorscheme'],
138
- 'font' => $data['facebook_send_font']),
 
139
  'gree' => array('button_type' => $data['gree_button_type'],
140
  'button_size' => $data['gree_button_size']),
141
  'evernote' => array('button_type' => $data['evernote_button_type']),
24
  $styles = <<<EOT
25
  .wp_social_bookmarking_light{
26
  border: 0 !important;
27
+ padding: 10px 0 20px 0 !important;
28
  margin: 0 !important;
29
  }
30
  .wp_social_bookmarking_light div{
32
  border: 0 !important;
33
  padding: 0 !important;
34
  margin: 0 5px 0px 0 !important;
35
+ line-height: 13px !important;
36
  text-indent: 0 !important;
37
  }
38
  .wp_social_bookmarking_light img{
44
  .wp_social_bookmarking_light_clear{
45
  clear: both !important;
46
  }
47
+ #fb-root{
48
+ display: none;
49
+ }
50
  .wsbl_twitter{
51
  width: 100px;
52
  }
53
+ .wsbl_facebook_like iframe{
54
+ max-width: none !important;
55
+ }
56
  EOT;
57
 
58
+ return array( "services" => "hatena_button,facebook_like,twitter",
59
  "styles" => $styles,
60
  "position" => "top",
61
  "single_page" => true,
68
  'lang' => "en",
69
  'count' => 'horizontal'),
70
  "hatena_button" => array('layout' => 'standard'),
71
+ 'facebook' => array('locale' => 'en_US',
72
+ 'version' => 'xfbml',
73
+ 'fb_root' => true),
74
+ 'facebook_like' => array('layout' => 'button_count',
75
  'action' => 'like',
76
+ 'share' => false,
77
+ 'width' => '100'),
78
+ 'facebook_share' => array('type' => 'button_count',
79
+ 'width' => ''),
 
80
  'facebook_send' => array('colorscheme' => 'light',
81
+ 'width' => '',
82
+ 'height' => ''),
83
  'gree' => array('button_type' => '4',
84
  'button_size' => '16'),
85
  'evernote' => array('button_type' => 'article-clipper'),
134
  'lang' => $data['twitter_lang'],
135
  'count' => $data['twitter_count']),
136
  'hatena_button' => array('layout' => $data['hatena_button_layout']),
137
+ 'facebook' => array('locale' => trim($data['facebook_locale']),
138
+ 'version' => $data['facebook_version'],
139
+ 'fb_root' => $data['facebook_fb_root'] == 'true'),
140
+ 'facebook_like' => array('layout' => $data['facebook_like_layout'],
141
  'action' => $data['facebook_like_action'],
142
+ 'share' => $data['facebook_like_share'] == 'true',
143
+ 'width' => $data['facebook_like_width']),
144
+ 'facebook_share' => array('type' => $data['facebook_share_type'],
145
+ 'width' => $data['facebook_share_width']),
146
  'facebook_send' => array('colorscheme' => $data['facebook_send_colorscheme'],
147
+ 'width' => $data['facebook_send_width'],
148
+ 'height' => $data['facebook_send_height']),
149
  'gree' => array('button_type' => $data['gree_button_type'],
150
  'button_size' => $data['gree_button_size']),
151
  'evernote' => array('button_type' => $data['evernote_button_type']),
modules/services.php CHANGED
@@ -368,41 +368,79 @@ class WpSocialBookmarkingLight
368
  function facebook_like()
369
  {
370
  $options = wp_social_bookmarking_light_options();
371
- $version = $options['facebook_like']['version'];
372
  $action = $options['facebook_like']['action'];
373
- $colorscheme = $options['facebook_like']['colorscheme'];
374
- $send = $options['facebook_like']['send'] ? 'true' : 'false';
375
  $width = $options['facebook_like']['width'];
376
- $font = $options['facebook_like']['font'];
377
  $locale = $options['facebook']['locale'];
 
 
378
 
379
- if($version == 'iframe'){
380
- return $this->link_raw('<iframe src="http://www.facebook.com/plugins/like.php?href='.$this->encode_url
381
- .'&amp;send='.$send
382
- .'&amp;layout=button_count'
383
- .'&amp;show_faces=false'
384
- .'&amp;width='.$width
385
- .'&amp;action='.$action
386
- .'&amp;colorscheme='.$colorscheme
387
- .($font == '' ? '' : '&amp;font='.$font)
388
- .($locale == '' ? '' : '&amp;locale='.$locale)
389
- .'&amp;height=21"'
390
- .' scrolling="no" frameborder="0"'
391
- .' style="border:none; overflow:hidden; width:'.$width.'px; height:21px;"'
392
- .' allowTransparency="true"></iframe>');
393
  }
394
- else{
395
- return $this->link_raw('<fb:like '
 
396
  .'href="'.$this->url.'" '
397
- .'send="'.$send.'" '
398
- .'layout="button_count" '
399
- .'width="'.$width.'" '
400
- .'show_faces="false" '
401
  .'action="'.$action.'" '
402
- .'colorscheme="'.$colorscheme.'" '
403
- .'font="'.$font.'">'
 
404
  .'</fb:like>');
405
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  }
407
 
408
  /**
@@ -410,12 +448,31 @@ class WpSocialBookmarkingLight
410
  */
411
  function facebook_send()
412
  {
413
- $options = wp_social_bookmarking_light_options();
414
- $url = $this->url;
415
- $font = $options['facebook_send']['font'];
416
- $colorscheme = $options['facebook_send']['colorscheme'];
 
 
 
417
 
418
- return $this->link_raw('<fb:send href="'.$url.'" font="'.$font.'" colorscheme="'.$colorscheme.'"></fb:send>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  }
420
 
421
  /**
@@ -450,7 +507,7 @@ class WpSocialBookmarkingLight
450
 
451
  return $this->link_raw('<a href="#" onclick="Evernote.doClip({ title:\''.$this->title.'\', url:\''.$this->url.'\' });return false;">'
452
  .'<img src="http://static.evernote.com/'.$type.'.png" />'
453
- .'</a>');
454
  }
455
 
456
  /**
@@ -503,7 +560,7 @@ class WpSocialBookmarkingLight
503
  return $this->link_raw('<iframe src="http://plugins.mixi.jp/favorite.pl?href='.$this->encode_url.'&service_key='.$data_key.'&show_faces=false" '
504
  .'scrolling="no" '
505
  .'frameborder="0" '
506
- .'allowTransparency="true" '
507
  .'style="border:0; overflow:hidden; width:'.$width.'px; height:20px;"></iframe>');
508
  }
509
 
@@ -512,17 +569,17 @@ class WpSocialBookmarkingLight
512
  */
513
  function gree()
514
  {
515
- $options = wp_social_bookmarking_light_options();
516
  $url = $this->encode_url;
517
  $type = $options['gree']['button_type'];
518
  $size = $options['gree']['button_size'];
519
  switch($type){
520
- case '0': $btn_type = 'btn_iine'; break;
521
- case '1': $btn_type = 'btn_kininaru'; break;
522
- case '2': $btn_type = 'btn_osusume'; break;
523
- case '3': $btn_type = 'btn_share'; break;
524
- case '4': $btn_type = 'btn_logo'; break;
525
- default: $btn_type = 'btn_logo';
526
  }
527
  $alt = __( "Share on GREE", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN );
528
  return $this->link_raw('<a href="http://gree.jp/?mode=share&act=write'
@@ -541,7 +598,7 @@ class WpSocialBookmarkingLight
541
  */
542
  function atode()
543
  {
544
- $options = wp_social_bookmarking_light_options();
545
  $type = $options['atode']['button_type'];
546
  switch($type){
547
  case 'iconsja': return $this->link_raw('<a href=\'http://atode.cc/\' onclick=\'javascript:(function(){var s=document.createElement("scr"+"ipt");s.charset="UTF-8";s.language="javascr"+"ipt";s.type="text/javascr"+"ipt";var d=new Date;s.src="http://atode.cc/bjs.php?d="+d.getMilliseconds();document.body.appendChild(s)})();return false;\'><img src="http://atode.cc/img/iconsja.gif" alt="email this" border="0" align="absmiddle" width="16" height="16"></a>');
@@ -556,18 +613,18 @@ class WpSocialBookmarkingLight
556
  */
557
  function line()
558
  {
559
- $options = wp_social_bookmarking_light_options();
560
- if($options['line']['button_type'] == "line88x20"){
561
- $icon = WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/line88x20.png";
562
- $width = 88;
563
- $height = 20;
564
- }
565
- else{
566
- $icon = WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/line20x20.png";
567
- $width = 20;
568
- $height = 20;
569
- }
570
- return $this->link("http://line.naver.jp/R/msg/text/?{$this->title}%0D%0A{$this->url}", "LINEで送る", $icon, $width, $height);
571
  }
572
 
573
  /**
368
  function facebook_like()
369
  {
370
  $options = wp_social_bookmarking_light_options();
371
+ $layout = $options['facebook_like']['layout'];
372
  $action = $options['facebook_like']['action'];
373
+ $share = $options['facebook_like']['share'] ? 'true' : 'false';
 
374
  $width = $options['facebook_like']['width'];
 
375
  $locale = $options['facebook']['locale'];
376
+ $version = $options['facebook']['version'];
377
+ $fb_root = $options['facebook']['fb_root'] ? '<div id="fb-root"></div>' : '';
378
 
379
+ if($version == "html5"){
380
+ return $this->link_raw( $fb_root
381
+ .'<div class="fb-like" '
382
+ .'data-href="'.$this->url.'" '
383
+ .'data-layout="'.$layout.'" '
384
+ .'data-action="'.$action.'" '
385
+ .($width != "" ? 'data-width="'.$width.'" ' : '')
386
+ .'data-share="'.$share.'" '
387
+ .'data-show_faces="false" >'
388
+ .'</div>');
 
 
 
 
389
  }
390
+ elseif($version == "xfbml"){
391
+ return $this->link_raw( $fb_root
392
+ .'<fb:like '
393
  .'href="'.$this->url.'" '
394
+ .'layout="'.$layout.'" '
 
 
 
395
  .'action="'.$action.'" '
396
+ .($width != "" ? 'width="'.$width.'" ' : '')
397
+ .'share="'.$share.'" '
398
+ .'show_faces="false" >'
399
  .'</fb:like>');
400
  }
401
+ else{
402
+ return $this->link_raw('<iframe src="http://www.facebook.com/plugins/like.php?href='.$this->encode_url
403
+ .'&amp;layout='.$layout
404
+ .'&amp;show_faces=false'
405
+ .'&amp;width='.$width
406
+ .'&amp;action='.$action
407
+ .'&amp;share='.$share
408
+ .($locale == '' ? '' : '&amp;locale='.$locale)
409
+ .'&amp;height=35"'
410
+ .' scrolling="no" frameborder="0"'
411
+ .' style="border:none; overflow:hidden; width:'.$width.'px; height:35px;"'
412
+ .' allowTransparency="true"></iframe>');
413
+ }
414
+
415
+ }
416
+
417
+ /**
418
+ * @brief Facebook Share
419
+ */
420
+ function facebook_share()
421
+ {
422
+ $options = wp_social_bookmarking_light_options();
423
+ $url = $this->url;
424
+ $version = $options['facebook']['version'];
425
+ $fb_root = $options['facebook']['fb_root'] ? '<div id="fb-root"></div>' : '';
426
+ $width = $options['facebook_share']['width'];
427
+ $type = $options['facebook_share']['type'];
428
+
429
+ if($version == "html5"){
430
+ return $this->link_raw( $fb_root
431
+ .'<div class="fb-share-button" '
432
+ .'data-href="'.$url.'" '
433
+ .($width != "" ? 'data-width="'.$width.'" ' : '')
434
+ .'data-type="'.$type.'">'
435
+ .'</div>');
436
+ }else{
437
+ return $this->link_raw( $fb_root
438
+ .'<fb:share-button '
439
+ .'href="'.$url.'" '
440
+ .($width != "" ? 'width="'.$width.'" ' : '')
441
+ .'type="'.$type.'" >'
442
+ .'</fb:share-button>');
443
+ }
444
  }
445
 
446
  /**
448
  */
449
  function facebook_send()
450
  {
451
+ $options = wp_social_bookmarking_light_options();
452
+ $url = $this->url;
453
+ $version = $options['facebook']['version'];
454
+ $fb_root = $options['facebook']['fb_root'] ? '<div id="fb-root"></div>' : '';
455
+ $colorscheme = $options['facebook_send']['colorscheme'];
456
+ $width = $options['facebook_send']['width'];
457
+ $height = $options['facebook_send']['height'];
458
 
459
+ if($version == "html5"){
460
+ return $this->link_raw( $fb_root
461
+ .'<div class="fb-send" '
462
+ .'data-href="'.$url.'" '
463
+ .($width != "" ? 'data-width="'.$width.'" ' : '')
464
+ .($height != "" ? 'data-height="'.$height.'" ' : '')
465
+ .'data-colorscheme="'.$colorscheme.'">'
466
+ .'</div>');
467
+ }else{
468
+ return $this->link_raw( $fb_root
469
+ .'<fb:send '
470
+ .'href="'.$url.'" '
471
+ .($width != "" ? 'width="'.$width.'" ' : '')
472
+ .($height != "" ? 'height="'.$height.'" ' : '')
473
+ .'colorscheme="'.$colorscheme.'" >'
474
+ .'</fb:send>');
475
+ }
476
  }
477
 
478
  /**
507
 
508
  return $this->link_raw('<a href="#" onclick="Evernote.doClip({ title:\''.$this->title.'\', url:\''.$this->url.'\' });return false;">'
509
  .'<img src="http://static.evernote.com/'.$type.'.png" />'
510
+ .'</a>');
511
  }
512
 
513
  /**
560
  return $this->link_raw('<iframe src="http://plugins.mixi.jp/favorite.pl?href='.$this->encode_url.'&service_key='.$data_key.'&show_faces=false" '
561
  .'scrolling="no" '
562
  .'frameborder="0" '
563
+ .'allowTransparency="true" '
564
  .'style="border:0; overflow:hidden; width:'.$width.'px; height:20px;"></iframe>');
565
  }
566
 
569
  */
570
  function gree()
571
  {
572
+ $options = wp_social_bookmarking_light_options();
573
  $url = $this->encode_url;
574
  $type = $options['gree']['button_type'];
575
  $size = $options['gree']['button_size'];
576
  switch($type){
577
+ case '0': $btn_type = 'btn_iine'; break;
578
+ case '1': $btn_type = 'btn_kininaru'; break;
579
+ case '2': $btn_type = 'btn_osusume'; break;
580
+ case '3': $btn_type = 'btn_share'; break;
581
+ case '4': $btn_type = 'btn_logo'; break;
582
+ default: $btn_type = 'btn_logo';
583
  }
584
  $alt = __( "Share on GREE", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN );
585
  return $this->link_raw('<a href="http://gree.jp/?mode=share&act=write'
598
  */
599
  function atode()
600
  {
601
+ $options = wp_social_bookmarking_light_options();
602
  $type = $options['atode']['button_type'];
603
  switch($type){
604
  case 'iconsja': return $this->link_raw('<a href=\'http://atode.cc/\' onclick=\'javascript:(function(){var s=document.createElement("scr"+"ipt");s.charset="UTF-8";s.language="javascr"+"ipt";s.type="text/javascr"+"ipt";var d=new Date;s.src="http://atode.cc/bjs.php?d="+d.getMilliseconds();document.body.appendChild(s)})();return false;\'><img src="http://atode.cc/img/iconsja.gif" alt="email this" border="0" align="absmiddle" width="16" height="16"></a>');
613
  */
614
  function line()
615
  {
616
+ $options = wp_social_bookmarking_light_options();
617
+ if($options['line']['button_type'] == "line88x20"){
618
+ $icon = WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/line88x20.png";
619
+ $width = 88;
620
+ $height = 20;
621
+ }
622
+ else{
623
+ $icon = WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/line20x20.png";
624
+ $width = 20;
625
+ $height = 20;
626
+ }
627
+ return $this->link("http://line.naver.jp/R/msg/text/?{$this->title}%0D%0A{$this->url}", "LINEで送る", $icon, $width, $height);
628
  }
629
 
630
  /**
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: utahvich
3
  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, line, pocket
5
  Requires at least: 2.9.0
6
- Tested up to: 3.5
7
- Stable tag: 1.7.5
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
@@ -17,6 +17,7 @@ This is the list of used social sites:
17
  * Hatena
18
  * Facebook
19
  * Facebook Like Button
 
20
  * Facebook Send Button
21
  * Twitter
22
  * Livedoor Clip
@@ -60,6 +61,11 @@ This is the list of used social sites:
60
 
61
  == Changelog ==
62
 
 
 
 
 
 
63
  = 1.7.5 =
64
  * Added: Pocket Button
65
 
3
  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, line, pocket
5
  Requires at least: 2.9.0
6
+ Tested up to: 3.8
7
+ Stable tag: 1.7.6
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
17
  * Hatena
18
  * Facebook
19
  * Facebook Like Button
20
+ * Facebook Share Button
21
  * Facebook Send Button
22
  * Twitter
23
  * Livedoor Clip
61
 
62
  == Changelog ==
63
 
64
+ = 1.7.6 =
65
+ * Improved: Facebook Like, Share and Send Button
66
+ * Improved: CSS
67
+ * Bug fixed: default option
68
+
69
  = 1.7.5 =
70
  * Added: Pocket Button
71
 
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.5
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.6
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)