Sociable - Version 2.8

Version Description

Download this release

Release Info

Developer joostdevalk
Plugin Icon wp plugin Sociable
Version 2.8
Comparing to
See all releases

Code changes from version 2.6.9 to 2.8

Files changed (4) hide show
  1. images/ratimarks.png +0 -0
  2. readme.txt +3 -1
  3. sociable.css +1 -1
  4. sociable.php +29 -17
images/ratimarks.png ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://yoast.com/donate/
4
  Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
5
  Requires at least: 2.2
6
  Tested up to: 2.5.1
7
- stable tag: 2.6.9
8
 
9
  Automatically add links on your posts to popular social bookmarking sites.
10
 
@@ -19,6 +19,8 @@ More info:
19
 
20
  **Changelog**
21
 
 
 
22
  * 2.6.8 Updated documentation
23
  * 2.6.7 Renamed Sk*rt to Kirtsy, Added designfloat, fixed description
24
  * 2.5.4 Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option
4
  Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
5
  Requires at least: 2.2
6
  Tested up to: 2.5.1
7
+ stable tag: 2.8
8
 
9
  Automatically add links on your posts to popular social bookmarking sites.
10
 
19
 
20
  **Changelog**
21
 
22
+ * 2.8 Added option to show bookmark icons in feed, added Ratimarks, fixed xhtml compliance, fixed blue dot bug
23
+ * 2.6.9 Fixed WP 2.6 compatibility
24
  * 2.6.8 Updated documentation
25
  * 2.6.7 Renamed Sk*rt to Kirtsy, Added designfloat, fixed description
26
  * 2.5.4 Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option
sociable.css CHANGED
@@ -19,7 +19,7 @@ span.sociable_tagline:hover span {
19
  margin: 0 !important;
20
  padding: 0 !important;
21
  }
22
- .sociable li {
23
  background: none;
24
  display: inline;
25
  list-style-type: none;
19
  margin: 0 !important;
20
  padding: 0 !important;
21
  }
22
+ .sociable ul li {
23
  background: none;
24
  display: inline;
25
  list-style-type: none;
sociable.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Sociable
4
  Plugin URI: http://yoast.com/wordpress/sociable/
5
  Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
6
- Version: 2.6.9
7
  Author: Joost de Valk
8
  Author URI: http://yoast.com/
9
 
@@ -32,7 +32,7 @@ if ( !defined('WP_CONTENT_DIR') )
32
  define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
33
 
34
  // Guess the location
35
- $sociablepluginpath = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__)).'/';
36
 
37
  function sociable_init_locale(){
38
  load_plugin_textdomain('sociable', $sociablepluginpath);
@@ -103,7 +103,7 @@ $sociable_known_sites = Array(
103
 
104
  'Blue Dot' => Array(
105
  'favicon' => 'bluedot.png',
106
- 'url' => 'http://bluedot.us/Authoring.aspx?>u=PERMALINK&amp;title=TITLE',
107
  ),
108
 
109
  'Book.mark.hu' => Array(
@@ -361,6 +361,11 @@ $sociable_known_sites = Array(
361
  'url' => 'http://www.propeller.com/submit/?U=PERMALINK&amp;T=TITLE',
362
  ),
363
 
 
 
 
 
 
364
  'RawSugar' => Array(
365
  'favicon' => 'rawsugar.png',
366
  'url' => 'http://www.rawsugar.com/tagger/?turl=PERMALINK&amp;tttl=TITLE',
@@ -580,6 +585,7 @@ $sociable_files = Array(
580
  'images/ppnow.png',
581
  'images/print.gif',
582
  'images/propeller.gif',
 
583
  'images/rawsugar.png',
584
  'images/rec6.gif',
585
  'images/reddit.png',
@@ -617,12 +623,12 @@ $sociable_files = Array(
617
  );
618
 
619
  function sociable_html($display=Array()) {
620
- global $sociable_known_sites;
621
  $active_sites = get_option('sociable_active_sites');
622
 
623
  $html = "";
624
 
625
- $imagepath = get_bloginfo('wpurl') . '/wp-content/plugins/sociable/images/';
626
 
627
  // if no sites are specified, display all active
628
  // have to check $active_sites has content because WP
@@ -642,10 +648,10 @@ function sociable_html($display=Array()) {
642
  $title = str_replace('+','%20',$title);
643
  $rss = urlencode(get_bloginfo('ref_url'));
644
 
645
- $html .= "\n<div class=\"sociable\">\n<span class=\"sociable_tagline\">\n";
646
- $html .= stripslashes(get_option("sociable_tagline"));
647
- $html .= "\n\t<span>" . __("These icons link to social bookmarking sites where readers can share and discover new web pages.", 'sociable') . "</span>";
648
- $html .= "\n</span>\n<ul>\n";
649
 
650
  foreach($display as $sitename) {
651
  // if they specify an unknown or inactive site, ignore it
@@ -657,8 +663,8 @@ function sociable_html($display=Array()) {
657
  $url = $site['url'];
658
  $url = str_replace('PERMALINK', $permalink, $url);
659
  $url = str_replace('TITLE', $title, $url);
660
- $url = str_replace('RSS', $rss, $url);
661
- $url = str_replace('BLOGNAME', $blogname, $url);
662
 
663
  if (isset($site['description']) && $site['description'] != "") {
664
  $description = $site['description'];
@@ -666,10 +672,10 @@ function sociable_html($display=Array()) {
666
  $description = $sitename;
667
  }
668
  $link = "<li>";
669
- $link .= "<a rel=\"nofollow\" target=\"_blank\" href=\"$url\" title=\"$description\">";
670
  $link .= "<img src=\"$imagepath{$site['favicon']}\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
671
- if ($site['class'])
672
- $link .= " sociable_{$site['class']}";
673
  $link .= "\" />";
674
  $link .= "</a></li>";
675
 
@@ -694,10 +700,14 @@ if (is_array($sociable_contitionals) and in_array(true, $sociable_contitionals))
694
  (is_page() and $conditionals['is_page']) or
695
  (is_category() and $conditionals['is_category']) or
696
  (is_date() and $conditionals['is_date']) or
697
- (is_search() and $conditionals['is_search']) or
698
- 0)
699
  $content .= sociable_html();
700
-
 
 
 
 
 
701
  return $content;
702
  }
703
  }
@@ -759,6 +769,7 @@ function sociable_restore_config($force=False) {
759
  'is_category' => False,
760
  'is_date' => False,
761
  'is_search' => False,
 
762
  ));
763
 
764
  if ($force or !is_bool(get_option('usecss')))
@@ -969,6 +980,7 @@ function sociable_submenu() {
969
  <input type="checkbox" name="conditionals[is_category]"<?php echo ($conditionals['is_category']) ? ' checked="checked"' : ''; ?> /> <?php _e("Category archives", 'sociable'); ?><br/>
970
  <input type="checkbox" name="conditionals[is_date]"<?php echo ($conditionals['is_date']) ? ' checked="checked"' : ''; ?> /> <?php _e("Date-based archives", 'sociable'); ?><br/>
971
  <input type="checkbox" name="conditionals[is_search]"<?php echo ($conditionals['is_search']) ? ' checked="checked"' : ''; ?> /> <?php _e("Search results", 'sociable'); ?><br/>
 
972
  </td>
973
  </tr>
974
  <tr>
3
  Plugin Name: Sociable
4
  Plugin URI: http://yoast.com/wordpress/sociable/
5
  Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
6
+ Version: 2.8
7
  Author: Joost de Valk
8
  Author URI: http://yoast.com/
9
 
32
  define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
33
 
34
  // Guess the location
35
+ $sociablepluginpath = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/';
36
 
37
  function sociable_init_locale(){
38
  load_plugin_textdomain('sociable', $sociablepluginpath);
103
 
104
  'Blue Dot' => Array(
105
  'favicon' => 'bluedot.png',
106
+ 'url' => 'http://bluedot.us/Authoring.aspx?u=PERMALINK&amp;title=TITLE',
107
  ),
108
 
109
  'Book.mark.hu' => Array(
361
  'url' => 'http://www.propeller.com/submit/?U=PERMALINK&amp;T=TITLE',
362
  ),
363
 
364
+ 'Ratimarks' => Array(
365
+ 'favicon' => 'ratimarks.png',
366
+ 'url' => 'http://ratimarks.org/bookmarks.php/?action=add&address=PERMALINK&amp;title=TITLE',
367
+ ),
368
+
369
  'RawSugar' => Array(
370
  'favicon' => 'rawsugar.png',
371
  'url' => 'http://www.rawsugar.com/tagger/?turl=PERMALINK&amp;tttl=TITLE',
585
  'images/ppnow.png',
586
  'images/print.gif',
587
  'images/propeller.gif',
588
+ 'images/ratimarks.png',
589
  'images/rawsugar.png',
590
  'images/rec6.gif',
591
  'images/reddit.png',
623
  );
624
 
625
  function sociable_html($display=Array()) {
626
+ global $sociable_known_sites, $sociablepluginpath;
627
  $active_sites = get_option('sociable_active_sites');
628
 
629
  $html = "";
630
 
631
+ $imagepath = $sociablepluginpath.'images/';
632
 
633
  // if no sites are specified, display all active
634
  // have to check $active_sites has content because WP
648
  $title = str_replace('+','%20',$title);
649
  $rss = urlencode(get_bloginfo('ref_url'));
650
 
651
+ $html .= "\n<div class=\"sociable\">\n<div class=\"sociable_tagline\">\n";
652
+ // $html .= stripslashes(get_option("sociable_tagline"));
653
+ // $html .= "\n\t<span>" . __("These icons link to social bookmarking sites where readers can share and discover new web pages.", 'sociable') . "</span>";
654
+ $html .= "\n</div>\n<ul>\n";
655
 
656
  foreach($display as $sitename) {
657
  // if they specify an unknown or inactive site, ignore it
663
  $url = $site['url'];
664
  $url = str_replace('PERMALINK', $permalink, $url);
665
  $url = str_replace('TITLE', $title, $url);
666
+ // $url = str_replace('RSS', $rss, $url);
667
+ // $url = str_replace('BLOGNAME', $blogname, $url);
668
 
669
  if (isset($site['description']) && $site['description'] != "") {
670
  $description = $site['description'];
672
  $description = $sitename;
673
  }
674
  $link = "<li>";
675
+ $link .= "<a rel=\"nofollow\" href=\"$url\" title=\"$description\">";
676
  $link .= "<img src=\"$imagepath{$site['favicon']}\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
677
+ // if ($site['class'])
678
+ // $link .= " sociable_{$site['class']}";
679
  $link .= "\" />";
680
  $link .= "</a></li>";
681
 
700
  (is_page() and $conditionals['is_page']) or
701
  (is_category() and $conditionals['is_category']) or
702
  (is_date() and $conditionals['is_date']) or
703
+ (is_search() and $conditionals['is_search'])) {
 
704
  $content .= sociable_html();
705
+ } elseif ((is_feed() and $conditionals['is_rss'])) {
706
+ $sociable_html = sociable_html();
707
+ $sociable_html = strip_tags($sociable_html,"<a><img>");
708
+ $sociable_html = str_replace('<a rel="nofollow" title="Print this article!"><img src="http://www.css3.info/wp-content/plugins/sociable//images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>','',$sociable_html);
709
+ $content .= $sociable_html . "<br/>";
710
+ }
711
  return $content;
712
  }
713
  }
769
  'is_category' => False,
770
  'is_date' => False,
771
  'is_search' => False,
772
+ 'is_rss' => False,
773
  ));
774
 
775
  if ($force or !is_bool(get_option('usecss')))
980
  <input type="checkbox" name="conditionals[is_category]"<?php echo ($conditionals['is_category']) ? ' checked="checked"' : ''; ?> /> <?php _e("Category archives", 'sociable'); ?><br/>
981
  <input type="checkbox" name="conditionals[is_date]"<?php echo ($conditionals['is_date']) ? ' checked="checked"' : ''; ?> /> <?php _e("Date-based archives", 'sociable'); ?><br/>
982
  <input type="checkbox" name="conditionals[is_search]"<?php echo ($conditionals['is_search']) ? ' checked="checked"' : ''; ?> /> <?php _e("Search results", 'sociable'); ?><br/>
983
+ <input type="checkbox" name="conditionals[is_rss]"<?php echo ($conditionals['is_rss']) ? ' checked="checked"' : ''; ?> /> <?php _e("RSS feed items", 'sociable'); ?><br/>
984
  </td>
985
  </tr>
986
  <tr>