Version Description
- it is now possible to set title and url as shortcode parameters, e.g.: [hupso title="My title" url="http://www.hupso.com/share/"]
- replaced border="0" with style="border:0px;" to help pass W3C validation
Download this release
Release Info
Developer | kasal |
Plugin | Hupso Share Buttons for Twitter, Facebook & Google+ |
Version | 3.9.3 |
Comparing to | |
See all releases |
Code changes from version 3.9.2 to 3.9.3
- readme.txt +35 -1
- share-buttons-hupso.php +67 -22
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.hupso.com/
|
|
4 |
Tags: twitter, facebook, google+, social, sharing, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, lockerz, shareaholic
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 3.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -49,6 +49,7 @@ Buttons will appear below your articles or on top of them as you choose.
|
|
49 |
echo do_shortcode('[hupso]');
|
50 |
You can configure share buttons in plugin settings.
|
51 |
* Shortcodes inside widget text: Just include [hupso] anywhere in widget text area and share buttons will be displayed there.
|
|
|
52 |
|
53 |
[Share Buttons Demo](http://www.hupso.com/share/) | [FAQ](http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/faq/) | [Feedback](http://www.hupso.com/share/feedback/)
|
54 |
|
@@ -80,6 +81,27 @@ All major social networks are supported: Twitter, Facebook, Google+, Linkedin, S
|
|
80 |
Yes. There is a sidebar widget included with the plugin. Go to WP Administration then click on "Widgets" under "Appearance" menu.
|
81 |
Then drag Hupso Share Buttons Widget from left and drop it on the sidebar on the right.
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
= How can I show share buttons inside template files? =
|
84 |
|
85 |
Add this PHP code inside template files at position where you want to show share buttons: echo do_shortcode('[hupso]');
|
@@ -93,6 +115,11 @@ Use this code: $HUPSO_SHOW = false; Make sure you do this before div id="content
|
|
93 |
|
94 |
Yes, you can. Just include [hupso] anywhere in widget text area and share buttons will be displayed there.
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
= How can I display share buttons only inside widget and not under posts? =
|
97 |
|
98 |
Add Hupso share buttons widget, then go to Hupso plugin settings and clear all fields in "Show buttons on" section.
|
@@ -152,6 +179,13 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
= 3.9.1 =
|
157 |
* Facebook comment box is now always visible
|
4 |
Tags: twitter, facebook, google+, social, sharing, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, lockerz, shareaholic
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 3.9.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
49 |
echo do_shortcode('[hupso]');
|
50 |
You can configure share buttons in plugin settings.
|
51 |
* Shortcodes inside widget text: Just include [hupso] anywhere in widget text area and share buttons will be displayed there.
|
52 |
+
* You can use custom titles and urls inside shortcodes. Exampe: [hupso title="My title" url="http://www.hupso.com/share/"]. You can use only title or only url if you like: [hupso title="My title"], [hupso url="http://www.hupso.com/share/"].
|
53 |
|
54 |
[Share Buttons Demo](http://www.hupso.com/share/) | [FAQ](http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/faq/) | [Feedback](http://www.hupso.com/share/feedback/)
|
55 |
|
81 |
Yes. There is a sidebar widget included with the plugin. Go to WP Administration then click on "Widgets" under "Appearance" menu.
|
82 |
Then drag Hupso Share Buttons Widget from left and drop it on the sidebar on the right.
|
83 |
|
84 |
+
= How can I style "Share image" with CSS? =
|
85 |
+
|
86 |
+
Add CSS to your style.css file.
|
87 |
+
For share buttons: .hupso_pop > img { # add style rules here }
|
88 |
+
For share toolbar: .hupso_toolbar > img { # add style rules here }
|
89 |
+
For counters: .hupso_counters > img { # add style rules here }
|
90 |
+
|
91 |
+
= How do I change the margin of share button, share toolbar or counters? =
|
92 |
+
|
93 |
+
Add CSS to your style.css file:
|
94 |
+
.hupso_c > div > div {
|
95 |
+
margin-left: 0px !important;
|
96 |
+
}
|
97 |
+
|
98 |
+
= Facebook comment box is cut on the right. How do I fix it? =
|
99 |
+
|
100 |
+
Add this CSS to your style.css file:
|
101 |
+
iframe {
|
102 |
+
max-width:none !important;
|
103 |
+
}
|
104 |
+
|
105 |
= How can I show share buttons inside template files? =
|
106 |
|
107 |
Add this PHP code inside template files at position where you want to show share buttons: echo do_shortcode('[hupso]');
|
115 |
|
116 |
Yes, you can. Just include [hupso] anywhere in widget text area and share buttons will be displayed there.
|
117 |
|
118 |
+
= Can I set title and url as shortcode parameters? =
|
119 |
+
|
120 |
+
Yes. Include this shortcodes anywhere inside post's text or inside text widget: [hupso title="My title" url="http://www.hupso.com/share/"]. Replace title and url with your title and your url.
|
121 |
+
You can also set only one of the parameters like this: [hupso title="My title"] or like this [hupso url="http://www.hupso.com/share/"].
|
122 |
+
|
123 |
= How can I display share buttons only inside widget and not under posts? =
|
124 |
|
125 |
Add Hupso share buttons widget, then go to Hupso plugin settings and clear all fields in "Show buttons on" section.
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= 3.9.3 =
|
183 |
+
* it is now possible to set title and url as shortcode parameters, e.g.: [hupso title="My title" url="http://www.hupso.com/share/"]
|
184 |
+
* replaced border="0" with style="border:0px;" to help pass W3C validation
|
185 |
+
|
186 |
+
= 3.9.2 =
|
187 |
+
* option to use custom image as Share button (you can now create your own share button)
|
188 |
+
* added button to update preview in settings
|
189 |
|
190 |
= 3.9.1 =
|
191 |
* Facebook comment box is now always visible
|
share-buttons-hupso.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
|
4 |
Plugin URI: http://www.hupso.com/share/
|
5 |
Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit, Bebo and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
|
6 |
-
Version: 3.9.
|
7 |
Author: kasal
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -62,11 +62,15 @@ function hupso_widget_init() {
|
|
62 |
}
|
63 |
|
64 |
function hupso_shortcodes( $atts ) {
|
65 |
-
global $hupso_state;
|
66 |
$hupso_state = 'shortcodes';
|
67 |
if ($atts == '') {
|
68 |
return hupso_the_content('');
|
69 |
}
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
if ( function_exists('register_activation_hook') )
|
@@ -118,6 +122,7 @@ function hupso_plugin_uninstall() {
|
|
118 |
delete_option( 'hupso_page_url' );
|
119 |
delete_option( 'hupso_page_title' );
|
120 |
delete_option( 'hupso_hide_categories' );
|
|
|
121 |
}
|
122 |
|
123 |
function hupso_plugin_activation() {
|
@@ -217,7 +222,7 @@ function hupso_admin_settings_show() {
|
|
217 |
echo '<form name="hupso_settings_form" method="post" action="">';
|
218 |
|
219 |
echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
|
220 |
-
echo '<div id="button_preview" style="background: #F7FFBF; padding: 10px 10px 10px 10px; "><h3>' . __( 'Preview', 'share_buttons_hupso') . '</h3><br/>';
|
221 |
echo '<div id="button"></div>';
|
222 |
echo '<div id="move_mouse"><p style="font-size:13px; padding-top: 15px;"><b>Move your mouse over the button to see the sharing menu.</b></p></div><br/><br/>';
|
223 |
echo '<div style="padding-left:40px;"><input class="button-primary" name="submit-preview" type="submit" onclick="hupso_create_code()" value="' . __('Save Settings', 'share_buttons_hupso') . '" /></div>';
|
@@ -251,13 +256,13 @@ function hupso_admin_settings_show() {
|
|
251 |
$class_name = 'hupso_pop';
|
252 |
$alt = 'Share Button';
|
253 |
$class_url = ' href="http://www.hupso.com/share/" ';
|
254 |
-
$style = 'padding-left:5px; padding-top:5px; padding-bottom:5px; margin:0';
|
255 |
|
256 |
-
$button_60_img = '<img style="'.$style.'" src="'.$hupso_plugin_url.'/buttons/button60x14.png"
|
257 |
-
$button_80_img = '<img style="'.$style.'" src="'.$hupso_plugin_url.'/buttons/button80x19.png"
|
258 |
-
$button_100_img = '<img style="'.$style.'" src="'.$hupso_plugin_url.'/buttons/button100x23.png"
|
259 |
-
$button_120_img = '<img style="'.$style.'" src="'.$hupso_plugin_url.'/buttons/button120x28.png"
|
260 |
-
$button_160_img = '<img style="'.$style.'" src="'.$hupso_plugin_url.'/buttons/button160x37.png"
|
261 |
|
262 |
$checked = 'checked="checked"';
|
263 |
$current_button_size = get_option( 'hupso_button_size' , 'button100x23' );
|
@@ -266,12 +271,14 @@ function hupso_admin_settings_show() {
|
|
266 |
$button100_checked = '';
|
267 |
$button120_checked = '';
|
268 |
$button160_checked = '';
|
|
|
269 |
switch ( $current_button_size ) {
|
270 |
case 'button60x14' : $button60_checked = $checked; break;
|
271 |
case 'button80x19' : $button80_checked = $checked; break;
|
272 |
case 'button100x23' : $button100_checked = $checked; break;
|
273 |
case 'button120x28' : $button120_checked = $checked; break;
|
274 |
case 'button160x37' : $button160_checked = $checked; break;
|
|
|
275 |
default:
|
276 |
$button100_checked = $checked; break;
|
277 |
}
|
@@ -281,12 +288,13 @@ function hupso_admin_settings_show() {
|
|
281 |
<input type="hidden" name="code" value="" />
|
282 |
<br/>
|
283 |
<div id="button_type">
|
284 |
-
<table
|
285 |
<tr>
|
286 |
<td style="width:100px;"><?php _e('Button type', 'share_buttons_hupso'); ?>
|
287 |
</td>
|
288 |
<?php
|
289 |
$hupso_button_type = get_option( 'hupso_button_type', 'share_toolbar' );
|
|
|
290 |
$checked = ' checked="checked" ';
|
291 |
$hupso_share_button_checked = '';
|
292 |
$hupso_share_toolbar_checked = '';
|
@@ -308,16 +316,17 @@ function hupso_admin_settings_show() {
|
|
308 |
</div>
|
309 |
|
310 |
<div id="button_style">
|
311 |
-
<table
|
312 |
<tr>
|
313 |
<td style="width:100px;"><?php _e('Button size', 'share_buttons_hupso'); ?></td>
|
314 |
<td>
|
315 |
-
<table
|
316 |
<tr><td><input type="radio" name="size" value="button60x14" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button60_checked; ?> /></td><td style="padding-right:10px;"><?php echo $button_60_img ?></td></tr>
|
317 |
<tr><td><input type="radio" name="size" value="button80x19" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button80_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_80_img ?></td></tr>
|
318 |
<tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
|
319 |
<tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
|
320 |
<tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
|
|
|
321 |
</table>
|
322 |
<hr style="height:1px; width:500px;"/>
|
323 |
</td>
|
@@ -326,7 +335,7 @@ function hupso_admin_settings_show() {
|
|
326 |
</div>
|
327 |
|
328 |
<div id="toolbar_size" style="display:none;">
|
329 |
-
<table
|
330 |
<tr>
|
331 |
<td style="width:100px;"><?php _e('Toolbar size', 'share_buttons_hupso'); ?></td>
|
332 |
<td style="width:100px">
|
@@ -354,7 +363,7 @@ function hupso_admin_settings_show() {
|
|
354 |
|
355 |
|
356 |
<div id="share_image" style="padding-top:10px;">
|
357 |
-
<table
|
358 |
<tr>
|
359 |
<td style="width:100px;"><?php _e('Share image', 'share_buttons_hupso'); ?></td>
|
360 |
<td style="width:500px">
|
@@ -416,7 +425,7 @@ function hupso_admin_settings_show() {
|
|
416 |
|
417 |
|
418 |
<div id="services">
|
419 |
-
<table
|
420 |
<tr>
|
421 |
<td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
|
422 |
<td><?php hupso_settings_print_services(); ?></td>
|
@@ -451,7 +460,7 @@ function hupso_admin_settings_show() {
|
|
451 |
if ( $linkedin_share == 1 ) $linkedin_share_checked = $checked;
|
452 |
?>
|
453 |
<div id="counters_config" style="display:none;">
|
454 |
-
<table
|
455 |
<tr>
|
456 |
<td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
|
457 |
<td>
|
@@ -504,7 +513,7 @@ function hupso_admin_settings_show() {
|
|
504 |
|
505 |
</div>
|
506 |
<div id="show_icons">
|
507 |
-
<table
|
508 |
<tr>
|
509 |
<td style="width:100px;"><?php _e('Type of menu', 'share_buttons_hupso'); ?></td>
|
510 |
<?php
|
@@ -525,7 +534,7 @@ function hupso_admin_settings_show() {
|
|
525 |
</table>
|
526 |
</div>
|
527 |
|
528 |
-
<table
|
529 |
<tr>
|
530 |
<td style="width:100px;"><?php _e('Button position', 'share_buttons_hupso'); ?></td>
|
531 |
<?php
|
@@ -818,7 +827,15 @@ function hupso_admin_settings_save() {
|
|
818 |
$hupso_button_size = get_option ( 'hupso_button_size', 'button100x23');
|
819 |
}
|
820 |
$b_size = str_replace( 'button', '', $hupso_button_size);
|
821 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
|
823 |
/* save toolbar size */
|
824 |
if ( $post ) {
|
@@ -1130,7 +1147,7 @@ function hupso_the_content( $content ) {
|
|
1130 |
|
1131 |
|
1132 |
/* default code */
|
1133 |
-
$share_code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ --><a class="hupso_toolbar" href="http://www.hupso.com/share/"><img src="http://static.hupso.com/share' . $hupso_dev . '/buttons/share-medium.png"
|
1134 |
|
1135 |
$code = get_option( 'hupso_share_buttons_code', $share_code );
|
1136 |
$button_type = get_option( 'hupso_button_type', 'share_toolbar' );
|
@@ -1180,14 +1197,37 @@ function hupso_the_content( $content ) {
|
|
1180 |
if ( $hupso_twitter_via != '') {
|
1181 |
$code .= 'var hupso_twitter_via="' . $hupso_twitter_via . '";';
|
1182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
|
1184 |
-
if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) ) {
|
1185 |
if ( $hupso_page_url != '' ) {
|
1186 |
$new_url = $hupso_page_url;
|
1187 |
}
|
1188 |
else {
|
1189 |
$new_url = $post_url;
|
1190 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1191 |
switch ( $button_type ) {
|
1192 |
case 'share_button':
|
1193 |
$code .= 'var hupso_url="' . $new_url . '";';
|
@@ -1210,6 +1250,12 @@ function hupso_the_content( $content ) {
|
|
1210 |
else {
|
1211 |
$new_title = $ptitle;
|
1212 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1213 |
switch ( $button_type ) {
|
1214 |
case 'share_button':
|
1215 |
$code .= 'var hupso_title="' . str_replace('"', '"', $new_title) . '";';
|
@@ -1238,7 +1284,6 @@ function hupso_the_content( $content ) {
|
|
1238 |
}
|
1239 |
|
1240 |
$static_server = 'http://static.hupso.com/share' . $hupso_dev . '/js/' . $js_file;
|
1241 |
-
$static_server = 'http://www.hupso.com/share' . $hupso_dev . '/js/debug/' . $js_file;
|
1242 |
$code .= '<script type="text/javascript" src="' . $static_server . '"></script><!-- Hupso Share Buttons -->';
|
1243 |
|
1244 |
$position = get_option( 'hupso_button_position', 'below' );
|
3 |
Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
|
4 |
Plugin URI: http://www.hupso.com/share/
|
5 |
Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit, Bebo and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
|
6 |
+
Version: 3.9.3
|
7 |
Author: kasal
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
62 |
}
|
63 |
|
64 |
function hupso_shortcodes( $atts ) {
|
65 |
+
global $hupso_state, $hupso_shortcode_params;
|
66 |
$hupso_state = 'shortcodes';
|
67 |
if ($atts == '') {
|
68 |
return hupso_the_content('');
|
69 |
}
|
70 |
+
else {
|
71 |
+
$hupso_shortcode_params = $atts;
|
72 |
+
return hupso_the_content('');
|
73 |
+
}
|
74 |
}
|
75 |
|
76 |
if ( function_exists('register_activation_hook') )
|
122 |
delete_option( 'hupso_page_url' );
|
123 |
delete_option( 'hupso_page_title' );
|
124 |
delete_option( 'hupso_hide_categories' );
|
125 |
+
delete_option( 'hupso_button_image_custom_url' );
|
126 |
}
|
127 |
|
128 |
function hupso_plugin_activation() {
|
222 |
echo '<form name="hupso_settings_form" method="post" action="">';
|
223 |
|
224 |
echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
|
225 |
+
echo '<div id="button_preview" style="background: #F7FFBF; padding: 10px 10px 10px 10px; "><table><tr><td><h3>' . __( 'Preview', 'share_buttons_hupso') . '</h3></td><td style="padding-left:50px;"><input class="button-primary" name="submit-preview" type="button" onclick="hupso_create_code()" value="' . __('Update', 'share_buttons_hupso') . '" /></td></tr></table><br/>';
|
226 |
echo '<div id="button"></div>';
|
227 |
echo '<div id="move_mouse"><p style="font-size:13px; padding-top: 15px;"><b>Move your mouse over the button to see the sharing menu.</b></p></div><br/><br/>';
|
228 |
echo '<div style="padding-left:40px;"><input class="button-primary" name="submit-preview" type="submit" onclick="hupso_create_code()" value="' . __('Save Settings', 'share_buttons_hupso') . '" /></div>';
|
256 |
$class_name = 'hupso_pop';
|
257 |
$alt = 'Share Button';
|
258 |
$class_url = ' href="http://www.hupso.com/share/" ';
|
259 |
+
$style = 'padding-left:5px; padding-top:5px; padding-bottom:5px; margin:0; border:0px;';
|
260 |
|
261 |
+
$button_60_img = '<img style="'.$style.' width: 60px; height:14px;" src="'.$hupso_plugin_url.'/buttons/button60x14.png" alt="'.$alt.'"/>';
|
262 |
+
$button_80_img = '<img style="'.$style.' width: 80px; height:19px;" src="'.$hupso_plugin_url.'/buttons/button80x19.png" alt="'.$alt.'"/>';
|
263 |
+
$button_100_img = '<img style="'.$style.' width: 100px; height:23px;" src="'.$hupso_plugin_url.'/buttons/button100x23.png" alt="'.$alt.'"/>';
|
264 |
+
$button_120_img = '<img style="'.$style.' width: 120px; height:28px;" src="'.$hupso_plugin_url.'/buttons/button120x28.png" alt="'.$alt.'"/>';
|
265 |
+
$button_160_img = '<img style="'.$style.' width: 160px; height:37px;" src="'.$hupso_plugin_url.'/buttons/button160x37.png" alt="'.$alt.'"/>';
|
266 |
|
267 |
$checked = 'checked="checked"';
|
268 |
$current_button_size = get_option( 'hupso_button_size' , 'button100x23' );
|
271 |
$button100_checked = '';
|
272 |
$button120_checked = '';
|
273 |
$button160_checked = '';
|
274 |
+
$share_button_custom_checked = '';
|
275 |
switch ( $current_button_size ) {
|
276 |
case 'button60x14' : $button60_checked = $checked; break;
|
277 |
case 'button80x19' : $button80_checked = $checked; break;
|
278 |
case 'button100x23' : $button100_checked = $checked; break;
|
279 |
case 'button120x28' : $button120_checked = $checked; break;
|
280 |
case 'button160x37' : $button160_checked = $checked; break;
|
281 |
+
case 'custom': $share_button_custom_checked = $checked; break;
|
282 |
default:
|
283 |
$button100_checked = $checked; break;
|
284 |
}
|
288 |
<input type="hidden" name="code" value="" />
|
289 |
<br/>
|
290 |
<div id="button_type">
|
291 |
+
<table style="border: 0px;">
|
292 |
<tr>
|
293 |
<td style="width:100px;"><?php _e('Button type', 'share_buttons_hupso'); ?>
|
294 |
</td>
|
295 |
<?php
|
296 |
$hupso_button_type = get_option( 'hupso_button_type', 'share_toolbar' );
|
297 |
+
$hupso_button_image_custom_url = get_option( 'hupso_button_image_custom_url', '');
|
298 |
$checked = ' checked="checked" ';
|
299 |
$hupso_share_button_checked = '';
|
300 |
$hupso_share_toolbar_checked = '';
|
316 |
</div>
|
317 |
|
318 |
<div id="button_style">
|
319 |
+
<table style="border: 0px;">
|
320 |
<tr>
|
321 |
<td style="width:100px;"><?php _e('Button size', 'share_buttons_hupso'); ?></td>
|
322 |
<td>
|
323 |
+
<table style="border: 0px;">
|
324 |
<tr><td><input type="radio" name="size" value="button60x14" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button60_checked; ?> /></td><td style="padding-right:10px;"><?php echo $button_60_img ?></td></tr>
|
325 |
<tr><td><input type="radio" name="size" value="button80x19" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button80_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_80_img ?></td></tr>
|
326 |
<tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
|
327 |
<tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
|
328 |
<tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
|
329 |
+
<tr><td><input type="radio" name="size" value="custom" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $share_button_custom_checked; ?> /></td><td style="padding-left:10px;"><?php _e('Custom image from URL', 'share_buttons_hupso'); ?>: <input type="text" name="hupso_button_image_custom_url" onchange="create_code()" style="width:200px;" value="<?php echo $hupso_button_image_custom_url; ?>"/></td></tr>
|
330 |
</table>
|
331 |
<hr style="height:1px; width:500px;"/>
|
332 |
</td>
|
335 |
</div>
|
336 |
|
337 |
<div id="toolbar_size" style="display:none;">
|
338 |
+
<table style="border: 0px;">
|
339 |
<tr>
|
340 |
<td style="width:100px;"><?php _e('Toolbar size', 'share_buttons_hupso'); ?></td>
|
341 |
<td style="width:100px">
|
363 |
|
364 |
|
365 |
<div id="share_image" style="padding-top:10px;">
|
366 |
+
<table style="border: 0px;">
|
367 |
<tr>
|
368 |
<td style="width:100px;"><?php _e('Share image', 'share_buttons_hupso'); ?></td>
|
369 |
<td style="width:500px">
|
425 |
|
426 |
|
427 |
<div id="services">
|
428 |
+
<table style="border: 0px;">
|
429 |
<tr>
|
430 |
<td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
|
431 |
<td><?php hupso_settings_print_services(); ?></td>
|
460 |
if ( $linkedin_share == 1 ) $linkedin_share_checked = $checked;
|
461 |
?>
|
462 |
<div id="counters_config" style="display:none;">
|
463 |
+
<table style="border: 0px;">
|
464 |
<tr>
|
465 |
<td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
|
466 |
<td>
|
513 |
|
514 |
</div>
|
515 |
<div id="show_icons">
|
516 |
+
<table style="border: 0px;">
|
517 |
<tr>
|
518 |
<td style="width:100px;"><?php _e('Type of menu', 'share_buttons_hupso'); ?></td>
|
519 |
<?php
|
534 |
</table>
|
535 |
</div>
|
536 |
|
537 |
+
<table style="border: 0px;">
|
538 |
<tr>
|
539 |
<td style="width:100px;"><?php _e('Button position', 'share_buttons_hupso'); ?></td>
|
540 |
<?php
|
827 |
$hupso_button_size = get_option ( 'hupso_button_size', 'button100x23');
|
828 |
}
|
829 |
$b_size = str_replace( 'button', '', $hupso_button_size);
|
830 |
+
if ($b_size != 'custom') {
|
831 |
+
list($width, $height) = split('x', $b_size);
|
832 |
+
}
|
833 |
+
|
834 |
+
/* save share button custom URL */
|
835 |
+
if ( $post ) {
|
836 |
+
$hupso_button_image_custom_url = @$_POST[ 'hupso_button_image_custom_url' ];
|
837 |
+
update_option( 'hupso_button_image_custom_url', $hupso_button_image_custom_url );
|
838 |
+
}
|
839 |
|
840 |
/* save toolbar size */
|
841 |
if ( $post ) {
|
1147 |
|
1148 |
|
1149 |
/* default code */
|
1150 |
+
$share_code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ --><a class="hupso_toolbar" href="http://www.hupso.com/share/"><img src="http://static.hupso.com/share' . $hupso_dev . '/buttons/share-medium.png" style="border:0px; padding-top:5px; float:left;" alt="Share"/></a><script type="text/javascript">var hupso_services_t=new Array("Twitter","Facebook","Google Plus","Linkedin","StumbleUpon","Digg","Reddit","Bebo","Delicious"); var hupso_toolbar_size_t="medium";';
|
1151 |
|
1152 |
$code = get_option( 'hupso_share_buttons_code', $share_code );
|
1153 |
$button_type = get_option( 'hupso_button_type', 'share_toolbar' );
|
1197 |
if ( $hupso_twitter_via != '') {
|
1198 |
$code .= 'var hupso_twitter_via="' . $hupso_twitter_via . '";';
|
1199 |
}
|
1200 |
+
|
1201 |
+
/* Get shortcode params (if they exist) */
|
1202 |
+
global $hupso_shortcode_params;
|
1203 |
+
if ($hupso_shortcode_params != '') {
|
1204 |
+
if ( isset( $hupso_shortcode_params['title'] ) ) {
|
1205 |
+
$h_title = $hupso_shortcode_params['title'];
|
1206 |
+
}
|
1207 |
+
else {
|
1208 |
+
$h_title = '';
|
1209 |
+
}
|
1210 |
+
if ( isset( $hupso_shortcode_params['url'] ) ) {
|
1211 |
+
$h_url = $hupso_shortcode_params['url'];
|
1212 |
+
}
|
1213 |
+
else {
|
1214 |
+
$h_url = '';
|
1215 |
+
}
|
1216 |
+
}
|
1217 |
|
1218 |
+
if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) || ( $hupso_shortcode_params != '' ) ) {
|
1219 |
if ( $hupso_page_url != '' ) {
|
1220 |
$new_url = $hupso_page_url;
|
1221 |
}
|
1222 |
else {
|
1223 |
$new_url = $post_url;
|
1224 |
}
|
1225 |
+
|
1226 |
+
/* Shortcode param */
|
1227 |
+
if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
|
1228 |
+
$new_url = $h_url;
|
1229 |
+
}
|
1230 |
+
|
1231 |
switch ( $button_type ) {
|
1232 |
case 'share_button':
|
1233 |
$code .= 'var hupso_url="' . $new_url . '";';
|
1250 |
else {
|
1251 |
$new_title = $ptitle;
|
1252 |
}
|
1253 |
+
|
1254 |
+
/* Shortcode param */
|
1255 |
+
if ( ($hupso_shortcode_params != '') && ($h_title != '') ) {
|
1256 |
+
$new_title = $h_title;
|
1257 |
+
}
|
1258 |
+
|
1259 |
switch ( $button_type ) {
|
1260 |
case 'share_button':
|
1261 |
$code .= 'var hupso_title="' . str_replace('"', '"', $new_title) . '";';
|
1284 |
}
|
1285 |
|
1286 |
$static_server = 'http://static.hupso.com/share' . $hupso_dev . '/js/' . $js_file;
|
|
|
1287 |
$code .= '<script type="text/javascript" src="' . $static_server . '"></script><!-- Hupso Share Buttons -->';
|
1288 |
|
1289 |
$position = get_option( 'hupso_button_position', 'below' );
|