Social Sharing Toolkit - Version 2.0.3

Version Description

Some bug fixes.

Download this release

Release Info

Developer MarijnRongen
Plugin Icon wp plugin Social Sharing Toolkit
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

Files changed (2) hide show
  1. readme.txt +9 -1
  2. social_sharing_toolkit.php +30 -64
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVN
4
  Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon
5
  Requires at least: 3.0
6
  Tested up to: 3.2.1
7
- Stable tag: 2.0.2
8
  License: GPLv2 or later
9
 
10
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
@@ -131,6 +131,10 @@ Upload the Social Sharing Toolkit plugin to the `/wp-content/plugins/` folder on
131
 
132
  == Upgrade Notice ==
133
 
 
 
 
 
134
  = 2.0.2 =
135
 
136
  Please update to version 2.0.2 for several small bug fixes and enhancements.
@@ -160,6 +164,10 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
160
 
161
  == Changelog ==
162
 
 
 
 
 
163
  = 2.0.2 =
164
  * Fixed width issue with Facebook Like button
165
  * HTML encoding will be decoded in titles for the sharing buttons
4
  Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon
5
  Requires at least: 3.0
6
  Tested up to: 3.2.1
7
+ Stable tag: 2.0.3
8
  License: GPLv2 or later
9
 
10
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
131
 
132
  == Upgrade Notice ==
133
 
134
+ = 2.0.3 =
135
+
136
+ Some bug fixes.
137
+
138
  = 2.0.2 =
139
 
140
  Please update to version 2.0.2 for several small bug fixes and enhancements.
164
 
165
  == Changelog ==
166
 
167
+ = 2.0.3 =
168
+ * Fixed line break issue on some themes affecting horizontal button orientation
169
+ * Fixed security prompt on IE9 (thanks to Joey for debugging this)
170
+
171
  = 2.0.2 =
172
  * Fixed width issue with Facebook Like button
173
  * HTML encoding will be decoded in titles for the sharing buttons
social_sharing_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
- Version: 2.0.2
7
  Author: Marijn Rongen
8
  Author URI: http://www.marijnrongen.com
9
  */
@@ -451,7 +451,7 @@ class MR_Social_Sharing_Toolkit {
451
  $url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
452
  }
453
  $bookmarks = '
454
- <!-- Social Sharing Toolkit v2.0.2 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
455
  <div class="mr_social_sharing_wrapper">';
456
  foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
457
  if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
@@ -466,7 +466,7 @@ class MR_Social_Sharing_Toolkit {
466
 
467
  function create_followers() {
468
  $followers = '
469
- <!-- Social Sharing Toolkit v2.0.2 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
470
  <div class="mr_social_sharing_wrapper">';
471
  foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
472
  if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
@@ -481,23 +481,18 @@ class MR_Social_Sharing_Toolkit {
481
 
482
  function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '') {
483
  $button = 'get_'.$button;
484
- $retval = '
485
- <'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($url, $title, $type, $id).'
486
- </'.$display.'>';
487
  return $retval;
488
  }
489
 
490
  function get_follow_button($button, $type, $display = 'span', $align = '', $id = '') {
491
  $button = 'get_'.$button;
492
- $retval = '
493
- <'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($type, $id).'
494
- </'.$display.'>';
495
  return $retval;
496
  }
497
 
498
  function get_fb_like($url, $title, $type, $id) {
499
- $retval = '
500
- <iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&amp;href='.urlencode($url).'&amp;layout=';
501
  switch ($type) {
502
  case 'horizontal':
503
  $retval .= 'button_count';
@@ -520,25 +515,21 @@ class MR_Social_Sharing_Toolkit {
520
  }
521
 
522
  function get_fb_send($url, $title, $type, $id) {
523
- $retval = '
524
- <div id="fb-root"></div>
525
- <fb:send href="'.$url.'" font=""></fb:send>';
526
  return $retval;
527
  }
528
 
529
  function get_tw_tweet($url, $title, $type, $id) {
530
  switch ($type) {
531
  case 'horizontal':
532
- $retval = '
533
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="'.$url.'" data-count="horizontal"';
534
  if ($id != '') {
535
  $retval .= ' data-via="'.$id.'"';
536
  }
537
  $retval .= ' data-text="'.$title.'">Tweet</a>';
538
  break;
539
  case 'vertical':
540
- $retval = '
541
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="'.$url.'" data-count="vertical"';
542
  if ($id != '') {
543
  $retval .= ' data-via="'.$id.'"';
544
  }
@@ -559,8 +550,7 @@ class MR_Social_Sharing_Toolkit {
559
  }
560
 
561
  function get_gl_plus($url, $title, $type, $id) {
562
- $retval = '
563
- <g:plusone';
564
  switch ($type) {
565
  case 'horizontal':
566
  $retval .= ' size="medium"';
@@ -579,16 +569,13 @@ class MR_Social_Sharing_Toolkit {
579
  function get_li_share($url, $title, $type, $id) {
580
  switch ($type) {
581
  case 'horizontal':
582
- $retval = '
583
- <script type="IN/Share" data-url="'.$url.'" data-counter="right"></script>';
584
  break;
585
  case 'vertical':
586
- $retval = '
587
- <script type="IN/Share" data-url="'.$url.'" data-counter="top"></script>';
588
  break;
589
  case 'none':
590
- $retval = '
591
- <script type="IN/Share" data-url="'.$url.'"></script>';
592
  break;
593
  default:
594
  $url = 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.urlencode($url).'&amp;title='.urlencode($title);
@@ -612,12 +599,10 @@ class MR_Social_Sharing_Toolkit {
612
  function get_su_stumble($url, $title, $type, $id) {
613
  switch ($type) {
614
  case 'horizontal':
615
- $retval = '
616
- <script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r='.urlencode($url).'"></script>';
617
  break;
618
  case 'vertical':
619
- $retval = '
620
- <script src="http://www.stumbleupon.com/hostedbadge.php?s=5&amp;r='.urlencode($url).'"></script>';
621
  break;
622
  default:
623
  $url = 'http://www.stumbleupon.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
@@ -634,17 +619,11 @@ class MR_Social_Sharing_Toolkit {
634
  switch ($type) {
635
  case 'horizontal':
636
  $hash = md5($url);
637
- $retval = '
638
- <div class="delicious_horizontal">
639
- <span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a>
640
- </div>';
641
  break;
642
  case 'vertical':
643
  $hash = md5($url);
644
- $retval = '
645
- <div class="delicious_vertical">
646
- <span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a>
647
- </div>';
648
  break;
649
  default:
650
  $url = 'http://del.icio.us/post?url='.urlencode($url).'&amp;title='.urlencode($title);
@@ -660,12 +639,10 @@ class MR_Social_Sharing_Toolkit {
660
  function get_dg_digg($url, $title, $type, $id) {
661
  switch ($type) {
662
  case 'horizontal':
663
- $retval = '
664
- <a class="DiggThisButton DiggCompact" href="http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>';
665
  break;
666
  case 'vertical':
667
- $retval = '
668
- <a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>';
669
  break;
670
  default:
671
  $url = 'http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
@@ -681,20 +658,17 @@ class MR_Social_Sharing_Toolkit {
681
  function get_rd_reddit($url, $title, $type, $id) {
682
  switch ($type) {
683
  case 'horizontal':
684
- $retval = '
685
- <script type="text/javascript">
686
  reddit_url = "'.$url.'";
687
  reddit_title = "'.$title.'";
688
  </script>
689
  <script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>';
690
  break;
691
  case 'vertical':
692
- $retval = '
693
- <script type="text/javascript">
694
  reddit_url = "'.$url.'";
695
  reddit_title = "'.$title.'";
696
- </script>
697
- <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>';
698
  break;
699
  default:
700
  $url = 'http://www.reddit.com/submit?url='.urlencode($url);
@@ -716,8 +690,7 @@ class MR_Social_Sharing_Toolkit {
716
  }
717
 
718
  function get_hv_respect($url, $title, $type, $id) {
719
- $retval = '
720
- <iframe src="http://www.hyves.nl/respect/button?url='.urlencode($url).'&amp;title='.urlencode($title).'" style="border: medium none; overflow:hidden; width:150px; height:21px;" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>';
721
  return $retval;
722
  }
723
 
@@ -834,32 +807,25 @@ class MR_Social_Sharing_Toolkit {
834
  }
835
  switch ($type) {
836
  case 'none':
837
- $retval = '
838
- <a href="'.$url.'"><img src="'.plugins_url('/images/buttons/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
839
  break;
840
  case 'icon_small':
841
- $retval = '
842
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
843
  break;
844
  case 'icon_small_text':
845
- $retval = '
846
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_small_icon">'.$text.'</span></a>';
847
  break;
848
  case 'icon_medium':
849
- $retval = '
850
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
851
  break;
852
  case 'icon_medium_text':
853
- $retval = '
854
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_medium_icon">'.$text.'</span></a>';
855
  break;
856
  case 'icon_large':
857
- $retval = '
858
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_large/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
859
  break;
860
  default:
861
- $retval = '
862
- <a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
863
  break;
864
  }
865
  return $retval;
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
+ Version: 2.0.3
7
  Author: Marijn Rongen
8
  Author URI: http://www.marijnrongen.com
9
  */
451
  $url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
452
  }
453
  $bookmarks = '
454
+ <!-- Social Sharing Toolkit v2.0.3 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
455
  <div class="mr_social_sharing_wrapper">';
456
  foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
457
  if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
466
 
467
  function create_followers() {
468
  $followers = '
469
+ <!-- Social Sharing Toolkit v2.0.3 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
470
  <div class="mr_social_sharing_wrapper">';
471
  foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
472
  if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
481
 
482
  function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '') {
483
  $button = 'get_'.$button;
484
+ $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($url, $title, $type, $id).'</'.$display.'>';
 
 
485
  return $retval;
486
  }
487
 
488
  function get_follow_button($button, $type, $display = 'span', $align = '', $id = '') {
489
  $button = 'get_'.$button;
490
+ $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($type, $id).'</'.$display.'>';
 
 
491
  return $retval;
492
  }
493
 
494
  function get_fb_like($url, $title, $type, $id) {
495
+ $retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href='.urlencode($url).'&amp;layout=';
 
496
  switch ($type) {
497
  case 'horizontal':
498
  $retval .= 'button_count';
515
  }
516
 
517
  function get_fb_send($url, $title, $type, $id) {
518
+ $retval = '<div id="fb-root"></div><fb:send href="'.$url.'" font=""></fb:send>';
 
 
519
  return $retval;
520
  }
521
 
522
  function get_tw_tweet($url, $title, $type, $id) {
523
  switch ($type) {
524
  case 'horizontal':
525
+ $retval = '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.$url.'" data-count="horizontal"';
 
526
  if ($id != '') {
527
  $retval .= ' data-via="'.$id.'"';
528
  }
529
  $retval .= ' data-text="'.$title.'">Tweet</a>';
530
  break;
531
  case 'vertical':
532
+ $retval = '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.$url.'" data-count="vertical"';
 
533
  if ($id != '') {
534
  $retval .= ' data-via="'.$id.'"';
535
  }
550
  }
551
 
552
  function get_gl_plus($url, $title, $type, $id) {
553
+ $retval = '<g:plusone';
 
554
  switch ($type) {
555
  case 'horizontal':
556
  $retval .= ' size="medium"';
569
  function get_li_share($url, $title, $type, $id) {
570
  switch ($type) {
571
  case 'horizontal':
572
+ $retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="right"></script>';
 
573
  break;
574
  case 'vertical':
575
+ $retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="top"></script>';
 
576
  break;
577
  case 'none':
578
+ $retval = '<script type="IN/Share" data-url="'.$url.'"></script>';
 
579
  break;
580
  default:
581
  $url = 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.urlencode($url).'&amp;title='.urlencode($title);
599
  function get_su_stumble($url, $title, $type, $id) {
600
  switch ($type) {
601
  case 'horizontal':
602
+ $retval = '<script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r='.urlencode($url).'"></script>';
 
603
  break;
604
  case 'vertical':
605
+ $retval = '<script src="http://www.stumbleupon.com/hostedbadge.php?s=5&amp;r='.urlencode($url).'"></script>';
 
606
  break;
607
  default:
608
  $url = 'http://www.stumbleupon.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
619
  switch ($type) {
620
  case 'horizontal':
621
  $hash = md5($url);
622
+ $retval = '<div class="delicious_horizontal"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a></div>';
 
 
 
623
  break;
624
  case 'vertical':
625
  $hash = md5($url);
626
+ $retval = '<div class="delicious_vertical"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a></div>';
 
 
 
627
  break;
628
  default:
629
  $url = 'http://del.icio.us/post?url='.urlencode($url).'&amp;title='.urlencode($title);
639
  function get_dg_digg($url, $title, $type, $id) {
640
  switch ($type) {
641
  case 'horizontal':
642
+ $retval = '<a class="DiggThisButton DiggCompact" href="http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>';
 
643
  break;
644
  case 'vertical':
645
+ $retval = '<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>';
 
646
  break;
647
  default:
648
  $url = 'http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
658
  function get_rd_reddit($url, $title, $type, $id) {
659
  switch ($type) {
660
  case 'horizontal':
661
+ $retval = '<script type="text/javascript">
 
662
  reddit_url = "'.$url.'";
663
  reddit_title = "'.$title.'";
664
  </script>
665
  <script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>';
666
  break;
667
  case 'vertical':
668
+ $retval = '<script type="text/javascript">
 
669
  reddit_url = "'.$url.'";
670
  reddit_title = "'.$title.'";
671
+ </script><script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>';
 
672
  break;
673
  default:
674
  $url = 'http://www.reddit.com/submit?url='.urlencode($url);
690
  }
691
 
692
  function get_hv_respect($url, $title, $type, $id) {
693
+ $retval = '<iframe src="http://www.hyves.nl/respect/button?url='.urlencode($url).'&amp;title='.urlencode($title).'" style="border: medium none; overflow:hidden; width:150px; height:21px;" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>';
 
694
  return $retval;
695
  }
696
 
807
  }
808
  switch ($type) {
809
  case 'none':
810
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/buttons/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
 
811
  break;
812
  case 'icon_small':
813
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
 
814
  break;
815
  case 'icon_small_text':
816
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_small_icon">'.$text.'</span></a>';
 
817
  break;
818
  case 'icon_medium':
819
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
 
820
  break;
821
  case 'icon_medium_text':
822
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_medium_icon">'.$text.'</span></a>';
 
823
  break;
824
  case 'icon_large':
825
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_large/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
 
826
  break;
827
  default:
828
+ $retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
 
829
  break;
830
  }
831
  return $retval;