Hupso Share Buttons for Twitter, Facebook & Google+ - Version 3.9.4

Version Description

  • option to use your own custom social icons
  • share button is now available in 8 more colors
Download this release

Release Info

Developer kasal
Plugin Icon 128x128 Hupso Share Buttons for Twitter, Facebook & Google+
Version 3.9.4
Comparing to
See all releases

Code changes from version 3.9.3 to 3.9.4

img/services/24/bebo.png ADDED
Binary file
img/services/24/delicious.png ADDED
Binary file
img/services/24/digg.png ADDED
Binary file
img/services/24/facebook.png ADDED
Binary file
img/services/24/googleplus.png ADDED
Binary file
img/services/24/linkedin.png ADDED
Binary file
img/services/24/pinterest.png ADDED
Binary file
img/services/24/reddit.png ADDED
Binary file
img/services/24/stumbleupon.png ADDED
Binary file
img/services/24/twitter.png ADDED
Binary file
img/services/32/bebo.png ADDED
Binary file
img/services/32/delicious.png ADDED
Binary file
img/services/32/digg.png ADDED
Binary file
img/services/32/facebook.png ADDED
Binary file
img/services/32/googleplus.png ADDED
Binary file
img/services/32/linkedin.png ADDED
Binary file
img/services/32/pinterest.png ADDED
Binary file
img/services/32/reddit.png ADDED
Binary file
img/services/32/stumbleupon.png ADDED
Binary file
img/services/32/twitter.png ADDED
Binary file
js/create_button.js CHANGED
@@ -30,6 +30,9 @@ function hupso_create_code() {
30
  var share_image_lang = '';
31
  var hupso_twitter_via = '';
32
  var hupso_counters_lang = 'en_US';
 
 
 
33
 
34
  dir = "";
35
  cdn = "static";
@@ -96,7 +99,11 @@ function hupso_create_code() {
96
 
97
  share_image = $("input:radio[name=hupso_share_image]:checked").val();
98
  share_image_custom_url = $.trim($("input:text[name=hupso_share_image_custom_url]").val());
 
99
  hupso_twitter_via = $.trim($("input:text[name=hupso_twitter_via]").val());
 
 
 
100
 
101
  var lang_code = $("#share_image_lang option:selected").val();
102
  if ( lang_code != 'en' ) {
@@ -129,10 +136,12 @@ function hupso_create_code() {
129
  icon_type = $("input:radio[name=menu_type]:checked").val();
130
 
131
  bsize = $("input:radio[name=size]:checked").val();
132
- var values = bsize.split('x');
133
- bheight = values[1];
134
- var values2 = values[0].split('n');
135
- bwidth = values2[1];
 
 
136
 
137
  hupso_url = $.trim($("input:text[name=page_url]").val());
138
  hupso_title = $.trim($("input:text[name=page_title]").val());
@@ -215,6 +224,7 @@ function hupso_create_code() {
215
  if ( $( "input:checkbox[name=facebook]:checked" ).val() == 1 )
216
  hupso_services += '"Facebook",';
217
  if ( $( "input:checkbox[name=googleplus]:checked" ).val() == 1 )
 
218
  hupso_services += '"Google Plus",';
219
  if ( $( "input:checkbox[name=pinterest]:checked" ).val() == 1 )
220
  hupso_services += '"Pinterest",';
@@ -366,9 +376,14 @@ function hupso_create_code() {
366
  var code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ -->';
367
  code += '<a class="'+hupso_class+'" href="http://www.hupso.com/share/">'; // float: class="hupso_float"
368
 
369
- switch ( button_type ) {
370
  case 'share_button':
371
- code += '<img src="http://static.hupso.com/share/buttons/'+bsize+'.png" width="'+bwidth+'" height="'+bheight+'" border="0" alt="Share Button"/>';
 
 
 
 
 
372
  break;
373
  case 'share_toolbar':
374
  if ( share_image == 'hide' ) {
@@ -376,10 +391,10 @@ switch ( button_type ) {
376
  share_image_lang = '';
377
  }
378
  if ( share_image == 'custom') {
379
- code += '<img src="' + share_image_custom_url + '" border="0" style="padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
380
  }
381
  else {
382
- code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang+toolbar_share+'.png" border="0" style="padding-top:5px; float:left;" alt="Share Button"/>';
383
  }
384
  break;
385
  case 'counters':
@@ -389,10 +404,10 @@ switch ( button_type ) {
389
  share_image_lang = '';
390
  }
391
  if ( share_image == 'custom') {
392
- code += '<img src="' + share_image_custom_url + '" border="0" style="padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
393
  }
394
  else {
395
- code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang + share_url + '.png" border="0" style="padding-top:2px; float:left;" alt="Share Button"/>';
396
  }
397
 
398
  break;
@@ -403,18 +418,40 @@ switch ( button_type ) {
403
  if (hupso_twitter_via != '') {
404
  hupso_services += 'var hupso_twitter_via = "'+hupso_twitter_via+'";';
405
  }
406
- hupso_services += 'var hupso_counters_lang = "'+hupso_counters_lang+'";';
407
 
408
- code += hupso_services;
 
 
409
 
410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  // save button code
412
  $("input[name=code]").val(code);
413
 
414
  code += '</script>';
415
  code += '<script type="text/javascript" src="http://'+cdn+'.hupso.com/share/js/'+dir+hupso_js+'"></script>';
416
- code += "<!-- Hupso Share Buttons -->";
417
-
418
 
419
  // remove float code
420
  for (var i = 0; i < 10; i++ ) {
30
  var share_image_lang = '';
31
  var hupso_twitter_via = '';
32
  var hupso_counters_lang = 'en_US';
33
+ var hupso_image_folder_url = '';
34
+ var hupso_image_folder_local = '';
35
+ var hupso_custom_icons = 'no';
36
 
37
  dir = "";
38
  cdn = "static";
99
 
100
  share_image = $("input:radio[name=hupso_share_image]:checked").val();
101
  share_image_custom_url = $.trim($("input:text[name=hupso_share_image_custom_url]").val());
102
+ hupso_button_image_custom_url = $.trim($("input:text[name=hupso_button_image_custom_url]").val());
103
  hupso_twitter_via = $.trim($("input:text[name=hupso_twitter_via]").val());
104
+ hupso_image_folder_url = $.trim($("input:text[name=hupso_image_folder_url]").val());
105
+ hupso_image_folder_local = $.trim($("input:hidden[name=hupso_image_folder_local]").val());
106
+ hupso_custom_icons = $("input:radio[name=hupso_custom_icons]:checked").val();
107
 
108
  var lang_code = $("#share_image_lang option:selected").val();
109
  if ( lang_code != 'en' ) {
136
  icon_type = $("input:radio[name=menu_type]:checked").val();
137
 
138
  bsize = $("input:radio[name=size]:checked").val();
139
+ if (bsize != 'custom') {
140
+ var values = bsize.split('x');
141
+ bheight = values[1];
142
+ var values2 = values[0].split('n');
143
+ bwidth = values2[1];
144
+ }
145
 
146
  hupso_url = $.trim($("input:text[name=page_url]").val());
147
  hupso_title = $.trim($("input:text[name=page_title]").val());
224
  if ( $( "input:checkbox[name=facebook]:checked" ).val() == 1 )
225
  hupso_services += '"Facebook",';
226
  if ( $( "input:checkbox[name=googleplus]:checked" ).val() == 1 )
227
+
228
  hupso_services += '"Google Plus",';
229
  if ( $( "input:checkbox[name=pinterest]:checked" ).val() == 1 )
230
  hupso_services += '"Pinterest",';
376
  var code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ -->';
377
  code += '<a class="'+hupso_class+'" href="http://www.hupso.com/share/">'; // float: class="hupso_float"
378
 
379
+ switch ( button_type ) {
380
  case 'share_button':
381
+ if (bsize != 'custom') {
382
+ code += '<img src="http://static.hupso.com/share/buttons/'+bsize+'.png" style="border:0px; width:'+bwidth+'; height: '+bheight+'; " alt="Share Button" />';
383
+ }
384
+ else {
385
+ code += '<img src="'+hupso_button_image_custom_url+'" style="border:0px" alt="Share" />';
386
+ }
387
  break;
388
  case 'share_toolbar':
389
  if ( share_image == 'hide' ) {
391
  share_image_lang = '';
392
  }
393
  if ( share_image == 'custom') {
394
+ code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
395
  }
396
  else {
397
+ code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang+toolbar_share+'.png" style="border:0px; padding-top:5px; float:left;" alt="Share Button"/>';
398
  }
399
  break;
400
  case 'counters':
404
  share_image_lang = '';
405
  }
406
  if ( share_image == 'custom') {
407
+ code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
408
  }
409
  else {
410
+ code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang + share_url + '.png" style="border:0px; padding-top:2px; float:left;" alt="Share Button"/>';
411
  }
412
 
413
  break;
418
  if (hupso_twitter_via != '') {
419
  hupso_services += 'var hupso_twitter_via = "'+hupso_twitter_via+'";';
420
  }
 
421
 
422
+ if (button_type == 'counters') {
423
+ hupso_services += 'var hupso_counters_lang = "'+hupso_counters_lang+'";';
424
+ }
425
 
426
 
427
+ var image_url = '';
428
+ switch (hupso_custom_icons) {
429
+ case 'no':
430
+ image_url = '';
431
+ hupso_services += 'var hupso_image_folder_url = "' + image_url + '";';
432
+ break;
433
+ case 'local':
434
+ image_url = hupso_image_folder_local;
435
+ hupso_services += 'var hupso_image_folder_url = "' + image_url + '";';
436
+ break;
437
+ case 'custom':
438
+ image_url = hupso_image_folder_url;
439
+ hupso_services += 'var hupso_image_folder_url = "' + image_url + '";';
440
+ break;
441
+ default:
442
+ image_url = '';
443
+ hupso_services += 'var hupso_image_folder_url = "' + image_url + '";';
444
+ }
445
+
446
+ code += hupso_services;
447
+
448
+
449
  // save button code
450
  $("input[name=code]").val(code);
451
 
452
  code += '</script>';
453
  code += '<script type="text/javascript" src="http://'+cdn+'.hupso.com/share/js/'+dir+hupso_js+'"></script>';
454
+ code += "<!-- Hupso Share Buttons -->";
 
455
 
456
  // remove float code
457
  for (var i = 0; i < 10; i++ ) {
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Hupso Share Buttons for Twitter, Facebook & Google+ ===
2
  Contributors: kasal
3
  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.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,6 +14,8 @@ Help visitors share your posts on popular social networks: Twitter, Facebook, Go
14
 
15
  Add simple social share 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, Pinterest, StumbleUpon, Digg, Reddit, Bebo and Delicous.
16
 
 
 
17
  These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
18
 
19
  **Main features / advantages**
@@ -36,20 +38,20 @@ These services are used by millions of people every day, so sharing your content
36
  * Use of shortcodes inside template files
37
  * Display staring stats for whole website or for each page individually
38
  * Select image to use for Facebook sharing (Facebook thumbnail)
 
39
 
40
 
41
  Share Buttons are very easy to configure. Just select button type, size, position and which social networking services do you want to offer to your visitors.
42
- Buttons will appear below your articles or on top of them as you choose.
43
 
44
  **Shortcodes**
45
 
46
- * Use [hupso_hide] anywhere in post's text to hide buttons for specific post.
47
- * Use [hupso] anywhere in post's text to show buttons at custom position inside the post. Buttons will be shown exactly where this shortcode appears.
48
- * Shortcodes inside template files: Add this PHP code inside template files at position where you want to show share buttons:
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
 
@@ -65,12 +67,12 @@ You can configure share buttons in plugin settings.
65
 
66
  = How do I change settings? =
67
 
68
- From the Wordpress Administration go to "Plugins" and click on "Settings" under plugin name
69
 
70
  = How can I hide/show share buttons for specific posts? =
71
 
72
- You can hide share buttons for specific post using shortcode [hupso_hide]. Add [hupso_hide] anywhere in your post's text and buttons will be hidden.
73
- You can show share buttons for specific post at custom position using shortcode [hupso]. Add [hupso] in your post's text where you want the buttons to appear.
74
 
75
  = Which social networks are supported? =
76
 
@@ -84,41 +86,74 @@ Then drag Hupso Share Buttons Widget from left and drop it on the sidebar on the
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]');
108
  You can configure share buttons in plugin settings.
109
 
110
  = How can I hide share buttons inside template files? =
111
 
112
- Use this code: $HUPSO_SHOW = false; Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).
113
 
114
  = Can I use shortcodes inside widget text? =
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
 
@@ -166,7 +201,7 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
166
 
167
  == Screenshots ==
168
 
169
- 1. Share Toolbar and Counters on the same page (demo)
170
  2. Counters (Twitter Tweet, Facebook Like, Google +1, Linkedin Share)
171
  3. Share Toolbar (big)
172
  4. Share Buttons with drop down menu (icons and service names)
@@ -175,12 +210,17 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
175
  7. Share buttons under post, sidebar widget and text widget - English version (73 languages available)
176
  8. Share buttons under post, sidebar widget and text widget - Spanish version (73 languages available)
177
  9. Share buttons under post, sidebar widget and text widget - Chinese version (73 languages available)
 
178
 
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 =
@@ -196,7 +236,7 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
196
  * Pinterest support (Pin it button)
197
  * Option to display custom Share image from URL
198
  * Select image to use for Facebook sharing (Facebook thumbnail)
199
- * Share buttons can now be hidden inside template files (by setting $HUPSO_SHOW = false anywhere before div id="content")
200
 
201
  = 3.8 =
202
  * Option to show or hide share buttons for search pages
@@ -232,7 +272,7 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
232
 
233
  = 3.2 =
234
  * It is now possible to hide buttons for specific post using shortcode [hupso_hide]
235
- * It is now possible to show buttons for specific post at custom position using shortcode [hupso] (buttons will be displayed exactly where this shortcode appears)
236
  * Text for social networks is now pulled from post's title
237
  * Fixed a bug where share buttons did not load inside posts for some themes
238
 
1
  === Hupso Share Buttons for Twitter, Facebook & Google+ ===
2
  Contributors: kasal
3
  Donate link: http://www.hupso.com/
4
+ Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, sexybookmarks, addtoany
5
  Requires at least: 2.8
6
  Tested up to: 3.5.1
7
+ Stable tag: 3.9.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Add simple social share 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, Pinterest, StumbleUpon, Digg, Reddit, Bebo and Delicous.
16
 
17
+ Very simple setup: just install the plugin and social share icons will be added below your posts.
18
+
19
  These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
20
 
21
  **Main features / advantages**
38
  * Use of shortcodes inside template files
39
  * Display staring stats for whole website or for each page individually
40
  * Select image to use for Facebook sharing (Facebook thumbnail)
41
+ * You can use your own custom social icons for Twitter, Facebook and other social networks
42
 
43
 
44
  Share Buttons are very easy to configure. Just select button type, size, position and which social networking services do you want to offer to your visitors.
45
+ Buttons will appear below your articles or on top of them (or both) as you choose.
46
 
47
  **Shortcodes**
48
 
49
+ * Use `[hupso_hide]` anywhere in post's text to hide buttons for specific post.
50
+ * Use `[hupso]` anywhere in post's text to show buttons at custom position inside the post. Buttons will be shown exactly where this shortcode appears.
51
+ * Shortcodes inside template files: Add this PHP code inside template files at position where you want to show share buttons: `echo do_shortcode('[hupso]');`
 
52
  You can configure share buttons in plugin settings.
53
+ * Shortcodes inside widget text: Just include `[hupso]` anywhere in widget text area and share buttons will be displayed there.
54
+ * 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/"]`.
55
 
56
  [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/)
57
 
67
 
68
  = How do I change settings? =
69
 
70
+ From the Wordpress Administration click on "Settings" and then click on "Hupso Share Buttons".
71
 
72
  = How can I hide/show share buttons for specific posts? =
73
 
74
+ You can hide share buttons for specific post using shortcode `[hupso_hide]`. Add `[hupso_hide]` anywhere in your post's text and buttons will be hidden.
75
+ You can show share buttons for specific post at custom position using shortcode `[hupso]`. Add `[hupso]` in your post's text where you want the buttons to appear.
76
 
77
  = Which social networks are supported? =
78
 
86
  = How can I style "Share image" with CSS? =
87
 
88
  Add CSS to your style.css file.
89
+
90
+ For share buttons:
91
+ `.hupso_pop > img {
92
+ # add style rules here
93
+ }`
94
+
95
+ For share toolbar:
96
+ `.hupso_toolbar > img {
97
+ # add style rules here
98
+ }`
99
+
100
+ For counters:
101
+ `.hupso_counters > img {
102
+ # add style rules here
103
+ }`
104
 
105
  = How do I change the margin of share button, share toolbar or counters? =
106
 
107
  Add CSS to your style.css file:
108
+ `.hupso_c > div > div {
109
  margin-left: 0px !important;
110
+ }`
111
 
112
  = Facebook comment box is cut on the right. How do I fix it? =
113
 
114
  Add this CSS to your style.css file:
115
+ `iframe {
116
  max-width:none !important;
117
+ }`
118
+
119
+ = Share counters are not aligned properly. How can I fix this? =
120
+
121
+ Add proper CSS to your style.css file. Example:
122
+ `.hupso_twitter {
123
+ margin-left: 20px !important;
124
+ margin-right: 25px !important;
125
+ }
126
+ .hupso_facebook {
127
+ margin-top: -20px !important;
128
+ }
129
+ .hupso_google {
130
+ margin-bottom: 5px !important;
131
  }
132
+ .hupso_pinterest {
133
+ margin-right: 10px !important;
134
+ }`
135
 
136
  = How can I show share buttons inside template files? =
137
 
138
+ Add this PHP code inside template files at position where you want to show share buttons: `echo do_shortcode('[hupso]');`
139
  You can configure share buttons in plugin settings.
140
 
141
  = How can I hide share buttons inside template files? =
142
 
143
+ Use this code: `global $HUPSO_SHOW; $HUPSO_SHOW = false;` Make sure you do this before div `id="content"`. This will hide the buttons in content. Share buttons will still show in widget (if used).
144
 
145
  = Can I use shortcodes inside widget text? =
146
 
147
+ Yes, you can. Just include `[hupso]` anywhere in widget text area and share buttons will be displayed there.
148
 
149
  = Can I set title and url as shortcode parameters? =
150
 
151
+ 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.
152
+ 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/"]`.
153
+
154
+ = Can I use my own social icons for Twitter, Facebook and other social networks? =
155
+
156
+ Yes, you can. Enable this in Settings and follow instruction there.
157
 
158
  = How can I display share buttons only inside widget and not under posts? =
159
 
201
 
202
  == Screenshots ==
203
 
204
+ 1. Share Toolbar
205
  2. Counters (Twitter Tweet, Facebook Like, Google +1, Linkedin Share)
206
  3. Share Toolbar (big)
207
  4. Share Buttons with drop down menu (icons and service names)
210
  7. Share buttons under post, sidebar widget and text widget - English version (73 languages available)
211
  8. Share buttons under post, sidebar widget and text widget - Spanish version (73 languages available)
212
  9. Share buttons under post, sidebar widget and text widget - Chinese version (73 languages available)
213
+ 10. Select image dialog for sharing on Pinterest
214
 
215
 
216
  == Changelog ==
217
 
218
+ = 3.9.4 =
219
+ * option to use your own custom social icons
220
+ * share button is now available in 8 more colors
221
+
222
  = 3.9.3 =
223
+ * it is now possible to set title and url as shortcode parameters, e.g.: `[hupso title="My title" url="http://www.hupso.com/share/"]`
224
  * replaced border="0" with style="border:0px;" to help pass W3C validation
225
 
226
  = 3.9.2 =
236
  * Pinterest support (Pin it button)
237
  * Option to display custom Share image from URL
238
  * Select image to use for Facebook sharing (Facebook thumbnail)
239
+ * Share buttons can now be hidden inside template files (by setting `global $HUPSO_SHOW; $HUPSO_SHOW = false;` anywhere before div `id="content"`)
240
 
241
  = 3.8 =
242
  * Option to show or hide share buttons for search pages
272
 
273
  = 3.2 =
274
  * It is now possible to hide buttons for specific post using shortcode [hupso_hide]
275
+ * It is now possible to show buttons for specific post at custom position using shortcode` [hupso]` (buttons will be displayed exactly where this shortcode appears)
276
  * Text for social networks is now pulled from post's title
277
  * Fixed a bug where share buttons did not load inside posts for some themes
278
 
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.3
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -123,6 +123,8 @@ function hupso_plugin_uninstall() {
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() {
@@ -234,11 +236,12 @@ function hupso_admin_settings_show() {
234
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
235
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
236
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
237
- echo '<p>Use <b>$HUPSO_SHOW = false;</b> to hide share buttons inside template files. Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).</p>';
238
  echo '</div>';
239
 
240
  echo '<div id="feedback" style="background: #C7FFA3; padding: 10px 10px 10px 10px; margin-top:30px; ">';
241
  echo '<p><b>Bugs? Comments?</b></p>';
 
242
  echo '<p>We value your feedback. Please send comments, bug reports and suggestions, so we can make this plugin the best social sharing plugin for Wordpress.</p>';
243
  echo '<p><a href="http://www.hupso.com/share/feedback/" target="_blank">Use this suggestion form</a></p>';
244
  echo '</div>';
@@ -326,7 +329,7 @@ function hupso_admin_settings_show() {
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>
@@ -783,12 +786,39 @@ function hupso_admin_settings_show() {
783
  <?php
784
  /* page_url */
785
  $checked = ' checked="checked" ';
786
- $hupso_page_url = get_option( 'hupso_page_url', '');
787
  ?>
788
  <input type="text" name="page_url" value="<?php echo $hupso_page_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom url that will always be used for sharing. You can enter your root website here (e.g.: http://www.example.com or http://example.blogspot.com, so counters will show statistics for your whole website, not for each page individually.', 'share_buttons_hupso'); ?><br/><?php _e('Leave this blank to use url of current page for sharing. [Default]', 'share_buttons_hupso'); ?>
789
  </td>
790
  </tr>
791
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
792
  </table>
793
  <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'share_buttons_hupso'); ?>" />
794
  </form>
@@ -837,6 +867,16 @@ function hupso_admin_settings_save() {
837
  update_option( 'hupso_button_image_custom_url', $hupso_button_image_custom_url );
838
  }
839
 
 
 
 
 
 
 
 
 
 
 
840
  /* save toolbar size */
841
  if ( $post ) {
842
  $hupso_toolbar_size = @$_POST[ 'select_toolbar_size' ];
@@ -1189,10 +1229,6 @@ function hupso_the_content( $content ) {
1189
  $code = str_replace( 'float:left', 'float:right', $code );
1190
  }
1191
 
1192
-
1193
- /* hupso_counters_lang */
1194
- $code .= 'var hupso_counters_lang="' . $hupso_counters_lang . '";';
1195
-
1196
  /* Twitter via @ */
1197
  if ( $hupso_twitter_via != '') {
1198
  $code .= 'var hupso_twitter_via="' . $hupso_twitter_via . '";';
@@ -1268,7 +1304,7 @@ function hupso_the_content( $content ) {
1268
  break;
1269
  }
1270
  }
1271
-
1272
  $code .= '</script>';
1273
 
1274
  switch ( $button_type ) {
@@ -1285,6 +1321,8 @@ function hupso_the_content( $content ) {
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' );
1290
 
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.4
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
123
  delete_option( 'hupso_page_title' );
124
  delete_option( 'hupso_hide_categories' );
125
  delete_option( 'hupso_button_image_custom_url' );
126
+ delete_option( 'hupso_custom_icons' );
127
+ delete_option( 'hupso_image_folder_url' );
128
  }
129
 
130
  function hupso_plugin_activation() {
236
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
237
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
238
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
239
+ echo '<p>Use <b>global $HUPSO_SHOW; $HUPSO_SHOW = false;</b> to hide share buttons inside template files. Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).</p>';
240
  echo '</div>';
241
 
242
  echo '<div id="feedback" style="background: #C7FFA3; padding: 10px 10px 10px 10px; margin-top:30px; ">';
243
  echo '<p><b>Bugs? Comments?</b></p>';
244
+ echo '<p>Please read <a href="http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/faq/" target="_blank">Frequently Asked Questions</a>.</p>';
245
  echo '<p>We value your feedback. Please send comments, bug reports and suggestions, so we can make this plugin the best social sharing plugin for Wordpress.</p>';
246
  echo '<p><a href="http://www.hupso.com/share/feedback/" target="_blank">Use this suggestion form</a></p>';
247
  echo '</div>';
329
  <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>
330
  <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>
331
  <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>
332
+ <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:300px;" value="<?php echo $hupso_button_image_custom_url; ?>"/><br/> See <a href="http://www.hupso.com/share/gallery.php" target="_blank">gallery of custom share buttons</a>.</td></tr> </td></tr>
333
  </table>
334
  <hr style="height:1px; width:500px;"/>
335
  </td>
786
  <?php
787
  /* page_url */
788
  $checked = ' checked="checked" ';
789
+ $hupso_page_url = get_option( 'hupso_page_url', '');
790
  ?>
791
  <input type="text" name="page_url" value="<?php echo $hupso_page_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom url that will always be used for sharing. You can enter your root website here (e.g.: http://www.example.com or http://example.blogspot.com, so counters will show statistics for your whole website, not for each page individually.', 'share_buttons_hupso'); ?><br/><?php _e('Leave this blank to use url of current page for sharing. [Default]', 'share_buttons_hupso'); ?>
792
  </td>
793
  </tr>
794
 
795
+ <tr>
796
+ <td style="width:100px;"><?php _e('Use custom social share icons', 'share_buttons_hupso'); ?></div></td>
797
+ <td><hr style="height:1px; width:400px;" align="left"/>
798
+ <?php
799
+ /* image_folder_url */
800
+ $checked = ' checked="checked" ';
801
+ $hupso_custom_icons_no_checked = '';
802
+ $hupso_custom_icons_local_checked = '';
803
+ $hupso_custom_icons_custom_checked = '';
804
+ $hupso_custom_icons = get_option( 'hupso_custom_icons', 'no');
805
+ $hupso_image_folder_url = get_option( 'hupso_image_folder_url', '');
806
+ switch ( $hupso_custom_icons ) {
807
+ case 'no': $hupso_custom_icons_no_checked = $checked; break;
808
+ case 'local': $hupso_custom_icons_local_checked = $checked; break;
809
+ case 'custom': $hupso_custom_icons_custom_checked = $checked; break;
810
+ }
811
+ $image_url = plugins_url('/hupso-share-buttons-for-twitter-facebook-google/img/services/');
812
+ ?>
813
+ <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="no" <?php echo $hupso_custom_icons_no_checked; ?>/> <?php _e('No. [Default. Do not change this unless you know what you are doing.]', 'share_buttons_hupso'); ?><br/>
814
+ <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="local" <?php echo $hupso_custom_icons_local_checked; ?>/> <?php _e('Yes, serve images from local Wordpress folder. ', 'share_buttons_hupso'); ?>
815
+ [<?php echo $image_url;?>]<br/>
816
+ <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_custom_icons_custom_checked; ?>/> <?php _e('Yes, serve images from remote URL: ', 'share_buttons_hupso'); ?><br/>
817
+ <input type="text" name="hupso_image_folder_url" value="<?php echo $hupso_image_folder_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><input type="hidden" name="hupso_image_folder_local" value="<?php echo $image_url;?>" /><?php _e('Enter URL to folder with custom social images. Include "/" at the end of the URL. If you would like to use custom icons, make sure you <a href="http://www.hupso.com/share/custom-social-icons.php" target="_blank">read instructions</a>.', 'share_buttons_hupso'); ?><br/><?php _e('This setting has no effect when using Counters.', 'share_buttons_hupso'); ?>
818
+ </td>
819
+ </tr>
820
+ </div>
821
+
822
  </table>
823
  <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'share_buttons_hupso'); ?>" />
824
  </form>
867
  update_option( 'hupso_button_image_custom_url', $hupso_button_image_custom_url );
868
  }
869
 
870
+ /* save custom icons */
871
+ if ( $post ) {
872
+ $hupso_custom_icons = @$_POST[ 'hupso_custom_icons' ];
873
+ update_option( 'hupso_custom_icons', $hupso_custom_icons );
874
+
875
+
876
+ $hupso_image_folder_url = @$_POST[ 'hupso_image_folder_url' ];
877
+ update_option( 'hupso_image_folder_url ', $hupso_image_folder_url );
878
+ }
879
+
880
  /* save toolbar size */
881
  if ( $post ) {
882
  $hupso_toolbar_size = @$_POST[ 'select_toolbar_size' ];
1229
  $code = str_replace( 'float:left', 'float:right', $code );
1230
  }
1231
 
 
 
 
 
1232
  /* Twitter via @ */
1233
  if ( $hupso_twitter_via != '') {
1234
  $code .= 'var hupso_twitter_via="' . $hupso_twitter_via . '";';
1304
  break;
1305
  }
1306
  }
1307
+
1308
  $code .= '</script>';
1309
 
1310
  switch ( $button_type ) {
1321
 
1322
  $static_server = 'http://static.hupso.com/share' . $hupso_dev . '/js/' . $js_file;
1323
  $code .= '<script type="text/javascript" src="' . $static_server . '"></script><!-- Hupso Share Buttons -->';
1324
+
1325
+
1326
 
1327
  $position = get_option( 'hupso_button_position', 'below' );
1328