Version Description
- Updated: Administration Page.
Download this release
Release Info
Developer | utahvich |
Plugin | WP Social Bookmarking Light |
Version | 1.6.4 |
Comparing to | |
See all releases |
Code changes from version 1.6.3 to 1.6.4
- images/close_button.png +0 -0
- images/close_button2.png +0 -0
- images/point_left.png +0 -0
- readme.txt +6 -3
- wp-social-bookmarking-light.php +137 -40
images/close_button.png
ADDED
Binary file
|
images/close_button2.png
ADDED
Binary file
|
images/point_left.png
ADDED
Binary file
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: utahvich
|
|
3 |
Donate link: http://pledgie.com/campaigns/14051
|
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.
|
7 |
-
Stable tag: 1.6.
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
@@ -54,6 +54,9 @@ This is the list of used social sites:
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
57 |
= 1.6.3 =
|
58 |
* Bug fixed: The style was broken on some themes.
|
59 |
|
@@ -65,7 +68,7 @@ This is the list of used social sites:
|
|
65 |
|
66 |
= 1.6.0 =
|
67 |
* Added: Hatena Bookmark Button.
|
68 |
-
* Updated:
|
69 |
* Bug fixed: Twitter button did not work on the top page. [yuya-takeyama](https://gist.github.com/675159)++
|
70 |
* Bug fixed: Mixi button did not work on the top page.
|
71 |
|
3 |
Donate link: http://pledgie.com/campaigns/14051
|
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.3
|
7 |
+
Stable tag: 1.6.4
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 1.6.4 =
|
58 |
+
* Updated: Administration Page.
|
59 |
+
|
60 |
= 1.6.3 =
|
61 |
* Bug fixed: The style was broken on some themes.
|
62 |
|
68 |
|
69 |
= 1.6.0 =
|
70 |
* Added: Hatena Bookmark Button.
|
71 |
+
* Updated: Administration Page.
|
72 |
* Bug fixed: Twitter button did not work on the top page. [yuya-takeyama](https://gist.github.com/675159)++
|
73 |
* Bug fixed: Mixi button did not work on the top page.
|
74 |
|
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.6.
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|
@@ -541,9 +541,9 @@ a.wp_social_bookmarking_light_instapaper, a.wp_social_bookmarking_light_instapap
|
|
541 |
<?php
|
542 |
}
|
543 |
|
544 |
-
function wp_social_bookmarking_light_output( $services )
|
545 |
{
|
546 |
-
$wp = new WpSocialBookmarkingLight(
|
547 |
$class_methods = wp_social_bookmarking_light_get_class_methods();
|
548 |
$out = '';
|
549 |
foreach( explode(",", $services) as $service ){
|
@@ -563,13 +563,13 @@ function wp_social_bookmarking_light_output( $services )
|
|
563 |
return "<div class='wp_social_bookmarking_light'>{$out}</div><br class='wp_social_bookmarking_light_clear' />";
|
564 |
}
|
565 |
|
566 |
-
function wp_social_bookmarking_light_output_e( $services=null )
|
567 |
{
|
568 |
if($services == null){
|
569 |
$options = wp_social_bookmarking_light_options();
|
570 |
$services = $options['services'];
|
571 |
}
|
572 |
-
echo wp_social_bookmarking_light_output( $services );
|
573 |
}
|
574 |
|
575 |
function wp_social_bookmarking_light_the_content( $content )
|
@@ -586,7 +586,7 @@ function wp_social_bookmarking_light_the_content( $content )
|
|
586 |
return $content;
|
587 |
}
|
588 |
|
589 |
-
$out = wp_social_bookmarking_light_output( $options['services'] );
|
590 |
if( $out == '' ){
|
591 |
return $content;
|
592 |
}
|
@@ -605,6 +605,8 @@ function wp_social_bookmarking_light_admin_print_scripts()
|
|
605 |
wp_enqueue_script('jquery');
|
606 |
wp_enqueue_script('jquery-ui-core');
|
607 |
wp_enqueue_script('jquery-ui-tabs');
|
|
|
|
|
608 |
}
|
609 |
|
610 |
function wp_social_bookmarking_light_admin_print_styles()
|
@@ -616,24 +618,67 @@ function wp_social_bookmarking_light_admin_head()
|
|
616 |
{
|
617 |
?>
|
618 |
<style type="text/css">
|
619 |
-
.
|
620 |
border: 1px solid #CCCCCC;
|
621 |
background-color: #F8F8EB;
|
622 |
vertical-align: top;
|
623 |
margin: 0px 10px 10px 0px;
|
624 |
padding: 0px;
|
625 |
}
|
626 |
-
.
|
627 |
background-color: #E8E8DB;
|
628 |
text-align: center;
|
629 |
margin: 0px;
|
630 |
padding: 3px;
|
631 |
}
|
632 |
-
.
|
633 |
text-align: left;
|
634 |
margin: 0px;
|
635 |
padding: 3px;
|
636 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
</style>
|
638 |
|
639 |
<script type="text/javascript" charset="utf-8">
|
@@ -660,47 +705,68 @@ function wsbl_options_toggle(service_id, is_simply)
|
|
660 |
}
|
661 |
}
|
662 |
|
663 |
-
function
|
664 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
665 |
wsbl_options_toggle("mixi", is_simply);
|
666 |
wsbl_options_toggle("twitter", is_simply);
|
667 |
wsbl_options_toggle("hatena_button", is_simply);
|
668 |
wsbl_options_toggle("facebook_like", is_simply);
|
669 |
}
|
670 |
|
671 |
-
function
|
672 |
{
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
});
|
686 |
-
if(unknown_services.length > 0){
|
687 |
-
var error_str = "Unknown service code: [" + unknown_services.join(", ") + "]";
|
688 |
-
jQuery("#unknown_services_id").text(error_str).slideDown();
|
689 |
-
}
|
690 |
-
else{
|
691 |
-
jQuery("#unknown_services_id").slideUp();
|
692 |
-
}
|
693 |
}
|
694 |
|
695 |
// read onece
|
696 |
jQuery(document).ready(function(){
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
|
|
|
|
|
|
701 |
|
702 |
-
|
703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
jQuery("#tabs").tabs();
|
705 |
});
|
706 |
//]]>
|
@@ -764,6 +830,7 @@ function wp_social_bookmarking_light_options_page()
|
|
764 |
else{
|
765 |
$options = wp_social_bookmarking_light_options();
|
766 |
}
|
|
|
767 |
?>
|
768 |
|
769 |
<div class="wrap">
|
@@ -810,10 +877,40 @@ function wp_social_bookmarking_light_options_page()
|
|
810 |
</td>
|
811 |
</tr>
|
812 |
<tr>
|
813 |
-
<th scope="row"><?php _e('Services', WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?>: <br/> <span style="font-size:10px">(
|
814 |
<td>
|
815 |
-
<input type="text" id='services_id' name='services' value="<?php echo $options['services'] ?>"size=120 style="font-size:12px
|
816 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
</td>
|
818 |
</tr>
|
819 |
</table>
|
@@ -940,7 +1037,7 @@ function wp_social_bookmarking_light_options_page()
|
|
940 |
</p>
|
941 |
</form>
|
942 |
|
943 |
-
<table class='
|
944 |
<tr><th><?php _e("Service Code", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?></th><th><?php _e("Explain", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?></th></tr>
|
945 |
<tr><td>hatena</td><td>Hatena Bookmark</td></tr>
|
946 |
<tr><td>hatena_users</td><td>Hatena Bookmark Users</td></tr>
|
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.6.4
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|
541 |
<?php
|
542 |
}
|
543 |
|
544 |
+
function wp_social_bookmarking_light_output( $services, $link, $title )
|
545 |
{
|
546 |
+
$wp = new WpSocialBookmarkingLight( $link, $title, get_bloginfo('name') );
|
547 |
$class_methods = wp_social_bookmarking_light_get_class_methods();
|
548 |
$out = '';
|
549 |
foreach( explode(",", $services) as $service ){
|
563 |
return "<div class='wp_social_bookmarking_light'>{$out}</div><br class='wp_social_bookmarking_light_clear' />";
|
564 |
}
|
565 |
|
566 |
+
function wp_social_bookmarking_light_output_e( $services=null, $link=null, $title=null )
|
567 |
{
|
568 |
if($services == null){
|
569 |
$options = wp_social_bookmarking_light_options();
|
570 |
$services = $options['services'];
|
571 |
}
|
572 |
+
echo wp_social_bookmarking_light_output( $services, $link, $title );
|
573 |
}
|
574 |
|
575 |
function wp_social_bookmarking_light_the_content( $content )
|
586 |
return $content;
|
587 |
}
|
588 |
|
589 |
+
$out = wp_social_bookmarking_light_output( $options['services'], get_permalink(), get_the_title() );
|
590 |
if( $out == '' ){
|
591 |
return $content;
|
592 |
}
|
605 |
wp_enqueue_script('jquery');
|
606 |
wp_enqueue_script('jquery-ui-core');
|
607 |
wp_enqueue_script('jquery-ui-tabs');
|
608 |
+
wp_enqueue_script('jquery-ui-sortable');
|
609 |
+
wp_enqueue_script('jquery-ui-draggable');
|
610 |
}
|
611 |
|
612 |
function wp_social_bookmarking_light_admin_print_styles()
|
618 |
{
|
619 |
?>
|
620 |
<style type="text/css">
|
621 |
+
.wsbl_options{
|
622 |
border: 1px solid #CCCCCC;
|
623 |
background-color: #F8F8EB;
|
624 |
vertical-align: top;
|
625 |
margin: 0px 10px 10px 0px;
|
626 |
padding: 0px;
|
627 |
}
|
628 |
+
.wsbl_options th{
|
629 |
background-color: #E8E8DB;
|
630 |
text-align: center;
|
631 |
margin: 0px;
|
632 |
padding: 3px;
|
633 |
}
|
634 |
+
.wsbl_options td{en
|
635 |
text-align: left;
|
636 |
margin: 0px;
|
637 |
padding: 3px;
|
638 |
}
|
639 |
+
|
640 |
+
#wsbl_sortable, #wsbl_draggable {
|
641 |
+
list-style-type: none;
|
642 |
+
margin: 0;
|
643 |
+
padding: 5px;
|
644 |
+
overflow: auto;
|
645 |
+
width: 160px;
|
646 |
+
height: 240px;
|
647 |
+
float: left;
|
648 |
+
border: 1px solid #999;
|
649 |
+
background-color: #FFF;
|
650 |
+
}
|
651 |
+
#wsbl_sortable li, #wsbl_draggable li{
|
652 |
+
width: 120px;
|
653 |
+
height: 20px;
|
654 |
+
font-size: 12px;
|
655 |
+
margin: 0px auto;
|
656 |
+
padding: 3px;
|
657 |
+
border: 1px solid #999;
|
658 |
+
background-color: #F8F8EB;
|
659 |
+
cursor: pointer;
|
660 |
+
}
|
661 |
+
.wsbl_sortable_highlight {
|
662 |
+
border: 1px dashed #333 !important;
|
663 |
+
background-color: transparent !important;
|
664 |
+
}
|
665 |
+
.wsbl_txt_draggable{
|
666 |
+
float:left;
|
667 |
+
}
|
668 |
+
.wsbl_img_draggable{
|
669 |
+
margin-left: auto;
|
670 |
+
margin-right: 0;
|
671 |
+
text-align: right;
|
672 |
+
display: none;
|
673 |
+
}
|
674 |
+
.wsbl_point_left{
|
675 |
+
float: left;
|
676 |
+
height : 240px ;
|
677 |
+
margin: 0 20px;
|
678 |
+
}
|
679 |
+
.wsbl_point_left img{
|
680 |
+
margin-top: 90px;
|
681 |
+
}
|
682 |
</style>
|
683 |
|
684 |
<script type="text/javascript" charset="utf-8">
|
705 |
}
|
706 |
}
|
707 |
|
708 |
+
function wsbl_update_services(is_simply)
|
709 |
{
|
710 |
+
var vals = "";
|
711 |
+
var service = jQuery("#wsbl_sortable .wsbl_txt_draggable");
|
712 |
+
service.each(function(){
|
713 |
+
vals += vals == "" ? "" : ",";
|
714 |
+
vals += jQuery(this).text();
|
715 |
+
});
|
716 |
+
jQuery("#services_id").val(vals);
|
717 |
+
|
718 |
+
is_simply = is_simply || false;
|
719 |
wsbl_options_toggle("mixi", is_simply);
|
720 |
wsbl_options_toggle("twitter", is_simply);
|
721 |
wsbl_options_toggle("hatena_button", is_simply);
|
722 |
wsbl_options_toggle("facebook_like", is_simply);
|
723 |
}
|
724 |
|
725 |
+
function wsbl_update_sortable()
|
726 |
{
|
727 |
+
jQuery("#wsbl_sortable .wsbl_img_draggable").each(function(){
|
728 |
+
var button = jQuery(this);
|
729 |
+
button.css("display", "block"); // show delete button.
|
730 |
+
var img = jQuery("img", button);
|
731 |
+
img.mousedown(function(){
|
732 |
+
var p = jQuery(this).parents("li");
|
733 |
+
p.slideUp("fast", function(){
|
734 |
+
p.remove();
|
735 |
+
wsbl_update_services();
|
736 |
+
});
|
737 |
+
});
|
738 |
+
img.attr('src', '<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/close_button.png"?>');
|
739 |
+
img.hover(
|
740 |
+
function(){
|
741 |
+
jQuery(this).attr('src', '<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/close_button2.png"?>');
|
742 |
+
},
|
743 |
+
function(){
|
744 |
+
jQuery(this).attr('src', '<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/close_button.png"?>');
|
745 |
+
}
|
746 |
+
);
|
747 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
}
|
749 |
|
750 |
// read onece
|
751 |
jQuery(document).ready(function(){
|
752 |
+
jQuery("#wsbl_sortable").sortable({
|
753 |
+
placeholder: "wsbl_sortable_highlight",
|
754 |
+
update:function(e, ui){
|
755 |
+
wsbl_update_sortable();
|
756 |
+
wsbl_update_services();
|
757 |
+
}
|
758 |
+
});
|
759 |
|
760 |
+
jQuery("#wsbl_draggable li").draggable({
|
761 |
+
connectToSortable:"#wsbl_sortable",
|
762 |
+
helper:'clone',
|
763 |
+
revert:"invalid"
|
764 |
+
});
|
765 |
+
jQuery("#wsbl_draggable, #wsbl_sortable").disableSelection();
|
766 |
+
|
767 |
+
wsbl_update_sortable();
|
768 |
+
wsbl_update_services(true);
|
769 |
+
|
770 |
jQuery("#tabs").tabs();
|
771 |
});
|
772 |
//]]>
|
830 |
else{
|
831 |
$options = wp_social_bookmarking_light_options();
|
832 |
}
|
833 |
+
$class_methods = wp_social_bookmarking_light_get_class_methods();
|
834 |
?>
|
835 |
|
836 |
<div class="wrap">
|
877 |
</td>
|
878 |
</tr>
|
879 |
<tr>
|
880 |
+
<th scope="row"><?php _e('Services', WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?>: <br/> <span style="font-size:10px">(drag-and-drop)</span></th>
|
881 |
<td>
|
882 |
+
<input type="text" id='services_id' name='services' value="<?php echo $options['services'] ?>"size=120 style="font-size:12px;" onclick="this.select(0, this.value.length)" readonly/>
|
883 |
+
<br />
|
884 |
+
<br />
|
885 |
+
<ul id="wsbl_sortable">
|
886 |
+
<?php
|
887 |
+
foreach( explode(",", $options['services']) as $service ){
|
888 |
+
$service = trim($service);
|
889 |
+
if($service != ''){
|
890 |
+
if(in_array($service, $class_methods)){
|
891 |
+
echo "<li>"
|
892 |
+
."<div class='wsbl_txt_draggable'>$service</div>"
|
893 |
+
."<div class='wsbl_img_draggable'><img src=''></div>"
|
894 |
+
."<br clear='both'>"
|
895 |
+
."</li>\n";
|
896 |
+
}
|
897 |
+
}
|
898 |
+
}
|
899 |
+
?>
|
900 |
+
</ul>
|
901 |
+
<div class="wsbl_point_left"><img src='<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/point_left.png"?>'></div>
|
902 |
+
<ul id="wsbl_draggable">
|
903 |
+
<?php
|
904 |
+
foreach($class_methods as $method){
|
905 |
+
echo "<li>"
|
906 |
+
."<div class='wsbl_txt_draggable'>$method</div>"
|
907 |
+
."<div class='wsbl_img_draggable'><img src=''></div>"
|
908 |
+
."<br clear='both'>"
|
909 |
+
."</li>\n";
|
910 |
+
}
|
911 |
+
?>
|
912 |
+
</ul>
|
913 |
+
<br clear="both"/>
|
914 |
</td>
|
915 |
</tr>
|
916 |
</table>
|
1037 |
</p>
|
1038 |
</form>
|
1039 |
|
1040 |
+
<table class='wsbl_options'>
|
1041 |
<tr><th><?php _e("Service Code", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?></th><th><?php _e("Explain", WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN) ?></th></tr>
|
1042 |
<tr><td>hatena</td><td>Hatena Bookmark</td></tr>
|
1043 |
<tr><td>hatena_users</td><td>Hatena Bookmark Users</td></tr>
|