Version Description
- Added: atode(toread) Button.
- Added: Padding option.
- Improved: Instapaper and evernote.
Download this release
Release Info
Developer | utahvich |
Plugin | WP Social Bookmarking Light |
Version | 1.6.6 |
Comparing to | |
See all releases |
Code changes from version 1.6.5 to 1.6.6
- modules/admin.php +92 -7
- modules/content.php +41 -5
- modules/options.php +12 -2
- modules/services.php +45 -18
- po/wp-social-bookmarking-light-ja.mo +0 -0
- po/wp-social-bookmarking-light-ja.po +3 -0
- readme.txt +9 -3
- wp-social-bookmarking-light.php +8 -4
modules/admin.php
CHANGED
@@ -180,7 +180,7 @@ function wsbl_update_services(is_simply)
|
|
180 |
jQuery("#services_id").val(vals);
|
181 |
|
182 |
is_simply = is_simply || false;
|
183 |
-
var services = ['mixi', 'twitter', 'hatena_button', 'facebook_like', 'facebook_send', 'gree']
|
184 |
for(var i in services){
|
185 |
wsbl_tab_toggle(services[i], is_simply);
|
186 |
}
|
@@ -274,6 +274,9 @@ function wp_social_bookmarking_light_options_page()
|
|
274 |
<li id='hatena_button_settings'><a href="#tabs-4"><span><?php _el("hatena_button") ?></span></a></li>
|
275 |
<li id='facebook_settings'><a href="#tabs-5"><span><?php _el("facebook") ?></span></a></li>
|
276 |
<li id='gree_settings'><a href="#tabs-7"><span><?php _el("gree") ?></span></a></li>
|
|
|
|
|
|
|
277 |
</ul>
|
278 |
|
279 |
<!-- General -->
|
@@ -293,8 +296,8 @@ function wp_social_bookmarking_light_options_page()
|
|
293 |
<th scope="row"><?php _el('Singular') ?>:</th>
|
294 |
<td>
|
295 |
<select name='single_page'>
|
296 |
-
<option value='true' <?php if( $options['single_page'] == true ) echo 'selected'; ?>>
|
297 |
-
<option value='false' <?php if( $options['single_page'] == false ) echo 'selected'; ?>>
|
298 |
</select>
|
299 |
</td>
|
300 |
</tr>
|
@@ -302,8 +305,29 @@ function wp_social_bookmarking_light_options_page()
|
|
302 |
<th scope="row"><?php _el('Page') ?>:</th>
|
303 |
<td>
|
304 |
<select name='is_page'>
|
305 |
-
<option value='true' <?php if( $options['is_page'] == true ) echo 'selected'; ?>>
|
306 |
-
<option value='false' <?php if( $options['is_page'] == false ) echo 'selected'; ?>>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
</select>
|
308 |
</td>
|
309 |
</tr>
|
@@ -485,8 +509,8 @@ function wp_social_bookmarking_light_options_page()
|
|
485 |
<th scope="row">Send button:<br> <span style="font-size:10px">(confirm width size)</span></th>
|
486 |
<td>
|
487 |
<select name='facebook_like_send'>
|
488 |
-
<option value='true' <?php if( $options['facebook_like']['send'] == true ) echo 'selected'; ?>>
|
489 |
-
<option value='false' <?php if( $options['facebook_like']['send'] == false ) echo 'selected'; ?>>
|
490 |
</select>
|
491 |
</td>
|
492 |
</tr>
|
@@ -566,6 +590,66 @@ function wp_social_bookmarking_light_options_page()
|
|
566 |
</tr>
|
567 |
</table>
|
568 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
570 |
</div>
|
571 |
<p class="submit">
|
@@ -612,6 +696,7 @@ function wp_social_bookmarking_light_options_page()
|
|
612 |
<tr><td>stumbleupon</td><td>StumbleUpon</td></tr>
|
613 |
<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>
|
614 |
<tr><td>gree</td><td>GREE Social Feedback</td></tr>
|
|
|
615 |
</table>
|
616 |
</div>
|
617 |
|
180 |
jQuery("#services_id").val(vals);
|
181 |
|
182 |
is_simply = is_simply || false;
|
183 |
+
var services = ['mixi', 'twitter', 'hatena_button', 'facebook_like', 'facebook_send', 'gree', 'evernote', 'tumblr', 'atode'];
|
184 |
for(var i in services){
|
185 |
wsbl_tab_toggle(services[i], is_simply);
|
186 |
}
|
274 |
<li id='hatena_button_settings'><a href="#tabs-4"><span><?php _el("hatena_button") ?></span></a></li>
|
275 |
<li id='facebook_settings'><a href="#tabs-5"><span><?php _el("facebook") ?></span></a></li>
|
276 |
<li id='gree_settings'><a href="#tabs-7"><span><?php _el("gree") ?></span></a></li>
|
277 |
+
<li id='evernote_settings'><a href="#tabs-8"><span><?php _el("evernote") ?></span></a></li>
|
278 |
+
<li id='tumblr_settings'><a href="#tabs-9"><span><?php _el("tumblr") ?></span></a></li>
|
279 |
+
<li id='atode_settings'><a href="#tabs-10"><span><?php _el("atode") ?></span></a></li>
|
280 |
</ul>
|
281 |
|
282 |
<!-- General -->
|
296 |
<th scope="row"><?php _el('Singular') ?>:</th>
|
297 |
<td>
|
298 |
<select name='single_page'>
|
299 |
+
<option value='true' <?php if( $options['single_page'] == true ) echo 'selected'; ?>>Yes</option>
|
300 |
+
<option value='false' <?php if( $options['single_page'] == false ) echo 'selected'; ?>>No</option>
|
301 |
</select>
|
302 |
</td>
|
303 |
</tr>
|
305 |
<th scope="row"><?php _el('Page') ?>:</th>
|
306 |
<td>
|
307 |
<select name='is_page'>
|
308 |
+
<option value='true' <?php if( $options['is_page'] == true ) echo 'selected'; ?>>Yes</option>
|
309 |
+
<option value='false' <?php if( $options['is_page'] == false ) echo 'selected'; ?>>No</option>
|
310 |
+
</select>
|
311 |
+
</td>
|
312 |
+
</tr>
|
313 |
+
<tr>
|
314 |
+
<th scope="row"><?php _el('Padding') ?>:</th>
|
315 |
+
<td>
|
316 |
+
Top:
|
317 |
+
<select name='style_padding_top'>
|
318 |
+
<?php
|
319 |
+
for($i = 0; $i < 50; $i++){
|
320 |
+
?><option value='<?php echo $i ?>' <?php if( $options['style']['padding_top'] == $i ) echo 'selected'; ?>><?php echo $i?>px</option><?php
|
321 |
+
}
|
322 |
+
?>
|
323 |
+
</select>
|
324 |
+
Bottom:
|
325 |
+
<select name='style_padding_bottom'>
|
326 |
+
<?php
|
327 |
+
for($i = 0; $i < 50; $i++){
|
328 |
+
?><option value='<?php echo $i ?>' <?php if( $options['style']['padding_bottom'] == $i ) echo 'selected'; ?>><?php echo $i?>px</option><?php
|
329 |
+
}
|
330 |
+
?>
|
331 |
</select>
|
332 |
</td>
|
333 |
</tr>
|
509 |
<th scope="row">Send button:<br> <span style="font-size:10px">(confirm width size)</span></th>
|
510 |
<td>
|
511 |
<select name='facebook_like_send'>
|
512 |
+
<option value='true' <?php if( $options['facebook_like']['send'] == true ) echo 'selected'; ?>>Yes</option>
|
513 |
+
<option value='false' <?php if( $options['facebook_like']['send'] == false ) echo 'selected'; ?>>No</option>
|
514 |
</select>
|
515 |
</td>
|
516 |
</tr>
|
590 |
</tr>
|
591 |
</table>
|
592 |
</div>
|
593 |
+
|
594 |
+
<!-- evernote -->
|
595 |
+
<div id="tabs-8">
|
596 |
+
<table class='form-table'>
|
597 |
+
<tr>
|
598 |
+
<th scope="row">Button type:</th>
|
599 |
+
<td>
|
600 |
+
<select name='evernote_button_type' onchange='jQuery("#evernote_img").attr("src", "http://static.evernote.com/"+this.form.evernote_button_type.value+".png")'>
|
601 |
+
<?php
|
602 |
+
$button_types = array('article-clipper', 'article-clipper-remember', 'article-clipper-fr', 'article-clipper-es', 'article-clipper-jp', 'article-clipper-rus', 'site-mem-16');
|
603 |
+
foreach($button_types as $button_type){
|
604 |
+
?><option value='<?php echo $button_type ?>' <?php if( $options['evernote']['button_type'] == $button_type ) echo 'selected'; ?>><?php echo $button_type?></option><?php
|
605 |
+
}
|
606 |
+
?>
|
607 |
+
</select>
|
608 |
+
<img id='evernote_img' style="vertical-align:middle" src='http://static.evernote.com/<?php echo $options['evernote']['button_type'] ?>.png'>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
</table>
|
612 |
+
</div>
|
613 |
+
|
614 |
+
<!-- tumblr -->
|
615 |
+
<div id="tabs-9">
|
616 |
+
<table class='form-table'>
|
617 |
+
<tr>
|
618 |
+
<th scope="row">Button type:</th>
|
619 |
+
<td>
|
620 |
+
<select name='tumblr_button_type' onchange='jQuery("#tumblr_img").attr("src", "http://platform.tumblr.com/v1/share_"+this.form.tumblr_button_type.value+".png")'>
|
621 |
+
<?php
|
622 |
+
$button_types = array('1', '2', '3', '4');
|
623 |
+
foreach($button_types as $button_type){
|
624 |
+
?><option value='<?php echo $button_type ?>' <?php if( $options['tumblr']['button_type'] == $button_type ) echo 'selected'; ?>>share_<?php echo $button_type?></option><?php
|
625 |
+
}
|
626 |
+
?>
|
627 |
+
</select>
|
628 |
+
<img id='tumblr_img' style="vertical-align:middle" src='http://platform.tumblr.com/v1/share_<?php echo $options['tumblr']['button_type'] ?>.png'>
|
629 |
+
</td>
|
630 |
+
</tr>
|
631 |
+
</table>
|
632 |
+
</div>
|
633 |
+
|
634 |
+
<!-- atode -->
|
635 |
+
<div id="tabs-10">
|
636 |
+
<table class='form-table'>
|
637 |
+
<tr>
|
638 |
+
<th scope="row">Button type:</th>
|
639 |
+
<td>
|
640 |
+
<select name='atode_button_type' onchange='jQuery("#atode_img").attr("src", "http://atode.cc/img/"+this.form.atode_button_type.value+".gif")'>
|
641 |
+
<?php
|
642 |
+
$button_types = array('iconsja', 'iconnja', 'iconnen');
|
643 |
+
foreach($button_types as $button_type){
|
644 |
+
?><option value='<?php echo $button_type ?>' <?php if( $options['atode']['button_type'] == $button_type ) echo 'selected'; ?>><?php echo $button_type?></option><?php
|
645 |
+
}
|
646 |
+
?>
|
647 |
+
</select>
|
648 |
+
<img id='atode_img' style="vertical-align:middle" src='http://atode.cc/img/<?php echo $options['atode']['button_type'] ?>.gif'>
|
649 |
+
</td>
|
650 |
+
</tr>
|
651 |
+
</table>
|
652 |
+
</div>
|
653 |
|
654 |
</div>
|
655 |
<p class="submit">
|
696 |
<tr><td>stumbleupon</td><td>StumbleUpon</td></tr>
|
697 |
<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>
|
698 |
<tr><td>gree</td><td>GREE Social Feedback</td></tr>
|
699 |
+
<tr><td>atode</td><td>atode (toread)</td></tr>
|
700 |
</table>
|
701 |
</div>
|
702 |
|
modules/content.php
CHANGED
@@ -81,15 +81,21 @@ function wp_social_bookmarking_light_wp_head()
|
|
81 |
<?php
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
?>
|
85 |
<style type="text/css">
|
86 |
-
div.wp_social_bookmarking_light{border:0 !important;padding
|
87 |
-
div.wp_social_bookmarking_light div{float:left !important;border:0 !important;padding:0 4px
|
88 |
div.wp_social_bookmarking_light img{border:0 !important;padding:0;margin:0;vertical-align:top !important;}
|
89 |
.wp_social_bookmarking_light_clear{clear:both !important;}
|
90 |
-
a.wp_social_bookmarking_light_instapaper {display: inline-block;font-family: 'Lucida Grande', Verdana, sans-serif;font-weight: bold;font-size: 11px;-webkit-border-radius: 8px;-moz-border-radius: 8px;color: #fff;background-color: #626262;border: 1px solid #626262;padding: 0px 3px 0px;text-shadow: #3b3b3b 1px 1px 0px;min-width: 62px;text-align: center;vertical-align:top;line-height:21px;}
|
91 |
-
a.wp_social_bookmarking_light_instapaper, a.wp_social_bookmarking_light_instapaper:hover, a.wp_social_bookmarking_light_instapaper:active, a.wp_social_bookmarking_light_instapaper:visited {color: #fff; text-decoration: none; outline: none;}
|
92 |
-
.wp_social_bookmarking_light_instapaper:focus {outline: none;}
|
93 |
</style>
|
94 |
<!-- END: WP Social Bookmarking Light -->
|
95 |
<?php
|
@@ -124,3 +130,33 @@ function wp_social_bookmarking_light_the_content( $content )
|
|
124 |
}
|
125 |
return $content;
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
<?php
|
82 |
}
|
83 |
|
84 |
+
// load javascript
|
85 |
+
// tumblr
|
86 |
+
if(in_array('tumblr', $services)){
|
87 |
+
?><script type="text/javascript" src="http://platform.tumblr.com/v1/share.js"></script><?php
|
88 |
+
}
|
89 |
+
|
90 |
+
// css
|
91 |
+
$padding_top = $options['style']['padding_top'];
|
92 |
+
$padding_bottom = $options['style']['padding_bottom'];
|
93 |
?>
|
94 |
<style type="text/css">
|
95 |
+
div.wp_social_bookmarking_light{border:0 !important;padding:<?php echo $padding_top ?>px 0 <?php echo $padding_bottom ?>px 0 !important;margin:0 !important;}
|
96 |
+
div.wp_social_bookmarking_light div{float:left !important;border:0 !important;padding:0 4px 0px 0 !important;margin:0 !important;height:21px !important;text-indent:0 !important;}
|
97 |
div.wp_social_bookmarking_light img{border:0 !important;padding:0;margin:0;vertical-align:top !important;}
|
98 |
.wp_social_bookmarking_light_clear{clear:both !important;}
|
|
|
|
|
|
|
99 |
</style>
|
100 |
<!-- END: WP Social Bookmarking Light -->
|
101 |
<?php
|
130 |
}
|
131 |
return $content;
|
132 |
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* wp_footer function
|
136 |
+
*/
|
137 |
+
function wp_social_bookmarking_light_wp_footer()
|
138 |
+
{
|
139 |
+
?>
|
140 |
+
<!-- BEGIN: WP Social Bookmarking Light -->
|
141 |
+
<?php
|
142 |
+
// load options
|
143 |
+
$options = wp_social_bookmarking_light_options();
|
144 |
+
$services = explode(",", $options['services']);
|
145 |
+
|
146 |
+
/*
|
147 |
+
* load javascript
|
148 |
+
*/
|
149 |
+
// facebook
|
150 |
+
if(in_array('facebook_like', $services) || in_array('facebook_send', $services)){
|
151 |
+
$locale = $options['facebook']['locale'];
|
152 |
+
$locale = ($locale == '' ? 'en_US' : $locale);
|
153 |
+
echo '<script src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'."\n";
|
154 |
+
}
|
155 |
+
// evernote
|
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
|
162 |
+
}
|
modules/options.php
CHANGED
@@ -26,6 +26,8 @@ function wp_social_bookmarking_light_default_options()
|
|
26 |
"position" => "top",
|
27 |
"single_page" => true,
|
28 |
"is_page" => true,
|
|
|
|
|
29 |
"mixi" => array('check_key' => '',
|
30 |
'check_robots' => 'noimage',
|
31 |
'button' => 'button-3'),
|
@@ -35,7 +37,7 @@ function wp_social_bookmarking_light_default_options()
|
|
35 |
'width' => '130',
|
36 |
'height' => '20'),
|
37 |
"hatena_button" => array('layout' => 'standard'),
|
38 |
-
'facebook' => array('locale' => '
|
39 |
'facebook_like' => array('version' => 'xfbml',
|
40 |
'action' => 'like',
|
41 |
'colorscheme' => 'light',
|
@@ -48,6 +50,9 @@ function wp_social_bookmarking_light_default_options()
|
|
48 |
'locale' => ''),
|
49 |
'gree' => array('button_type' => '4',
|
50 |
'button_size' => '16'),
|
|
|
|
|
|
|
51 |
);
|
52 |
}
|
53 |
|
@@ -82,7 +87,9 @@ function wp_social_bookmarking_light_save_options($data)
|
|
82 |
"position" => $data["position"],
|
83 |
"single_page" => $data["single_page"] == 'true',
|
84 |
"is_page" => $data["is_page"] == 'true',
|
85 |
-
|
|
|
|
|
86 |
'check_robots' => $data["mixi_check_robots"],
|
87 |
'button' => $data['mixi_button']),
|
88 |
"twitter" => array('via' => $data['twitter_via'],
|
@@ -102,6 +109,9 @@ function wp_social_bookmarking_light_save_options($data)
|
|
102 |
'font' => $data['facebook_send_font']),
|
103 |
'gree' => array('button_type' => $data['gree_button_type'],
|
104 |
'button_size' => $data['gree_button_size']),
|
|
|
|
|
|
|
105 |
);
|
106 |
update_option( 'wp_social_bookmarking_light_options', $options );
|
107 |
return $options;
|
26 |
"position" => "top",
|
27 |
"single_page" => true,
|
28 |
"is_page" => true,
|
29 |
+
'style' => array('padding_top' => '0',
|
30 |
+
'padding_bottom' => '0'),
|
31 |
"mixi" => array('check_key' => '',
|
32 |
'check_robots' => 'noimage',
|
33 |
'button' => 'button-3'),
|
37 |
'width' => '130',
|
38 |
'height' => '20'),
|
39 |
"hatena_button" => array('layout' => 'standard'),
|
40 |
+
'facebook' => array('locale' => 'en_US'),
|
41 |
'facebook_like' => array('version' => 'xfbml',
|
42 |
'action' => 'like',
|
43 |
'colorscheme' => 'light',
|
50 |
'locale' => ''),
|
51 |
'gree' => array('button_type' => '4',
|
52 |
'button_size' => '16'),
|
53 |
+
'evernote' => array('button_type' => 'article-clipper'),
|
54 |
+
'tumblr' => array('button_type' => '1'),
|
55 |
+
'atode' => array('button_type' => 'iconsja'),
|
56 |
);
|
57 |
}
|
58 |
|
87 |
"position" => $data["position"],
|
88 |
"single_page" => $data["single_page"] == 'true',
|
89 |
"is_page" => $data["is_page"] == 'true',
|
90 |
+
'style' => array('padding_top' => $data["style_padding_top"],
|
91 |
+
'padding_bottom' => $data["style_padding_bottom"]),
|
92 |
+
"mixi" => array('check_key' => $data["mixi_check_key"],
|
93 |
'check_robots' => $data["mixi_check_robots"],
|
94 |
'button' => $data['mixi_button']),
|
95 |
"twitter" => array('via' => $data['twitter_via'],
|
109 |
'font' => $data['facebook_send_font']),
|
110 |
'gree' => array('button_type' => $data['gree_button_type'],
|
111 |
'button_size' => $data['gree_button_size']),
|
112 |
+
'evernote' => array('button_type' => $data['evernote_button_type']),
|
113 |
+
'tumblr' => array('button_type' => $data['tumblr_button_type']),
|
114 |
+
'atode' => array('button_type' => $data['atode_button_type']),
|
115 |
);
|
116 |
update_option( 'wp_social_bookmarking_light_options', $options );
|
117 |
return $options;
|
modules/services.php
CHANGED
@@ -228,10 +228,23 @@ class WpSocialBookmarkingLight
|
|
228 |
*/
|
229 |
function tumblr()
|
230 |
{
|
231 |
-
$
|
232 |
-
$
|
233 |
-
$
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
|
237 |
/**
|
@@ -370,9 +383,7 @@ class WpSocialBookmarkingLight
|
|
370 |
.' allowTransparency="true"></iframe>');
|
371 |
}
|
372 |
else{
|
373 |
-
$
|
374 |
-
return $this->link_raw('<script src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'
|
375 |
-
.'<fb:like '
|
376 |
.'href="'.$this->url.'" '
|
377 |
.'send="'.$send.'" '
|
378 |
.'layout="button_count" '
|
@@ -394,11 +405,8 @@ class WpSocialBookmarkingLight
|
|
394 |
$url = $this->url;
|
395 |
$font = $options['facebook_send']['font'];
|
396 |
$colorscheme = $options['facebook_send']['colorscheme'];
|
397 |
-
$locale = $options['facebook']['locale'];
|
398 |
-
$locale = ($locale == '' ? 'en_US' : $locale);
|
399 |
|
400 |
-
return $this->link_raw('<
|
401 |
-
.'<fb:send href="'.$url.'" font="'.$font.'" colorscheme="'.$colorscheme.'"></fb:send>');
|
402 |
}
|
403 |
|
404 |
/**
|
@@ -428,10 +436,12 @@ class WpSocialBookmarkingLight
|
|
428 |
*/
|
429 |
function evernote()
|
430 |
{
|
431 |
-
$
|
432 |
-
$
|
433 |
-
|
434 |
-
return $this->link_raw(
|
|
|
|
|
435 |
}
|
436 |
|
437 |
/**
|
@@ -439,8 +449,10 @@ class WpSocialBookmarkingLight
|
|
439 |
*/
|
440 |
function instapaper()
|
441 |
{
|
442 |
-
$
|
443 |
-
|
|
|
|
|
444 |
}
|
445 |
|
446 |
/**
|
@@ -498,6 +510,21 @@ class WpSocialBookmarkingLight
|
|
498 |
.'src="http://i.share.gree.jp/img/share/button/'.$btn_type.'_'.$size.'.png">'
|
499 |
.'</a>');
|
500 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
}
|
502 |
|
503 |
/**
|
@@ -506,7 +533,7 @@ class WpSocialBookmarkingLight
|
|
506 |
*/
|
507 |
function wp_social_bookmarking_light_get_class_methods(){
|
508 |
$all_methods = get_class_methods('WpSocialBookmarkingLight');
|
509 |
-
$except_methods = array('WpSocialBookmarkingLight', 'to_utf8', 'link_raw', 'link', 'get_methods');
|
510 |
$methods = array();
|
511 |
foreach($all_methods as $method){
|
512 |
if(in_array($method, $except_methods)){
|
228 |
*/
|
229 |
function tumblr()
|
230 |
{
|
231 |
+
$options = wp_social_bookmarking_light_options();
|
232 |
+
$type = $options['tumblr']['button_type'];
|
233 |
+
$width = 'width:81px;';
|
234 |
+
switch($type){
|
235 |
+
case '1' : $width = 'width:81px;'; break;
|
236 |
+
case '2' : $width = 'width:61px;'; break;
|
237 |
+
case '3' : $width = 'width:129px;'; break;
|
238 |
+
case '4' : $width = 'width:20px;'; break;
|
239 |
+
}
|
240 |
+
return $this->link_raw('<a href="http://www.tumblr.com/share?v=3&u='.$this->encode_url.'&t='.$this->encode_title.'" '
|
241 |
+
.'title="'.__l("Share on Tumblr").'" '
|
242 |
+
.'style="display:inline-block; text-indent:-9999px; overflow:hidden; '
|
243 |
+
.$width.' height:20px; '
|
244 |
+
.'background:url(\'http://platform.tumblr.com/v1/share_'.$type.'.png\')'
|
245 |
+
.' top left no-repeat transparent;">'
|
246 |
+
.__l("Share on Tumblr")
|
247 |
+
.'</a>');
|
248 |
}
|
249 |
|
250 |
/**
|
383 |
.' allowTransparency="true"></iframe>');
|
384 |
}
|
385 |
else{
|
386 |
+
return $this->link_raw('<fb:like '
|
|
|
|
|
387 |
.'href="'.$this->url.'" '
|
388 |
.'send="'.$send.'" '
|
389 |
.'layout="button_count" '
|
405 |
$url = $this->url;
|
406 |
$font = $options['facebook_send']['font'];
|
407 |
$colorscheme = $options['facebook_send']['colorscheme'];
|
|
|
|
|
408 |
|
409 |
+
return $this->link_raw('<fb:send href="'.$url.'" font="'.$font.'" colorscheme="'.$colorscheme.'"></fb:send>');
|
|
|
410 |
}
|
411 |
|
412 |
/**
|
436 |
*/
|
437 |
function evernote()
|
438 |
{
|
439 |
+
$options = wp_social_bookmarking_light_options();
|
440 |
+
$type = $options['evernote']['button_type'];
|
441 |
+
|
442 |
+
return $this->link_raw('<a href="#" onclick="Evernote.doClip({ title:\''.$this->title.'\', url:\''.$this->url.'\' });return false;">'
|
443 |
+
.'<img src="http://static.evernote.com/'.$type.'.png" />'
|
444 |
+
.'</a>');
|
445 |
}
|
446 |
|
447 |
/**
|
449 |
*/
|
450 |
function instapaper()
|
451 |
{
|
452 |
+
return $this->link_raw('<iframe border="0" scrolling="no" width="78" height="17" allowtransparency="true" frameborder="0" '
|
453 |
+
.'style="margin-bottom: -3px; z-index: 1338; border: 0px; background-color: transparent; overflow: hidden;" '
|
454 |
+
.'src="http://www.instapaper.com/e2?url='.$this->encode_url.'&title='.$this->encode_title.'&description="'
|
455 |
+
.'></iframe>');
|
456 |
}
|
457 |
|
458 |
/**
|
510 |
.'src="http://i.share.gree.jp/img/share/button/'.$btn_type.'_'.$size.'.png">'
|
511 |
.'</a>');
|
512 |
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* @brief atode
|
516 |
+
*/
|
517 |
+
function atode()
|
518 |
+
{
|
519 |
+
$options = wp_social_bookmarking_light_options();
|
520 |
+
$type = $options['atode']['button_type'];
|
521 |
+
switch($type){
|
522 |
+
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>');
|
523 |
+
case 'iconnja': 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/iconnja.gif" alt="email this" border="0" align="absmiddle" width="66" height="20"></a>');
|
524 |
+
case 'iconnen': 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/iconnen.gif" alt="email this" border="0" align="absmiddle" width="66" height="20"></a>');
|
525 |
+
}
|
526 |
+
return '';
|
527 |
+
}
|
528 |
}
|
529 |
|
530 |
/**
|
533 |
*/
|
534 |
function wp_social_bookmarking_light_get_class_methods(){
|
535 |
$all_methods = get_class_methods('WpSocialBookmarkingLight');
|
536 |
+
$except_methods = array('WpSocialBookmarkingLight', 'wpsocialbookmarkinglight', 'to_utf8', 'link_raw', 'link', 'get_methods');
|
537 |
$methods = array();
|
538 |
foreach($all_methods as $method){
|
539 |
if(in_array($method, $except_methods)){
|
po/wp-social-bookmarking-light-ja.mo
CHANGED
Binary file
|
po/wp-social-bookmarking-light-ja.po
CHANGED
@@ -194,3 +194,6 @@ msgstr "サービス一覧"
|
|
194 |
msgid "Explain"
|
195 |
msgstr "説明"
|
196 |
|
|
|
|
|
|
194 |
msgid "Explain"
|
195 |
msgstr "説明"
|
196 |
|
197 |
+
msgid "Padding"
|
198 |
+
msgstr "上下の間隔"
|
199 |
+
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Social Bookmarking Light ===
|
2 |
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
|
5 |
Requires at least: 2.9.0
|
6 |
-
Tested up to: 3.1.
|
7 |
-
Stable tag: 1.6.
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
@@ -40,6 +40,7 @@ This is the list of used social sites:
|
|
40 |
* StumbleUpon
|
41 |
* mixi Check
|
42 |
* GREE Social Feedback
|
|
|
43 |
|
44 |
== Installation ==
|
45 |
|
@@ -55,6 +56,11 @@ This is the list of used social sites:
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
= 1.6.5 =
|
59 |
* Added: Facebook Send Button.
|
60 |
* Added: Options for gree.
|
1 |
=== WP Social Bookmarking Light ===
|
2 |
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
|
5 |
Requires at least: 2.9.0
|
6 |
+
Tested up to: 3.1.2
|
7 |
+
Stable tag: 1.6.6
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
40 |
* StumbleUpon
|
41 |
* mixi Check
|
42 |
* GREE Social Feedback
|
43 |
+
* atode (toread)
|
44 |
|
45 |
== Installation ==
|
46 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 1.6.6 =
|
60 |
+
* Added: atode(toread) Button.
|
61 |
+
* Added: Padding option.
|
62 |
+
* Improved: Instapaper and evernote.
|
63 |
+
|
64 |
= 1.6.5 =
|
65 |
* Added: Facebook Send Button.
|
66 |
* Added: Options for gree.
|
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)
|
@@ -35,6 +35,9 @@ define( "WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN", "wp-social-bookmarking-light" );
|
|
35 |
function _el($val){
|
36 |
_e($val, WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN);
|
37 |
}
|
|
|
|
|
|
|
38 |
|
39 |
// load modules
|
40 |
require_once WP_SOCIAL_BOOKMARKING_LIGHT_DIR.'/modules/options.php';
|
@@ -49,9 +52,10 @@ load_plugin_textdomain( WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN, false,
|
|
49 |
// initialize
|
50 |
function wp_social_bookmarking_light_init()
|
51 |
{
|
52 |
-
add_action(
|
53 |
-
|
54 |
-
|
|
|
55 |
}
|
56 |
add_action( 'init', 'wp_social_bookmarking_light_init' );
|
57 |
|
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.6
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|
35 |
function _el($val){
|
36 |
_e($val, WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN);
|
37 |
}
|
38 |
+
function __l($val){
|
39 |
+
__($val, WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN);
|
40 |
+
}
|
41 |
|
42 |
// load modules
|
43 |
require_once WP_SOCIAL_BOOKMARKING_LIGHT_DIR.'/modules/options.php';
|
52 |
// initialize
|
53 |
function wp_social_bookmarking_light_init()
|
54 |
{
|
55 |
+
add_action('wp_head', 'wp_social_bookmarking_light_wp_head');
|
56 |
+
add_action('wp_footer', 'wp_social_bookmarking_light_wp_footer');
|
57 |
+
add_filter('the_content', 'wp_social_bookmarking_light_the_content');
|
58 |
+
add_action('admin_menu', 'wp_social_bookmarking_light_admin_menu');
|
59 |
}
|
60 |
add_action( 'init', 'wp_social_bookmarking_light_init' );
|
61 |
|