WP Social Bookmarking Light - Version 1.5.0

Version Description

  • Added mixi Check, GREE Social Feedback.
Download this release

Release Info

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

Code changes from version 1.4.3 to 1.5.0

Files changed (3) hide show
  1. images/gree.png +0 -0
  2. readme.txt +7 -2
  3. wp-social-bookmarking-light.php +103 -8
images/gree.png ADDED
Binary file
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP Social Bookmarking Light ===
2
  Contributors: utahvich
3
  Donate link: http://www.ninxit.com/blog/
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
5
  Requires at least: 2.9.0
6
  Tested up to: 3.0.1
7
- Stable tag: 1.4.3
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
@@ -36,6 +36,8 @@ This is the list of used social sites:
36
  * Evernote
37
  * Instapaper
38
  * StumbleUpon
 
 
39
 
40
  == Installation ==
41
 
@@ -51,6 +53,9 @@ This is the list of used social sites:
51
 
52
  == Changelog ==
53
 
 
 
 
54
  = 1.4.3 =
55
  * Bug fix: img style.
56
 
1
  === WP Social Bookmarking Light ===
2
  Contributors: utahvich
3
  Donate link: http://www.ninxit.com/blog/
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
5
  Requires at least: 2.9.0
6
  Tested up to: 3.0.1
7
+ Stable tag: 1.5.0
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
36
  * Evernote
37
  * Instapaper
38
  * StumbleUpon
39
+ * mixi Check
40
+ * GREE Social Feedback
41
 
42
  == Installation ==
43
 
53
 
54
  == Changelog ==
55
 
56
+ = 1.5.0 =
57
+ * Added mixi Check, GREE Social Feedback.
58
+
59
  = 1.4.3 =
60
  * Bug fix: img style.
61
 
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.4.3
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)
@@ -377,6 +377,29 @@ class WpSocialBookmarkingLight
377
  return $this->link( $url, $alt, $icon, 16, 16 );
378
  }
379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  }
381
 
382
  function wp_social_bookmarking_light_default_options()
@@ -384,7 +407,9 @@ function wp_social_bookmarking_light_default_options()
384
  return array( "services" => "hatena, hatena_users, facebook, google_buzz, yahoo, livedoor, friendfeed, tweetmeme",
385
  "position" => "top",
386
  "single_page" => true,
387
- "is_page" => true );
 
 
388
  }
389
 
390
  function wp_social_bookmarking_light_options()
@@ -394,6 +419,18 @@ function wp_social_bookmarking_light_options()
394
 
395
  function wp_social_bookmarking_light_wp_head()
396
  {
 
 
 
 
 
 
 
 
 
 
 
 
397
  ?>
398
  <style>
399
  ul.wp_social_bookmarking_light{list-style:none !important;border:0 !important;padding:0;margin:0;}
@@ -411,8 +448,8 @@ a.wp_social_bookmarking_light_instapaper, a.wp_social_bookmarking_light_instapap
411
  function wp_social_bookmarking_light_admin_menu()
412
  {
413
  if( function_exists('add_options_page') ){
414
- add_options_page( 'WP Social Bookmarking Light Options',
415
- 'WP Social Bookmarking Light Options',
416
  'manage_options',
417
  __FILE__,
418
  'wp_social_bookmarking_light_options_page' );
@@ -481,7 +518,9 @@ function wp_social_bookmarking_light_options_page()
481
  $options = array( "services" => $_POST["services"],
482
  "position" => $_POST["position"],
483
  "single_page" => $_POST["single_page"] == 'true',
484
- "is_page" => $_POST["is_page"] == 'true' );
 
 
485
  update_option( 'wp_social_bookmarking_light_options', $options );
486
  echo '<div class="updated"><p><strong>'.__( 'Options saved.', WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN ).'</strong></p></div>';
487
  }
@@ -514,11 +553,46 @@ function wp_social_bookmarking_light_options_page()
514
  padding: 3px;
515
  }
516
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
517
  <div class="wrap">
518
- <h2>WP Social Bookmarking Light Options</h2>
519
 
520
- <h3>Required</h3>
521
  <form method='POST' action="<?php echo $_SERVER['REQUEST_URI'] ?>">
 
522
  <table class='form-table'>
523
  <tr>
524
  <th scope="row">Position:</th>
@@ -550,9 +624,28 @@ function wp_social_bookmarking_light_options_page()
550
  </tr>
551
  <tr>
552
  <th scope="row">Services: <br/> <span style="font-size:10px">(comma-separated)</span></th>
553
- <td><input type="text" name='services' value="<?php echo $options['services'] ?>"size=80 /></td>
554
  </tr>
555
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  <p class="submit">
557
  <input class="button-primary" type="submit" name='save' value='<?php _e('Save Changes') ?>' />
558
  <input type="submit" name='reset' value='<?php _e('Reset') ?>' />
@@ -592,6 +685,8 @@ function wp_social_bookmarking_light_options_page()
592
  <tr><td>evernote</td><td>Evernote</td></tr>
593
  <tr><td>instapaper</td><td>Instapaper</td></tr>
594
  <tr><td>stumbleupon</td><td>StumbleUpon</td></tr>
 
 
595
  </table>
596
  </div>
597
  <?php
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.5.0
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)
377
  return $this->link( $url, $alt, $icon, 16, 16 );
378
  }
379
 
380
+ /**
381
+ * @brief mixi Check
382
+ */
383
+ function mixi()
384
+ {
385
+ $options = wp_social_bookmarking_light_options();
386
+ $data_key = $options['mixi_check_key'];
387
+
388
+ return $this->link_raw( '<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-button="button-3" data-key="'.$data_key.'">Check</a>'
389
+ .'<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>' );
390
+ }
391
+
392
+ /**
393
+ * @brief GREE Social Feedback
394
+ */
395
+ function gree()
396
+ {
397
+ $url = "http://gree.jp/?mode=share&act=write&url={$this->encode_url}&title={$this->encode_title}&site_type=website";
398
+ $alt = __( "Share on GREE", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN );
399
+ $icon = WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/gree.png";
400
+ return $this->link( $url, $alt, $icon, 16, 16 );
401
+ }
402
+
403
  }
404
 
405
  function wp_social_bookmarking_light_default_options()
407
  return array( "services" => "hatena, hatena_users, facebook, google_buzz, yahoo, livedoor, friendfeed, tweetmeme",
408
  "position" => "top",
409
  "single_page" => true,
410
+ "is_page" => true,
411
+ "mixi_check_key" => "",
412
+ "mixi_check_robots" => "noimage" );
413
  }
414
 
415
  function wp_social_bookmarking_light_options()
419
 
420
  function wp_social_bookmarking_light_wp_head()
421
  {
422
+ // for mixi Check
423
+ $options = wp_social_bookmarking_light_options();
424
+ foreach( explode(",", $options['services']) as $service ){
425
+ $service = trim($service);
426
+ if( "mixi" == $service ){
427
+ ?>
428
+ <meta name="mixi-check-robots" content="<?php echo $options['mixi_check_robots'] ?>" />
429
+ <?php
430
+ break;
431
+ }
432
+ }
433
+
434
  ?>
435
  <style>
436
  ul.wp_social_bookmarking_light{list-style:none !important;border:0 !important;padding:0;margin:0;}
448
  function wp_social_bookmarking_light_admin_menu()
449
  {
450
  if( function_exists('add_options_page') ){
451
+ add_options_page( 'WP Social Bookmarking Light',
452
+ 'WP Social Bookmarking Light',
453
  'manage_options',
454
  __FILE__,
455
  'wp_social_bookmarking_light_options_page' );
518
  $options = array( "services" => $_POST["services"],
519
  "position" => $_POST["position"],
520
  "single_page" => $_POST["single_page"] == 'true',
521
+ "is_page" => $_POST["is_page"] == 'true',
522
+ "mixi_check_key" => $_POST["mixi_check_key"],
523
+ "mixi_check_robots" => $_POST["mixi_check_robots"] );
524
  update_option( 'wp_social_bookmarking_light_options', $options );
525
  echo '<div class="updated"><p><strong>'.__( 'Options saved.', WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN ).'</strong></p></div>';
526
  }
553
  padding: 3px;
554
  }
555
  </style>
556
+ <?php
557
+ wp_enqueue_script('jquery');
558
+ ?>
559
+ <script type="text/javascript" charset="utf-8">
560
+ //<![CDATA[
561
+ // for mixi
562
+ function wsbl_options_mixi_toggle( first )
563
+ {
564
+ var val = jQuery("#services_id").val();
565
+ var vals = val.split(",");
566
+ var has_mixi = false;
567
+ for( var i = 0; i < vals.length; i++ ){
568
+ val = vals[i].replace(/(^\s+)|(\s+$)/g, "");
569
+ if( val == "mixi" ){
570
+ has_mixi = true;
571
+ }
572
+ }
573
+
574
+ if( first ){
575
+ has_mixi ? jQuery("#mixi_settings").show() : jQuery("#mixi_settings").hide();
576
+ }
577
+ else{
578
+ has_mixi ? jQuery("#mixi_settings").slideDown() : jQuery("#mixi_settings").slideUp();
579
+ }
580
+ }
581
+
582
+ // read onece
583
+ jQuery(document).ready(function(){
584
+ jQuery("#services_id").keyup(function(){
585
+ wsbl_options_mixi_toggle();
586
+ });
587
+ wsbl_options_mixi_toggle( true );
588
+ });
589
+ //]]>
590
+ </script>
591
  <div class="wrap">
592
+ <h2>WP Social Bookmarking Light</h2>
593
 
 
594
  <form method='POST' action="<?php echo $_SERVER['REQUEST_URI'] ?>">
595
+ <h3><?php _e("General Settings") ?></h3>
596
  <table class='form-table'>
597
  <tr>
598
  <th scope="row">Position:</th>
624
  </tr>
625
  <tr>
626
  <th scope="row">Services: <br/> <span style="font-size:10px">(comma-separated)</span></th>
627
+ <td><input type="text" id='services_id' name='services' value="<?php echo $options['services'] ?>"size=80 /></td>
628
  </tr>
629
  </table>
630
+
631
+ <div id='mixi_settings'>
632
+ <h3><?php _e("mixi Settings") ?></h3>
633
+ <table class='form-table'>
634
+ <tr>
635
+ <th scope="row">mixi check key:</th>
636
+ <td>
637
+ <input type="text" name='mixi_check_key' value="<?php echo $options['mixi_check_key'] ?>" size=50 />
638
+ </td>
639
+ </tr>
640
+ <tr>
641
+ <th scope="row">mixi check robots:</th>
642
+ <td>
643
+ <input type="text" name='mixi_check_robots' value="<?php echo $options['mixi_check_robots'] ?>" size=50 />
644
+ </td>
645
+ </tr>
646
+ </table>
647
+ </div>
648
+
649
  <p class="submit">
650
  <input class="button-primary" type="submit" name='save' value='<?php _e('Save Changes') ?>' />
651
  <input type="submit" name='reset' value='<?php _e('Reset') ?>' />
685
  <tr><td>evernote</td><td>Evernote</td></tr>
686
  <tr><td>instapaper</td><td>Instapaper</td></tr>
687
  <tr><td>stumbleupon</td><td>StumbleUpon</td></tr>
688
+ <tr><td>mixi</td><td>mixi Check (require <a href="http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck" onclick="window.open('http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck'); return false;" >mixi check key</a>)</td></tr>
689
+ <tr><td>gree</td><td>GREE Social Feedback</td></tr>
690
  </table>
691
  </div>
692
  <?php