Sociable - Version 3.3.1

Version Description

  • Added new option to use pure text links, instead of image links.
  • Fixed small issue with using target=blank links and the new awe.sm options.
  • Allowed for usage without an awe.sm API key, as awe.sm falls back to "default" awe.sm shortlinks.
  • Code cleanup for more efficiency in the backend on saving options.
  • General code cleanup.
  • Moved to the new default Changelog markup.
Download this release

Release Info

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

Code changes from version 3.3 to 3.3.1

Files changed (6) hide show
  1. awesmate.php +6 -1
  2. readme.txt +217 -96
  3. screenshot-1.png +0 -0
  4. screenshot-2.png +0 -0
  5. screenshot-3.png +0 -0
  6. sociable.php +33 -51
awesmate.php CHANGED
@@ -7,6 +7,11 @@
7
  header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
8
 
9
  $awesmapikey = get_option('sociable_awesmapikey');
 
 
 
 
 
10
  $destination = str_replace('TARGET', 'AWESM_TARGET', urldecode( $_GET['d'] ) );
11
  $channel = urldecode( $_GET['c'] );
12
  $permalink = urldecode( $_GET['t'] );
@@ -26,7 +31,7 @@
26
  $parentargument = '';
27
  }
28
 
29
- $url = 'http://create.awe.sm/url/share?api_key='.$awesmapikey.'&version=1&share_type='.urlencode($channel).'&create_type=sociable-wordpress&target='.urlencode($permalink).'&destination='.urlencode($destination).$direct.$parentargument;
30
 
31
  $url = str_replace("+","%20",$url);
32
  header("Location: ".$url);
7
  header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
8
 
9
  $awesmapikey = get_option('sociable_awesmapikey');
10
+ if (!empty($awesmapikey)) {
11
+ $key = '&api_key=' . $awesmapikey;
12
+ } else {
13
+ $key = '';
14
+ }
15
  $destination = str_replace('TARGET', 'AWESM_TARGET', urldecode( $_GET['d'] ) );
16
  $channel = urldecode( $_GET['c'] );
17
  $permalink = urldecode( $_GET['t'] );
31
  $parentargument = '';
32
  }
33
 
34
+ $url = 'http://create.awe.sm/url/share?&version=1'.$key.'&share_type='.urlencode($channel).'&create_type=sociable-wordpress&target='.urlencode($permalink).'&destination='.urlencode($destination).$direct.$parentargument;
35
 
36
  $url = str_replace("+","%20",$url);
37
  header("Location: ".$url);
readme.txt CHANGED
@@ -4,12 +4,12 @@ Donate link: http://yoast.com/donate/
4
  Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
5
  Requires at least: 2.6
6
  Tested up to: 2.8
7
- Stable tag: 3.3
8
 
9
- Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites. WordPress 2.6 or above required!
10
 
11
  == Description ==
12
- Automatically add links to your favorite social bookmarking sites on your posts, pages and in your RSS feed. You can choose from 99 different social bookmarking sites! WordPress 2.6 or above is required, if you use an older version, please download [this version,](http://downloads.wordpress.org/plugin/sociable.3.0.6.zip), please keep in mind that version is not maintained.
13
 
14
  More info:
15
 
@@ -17,99 +17,220 @@ More info:
17
  * Check out the authors [WordPress Hosting](http://yoast.com/wordpress-hosting/) experience. Good hosting is hard to come by, but it doesn't have to be expensive, Joost tells you why!
18
  * Check out the other [Wordpress plugins](http://yoast.com/wordpress/) by the same author, and read his blog: [Yoast](http://yoast.com).
19
 
20
- **Changelog**
21
-
22
- * 3.3 Added awe.sm integration and some sites.
23
- * 3.2.3 Removed the last bit of non jQuery javascript, improved styling and visual feedback when selecting a site
24
- * 3.2.2 Moved style loading to admin_print_styles and scripts to admin_print_scripts
25
- * 3.2.1 Fixed a bug with printing styles in 2.8 beta
26
- * 3.2
27
- This is a MAJOR update to Sociable. It fixes a few bugs, cleans up (or out, actually) a lot of sites that have gone away, updates others to include the excerpt, adds a fantastic new printing and PDF button, an RSS button, and a bunch of new sites.
28
-
29
- Major Thanks to Jean-Paul of [iPhoneclub](http://www.iphoneclub.nl/) for all his work in looking up all the sites.
30
-
31
- The full list of changes:
32
- * Restored sociable-admin.js, as it got accidentally removed.
33
- * Added class="sociablefirst" to the first site in the list and class="sociablelast" to the last one
34
- * Added:
35
- * An RSS button, which links to your sites RSS feed
36
- * Printfriendly.com for both printing and creating a PDF, replacing the original "Print" function, which didn't work from RSS
37
- * Current
38
- * FriendFeed
39
- * MSN Reporter.nl
40
- * FS Daily
41
- * Hello TXT
42
- * Removed the following sites that were no longer working or active:
43
- * BlinkBits
44
- * Blogmemes.cn, .net, .jp
45
- * Blogsvine
46
- * Book.mark.hu
47
- * Bumpzee
48
- * Del.irio.us
49
- * Feed Me Links
50
- * Furl (replaced by Diigo)
51
- * GeenRedactie
52
- * Kick.ie
53
- * Leonaut
54
- * Magnolia
55
- * Plug IM
56
- * Pownce
57
- * Salesmarks
58
- * Scuttle
59
- * Shadows
60
- * Smarking
61
- * Spurl
62
- * Taggly
63
- * Tailrank
64
- * Tumblr (due to the change to a POST API, which we, unfortunately, can't support with Sociable)
65
- * Updated the following sites to include the excerpt when submitting:
66
- * Connotea
67
- * Delicious
68
- * Digg
69
- * Ekudos
70
- * Google Bookmarks
71
- * NuJij
72
- * Ping.fm
73
- * Otherwise updated:
74
- * Google Bookmarks (new icon)
75
- * Fleck (New URL)
76
- * Rec6 (new URL)
77
- * 3.1.1 Fixed bug with stylesheet introduced in 3.1
78
- * 3.1 Converted all images to PNG, cleaned up usage of javascript in the backend and switched to the jquery library that comes with WordPress, allowed for usage of an external image directory, removed pre 2.6 compatibility fixes.
79
- * 3.0.6 Fixed xhtml bug in Netvibes integration and added Bitacoras
80
- * 3.0.5 Added Identi.ca and fixed a bug in Yoast Posts widget
81
- * 3.0.4 Added Netvibes
82
- * 3.0.3 Security enhancements, thx to Mark Jaquith
83
- * 3.0.2 Fixed CSS bug introduced in 3.0
84
- * 3.0.1 Removed some other, now obsolete, code, reducing the code size by another 4KB.
85
- * 3.0 Fixed IE bug in admin. Cleaned up Admin Area and changed support messages. Removed directory checking for all images (speeds up incredibly). Made display: inline !important to prevent vertical icon display. Updated Wykop icon.
86
- * 2.9.15 Added a fallback for strip_shortcodes to maintain backwards compatibility with WordPress 2.3 and below.
87
- * 2.9.14 Make sure there are no tags or shortcodes in the excerpt, added ping.fm, removed indiagram (shut down).
88
- * 2.9.13 Changed Facebook link from sharer.php (meant for a popup window) to share.php (which has the actual menu on it etc.)
89
- * 2.9.12 Added Tip'd
90
- * 2.9.11 Added settings link and Ozh admin menu icon
91
- * 2.9.10 Fixes issue with excerpt not being urlencoded
92
- * 2.9.9 Fixes for the custom fields issue.
93
- * 2.9.8 Fixes for WP 2.7
94
- * 2.9.6 Added Symbaloo, Tumblr,
95
- * 2.9.5 Fixed Fark & Propeller links, added missing i18n strings, added Yahoo Buzz
96
- * 2.9.4 Removed PopCurrent and Rawsugar as they no longer exist, renamed BlueDot to Faves
97
- * 2.9.3 Added Leonaut, MySpace, fixed plugin description, added option to disable Sociable on a per post basis, added option to display sociable on tag pages, added extra security to config page, fixed print button, fixed Twitter functionality.
98
- * 2.9.2 Added Swedish and Chinese localisations, thx to [Mikael Jorhult](http://www.mishkin.se/) and [Hugo Chen](http://take-ez.com/)
99
- * 2.9.1 Fixed bug where jQuery UI would be loaded twice.
100
- * 2.9 Removed Tool-Man in favor of jQuery, thx to Martin Joosse.
101
- * 2.8.4 Bugfixes.
102
- * 2.8.3 Added wikio.it, upnews.it, muti.co.za, makes LinkedIn work even better, and makes opening in a new window optional
103
- * 2.8.2 Now adds icons to feeds with excerpts too, added LinkedIn
104
- * 2.8.1 Fixed some small issues and made sure tagline shows up again
105
- * 2.8 Added option to show bookmark icons in feed, added Ratimarks, fixed xhtml compliance, fixed blue dot bug
106
- * 2.6.9 Fixed WP 2.6 compatibility
107
- * 2.6.8 Updated documentation
108
- * 2.6.7 Renamed Sk*rt to Kirtsy, Added designfloat, fixed description
109
- * 2.5.4 Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option
110
- * 2.5.3 Added Global Grind, Salesmarks, Webnews.de, Xerpi, Yigg
111
- * 2.5.2 Added NuJIJ, eKudos, Sk-rt, Socialogs and MisterWong.de
112
- * 2.5.1 Swapped Netscape for Propeller
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  Special thanks to [Robert Harm](http://www.die-truppe.com/) for coming up with loads of nice ideas.
115
 
4
  Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
5
  Requires at least: 2.6
6
  Tested up to: 2.8
7
+ Stable tag: 3.3.1
8
 
9
+ Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
10
 
11
  == Description ==
12
+ Automatically add links to your favorite social bookmarking sites on your posts, pages and in your RSS feed. You can choose from 99 different social bookmarking sites! WordPress 2.6 or above is required, if you use an older version, please download [this version](http://downloads.wordpress.org/plugin/sociable.3.0.6.zip), please keep in mind that version is not maintained.
13
 
14
  More info:
15
 
17
  * Check out the authors [WordPress Hosting](http://yoast.com/wordpress-hosting/) experience. Good hosting is hard to come by, but it doesn't have to be expensive, Joost tells you why!
18
  * Check out the other [Wordpress plugins](http://yoast.com/wordpress/) by the same author, and read his blog: [Yoast](http://yoast.com).
19
 
20
+ == Screenshots ==
21
+
22
+ 1. The Sociable backend, easily select sites and drag & drop to change the order of appearance.
23
+ 2. Sociable with its default styling.
24
+ 3. Sociable in use on [Yoast.com](http://yoast.com/), with the custom image options and its own styling.
25
+
26
+ == Changelog ==
27
+
28
+ = 3.3.1 =
29
+ * Added new option to use pure text links, instead of image links.
30
+ * Fixed small issue with using target=blank links and the new awe.sm options.
31
+ * Allowed for usage without an awe.sm API key, as awe.sm falls back to "default" awe.sm shortlinks.
32
+ * Code cleanup for more efficiency in the backend on saving options.
33
+ * General code cleanup.
34
+ * Moved to the new default Changelog markup.
35
+
36
+ = 3.3 =
37
+ * Added awe.sm integration and some sites.
38
+
39
+ = 3.2.3 =
40
+ * Removed the last bit of non jQuery javascript.
41
+ * Improved styling and visual feedback when selecting a site.
42
+
43
+ = 3.2.2 =
44
+ * Moved style loading to admin_print_styles and scripts to admin_print_scripts.
45
+
46
+ = 3.2.1 =
47
+ * Fixed a bug with printing styles in 2.8 beta.
48
+
49
+ = 3.2 =
50
+ This is a MAJOR update to Sociable. Major Thanks to Jean-Paul of [iPhoneclub](http://www.iphoneclub.nl/) for all his work in looking up all the sites. The full list of changes:
51
+
52
+ * Restored sociable-admin.js, as it got accidentally removed.
53
+ * Added `class="sociablefirst"` to the first site in the list and `class="sociablelast"` to the last one.
54
+ * Added:
55
+ * An RSS button, which links to your sites RSS feed
56
+ * Printfriendly.com for both printing and creating a PDF, replacing the original "Print" function, which didn't work from RSS
57
+ * Current
58
+ * FriendFeed
59
+ * MSN Reporter.nl
60
+ * FS Daily
61
+ * Hello TXT
62
+ * Removed the following sites that were no longer working or active:
63
+ * BlinkBits
64
+ * Blogmemes.cn, .net, .jp
65
+ * Blogsvine
66
+ * Book.mark.hu
67
+ * Bumpzee
68
+ * Del.irio.us
69
+ * Feed Me Links
70
+ * Furl (replaced by Diigo)
71
+ * GeenRedactie
72
+ * Kick.ie
73
+ * Leonaut
74
+ * Magnolia
75
+ * Plug IM
76
+ * Pownce
77
+ * Salesmarks
78
+ * Scuttle
79
+ * Shadows
80
+ * Smarking
81
+ * Spurl
82
+ * Taggly
83
+ * Tailrank
84
+ * Tumblr (due to the change to a POST API, which we, unfortunately, can't support with Sociable)
85
+ * Updated the following sites to include the excerpt when submitting:
86
+ * Connotea
87
+ * Delicious
88
+ * Digg
89
+ * Ekudos
90
+ * Google Bookmarks
91
+ * NuJij
92
+ * Ping.fm
93
+ * Otherwise updated:
94
+ * Google Bookmarks (new icon)
95
+ * Fleck (New URL)
96
+ * Rec6 (new URL)
97
+
98
+ = 3.1.1 =
99
+ * Fixed bug with stylesheet introduced in 3.1.
100
+
101
+ = 3.1 =
102
+ * Converted all images to PNG.
103
+ * Cleaned up usage of javascript in the backend and switched to the jquery library that comes with WordPress.
104
+ * Allowed for usage of an external image directory.
105
+ * Removed pre 2.6 compatibility fixes.
106
+
107
+ = 3.0.6 =
108
+ * Fixed xhtml bug in Netvibes integration.
109
+ * Added Bitacoras.
110
+
111
+ = 3.0.5 =
112
+ * Added Identi.ca.
113
+ * Fixed a bug in Yoast Posts widget.
114
+
115
+ = 3.0.4 =
116
+ * Added Netvibes.
117
+
118
+ = 3.0.3 =
119
+ * Security enhancements, thx to Mark Jaquith.
120
+
121
+ = 3.0.2 =
122
+ * Fixed CSS bug introduced in 3.0.
123
+
124
+ = 3.0.1 =
125
+ * Removed some other, now obsolete, code, reducing the code size by another 4KB.
126
+
127
+ = 3.0 =
128
+ * Fixed IE bug in admin.
129
+ * Cleaned up Admin Area and changed support messages.
130
+ * Removed directory checking for all images (speeds up incredibly).
131
+ * Made display: inline !important to prevent vertical icon display.
132
+ * Updated Wykop icon.
133
+
134
+ = 2.9.15 =
135
+ * Added a fallback for strip_shortcodes to maintain backwards compatibility with WordPress 2.3 and below.
136
+
137
+ = 2.9.14 =
138
+ * Made sure there are no tags or shortcodes in the excerpt.
139
+ * Added ping.fm.
140
+ * Removed indiagram (shut down).
141
+
142
+ = 2.9.13 =
143
+ * Changed Facebook link from sharer.php (meant for a popup window) to share.php (which has the actual menu on it etc.).
144
+
145
+ = 2.9.12 =
146
+ * Added Tip'd.
147
+
148
+ = 2.9.11 =
149
+ * Added settings link and Ozh admin menu icon.
150
+
151
+ = 2.9.10 =
152
+ * Fixes issue with excerpt not being urlencoded.
153
+
154
+ = 2.9.9 =
155
+ * Fixes for custom fields issues.
156
+
157
+ = 2.9.8 =
158
+ * Fixes for WP 2.7.
159
+
160
+ = 2.9.6 =
161
+ * Added Symbaloo and Tumblr.
162
+
163
+ = 2.9.5 =
164
+ * Fixed Fark & Propeller links.
165
+ * Added missing i18n strings.
166
+ * Added Yahoo Buzz.
167
+
168
+ = 2.9.4 =
169
+ * Removed PopCurrent and Rawsugar as they no longer exist.
170
+ * Renamed BlueDot to Faves.
171
+
172
+ = 2.9.3 =
173
+ * Added Leonaut & MySpace.
174
+ * Fixed plugin description.
175
+ * Added option to disable Sociable on a per post basis.
176
+ * Added option to display sociable on tag pages.
177
+ * Added extra security to config page.
178
+ * Fixed print button.
179
+ * Fixed Twitter functionality.
180
+
181
+ = 2.9.2 =
182
+ * Added Swedish and Chinese localisations, thx to [Mikael Jorhult](http://www.mishkin.se/) and [Hugo Chen](http://take-ez.com/).
183
+
184
+ = 2.9.1 =
185
+ * Fixed bug where jQuery UI would be loaded twice.
186
+
187
+ = 2.9 =
188
+ * Removed Tool-Man in favor of jQuery, thx to Martin Joosse.
189
+
190
+ = 2.8.4 =
191
+ * General bugfixes.
192
+
193
+ = 2.8.3 =
194
+ * Added wikio.it, upnews.it, muti.co.za.
195
+ * Made LinkedIn work even better.
196
+ * Made opening in a new window optional.
197
+
198
+ = 2.8.2 =
199
+ * Now adds icons to feeds with excerpts too.
200
+ * Added LinkedIn.
201
+
202
+ = 2.8.1 =
203
+ * Fixed some small issues.
204
+ * Made sure tagline shows up again.
205
+
206
+ = 2.8 =
207
+ * Added option to show bookmark icons in feed.
208
+ * Added Ratimarks.
209
+ * Fixed xhtml compliance.
210
+ * Fixed blue dot bug.
211
+
212
+ = 2.6.9 =
213
+ * Fixed WP 2.6 compatibility.
214
+
215
+ = 2.6.8 =
216
+ * Updated inline documentation.
217
+
218
+ = 2.6.7 =
219
+ * Renamed Sk*rt to Kirtsy.
220
+ * Added designfloat.
221
+ * Fixed description.
222
+
223
+ = 2.5.4 =
224
+ * Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option.
225
+
226
+ = 2.5.3 =
227
+ * Added Global Grind, Salesmarks, Webnews.de, Xerpi, Yigg.
228
+
229
+ = 2.5.2 =
230
+ * Added NuJIJ, eKudos, Sk-rt, Socialogs and MisterWong.de.
231
+
232
+ = 2.5.1 =
233
+ * Swapped Netscape for Propeller.
234
 
235
  Special thanks to [Robert Harm](http://www.die-truppe.com/) for coming up with loads of nice ideas.
236
 
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
sociable.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
- // return;
3
  /*
4
  Plugin Name: Sociable
5
  Plugin URI: http://yoast.com/wordpress/sociable/
6
  Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites. Go to <a href="options-general.php?page=Sociable">Settings -> Sociable</a> for setup. This is based on the original <a href="http://yoast.com/wordpress/sociable">Sociable plugin</a> by Joost de Valk and has only been modified to support using awe.sm for links.
7
- Version: 3.3
8
  Author: Joost de Valk
9
  Author URI: http://yoast.com/
10
 
@@ -532,8 +531,6 @@ function sociable_html($display=array()) {
532
  else
533
  $imagepath = get_option('sociable_imagedir');
534
 
535
- $awesmapikey = get_option('sociable_awesmapikey');
536
-
537
  // if no sites are specified, display all active
538
  // have to check $active_sites has content because WP
539
  // won't save an empty array as an option
@@ -553,11 +550,8 @@ function sociable_html($display=array()) {
553
  $excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250));
554
  }
555
  $excerpt = str_replace('+','%20',$excerpt);
556
-
557
  $permalink = urlencode(get_permalink($post->ID));
558
-
559
- $title = urlencode($post->post_title);
560
- $title = str_replace('+','%20',$title);
561
 
562
  $rss = urlencode(get_bloginfo('ref_url'));
563
 
@@ -629,17 +623,20 @@ function sociable_html($display=array()) {
629
  $link = '<li>';
630
  }
631
  $link .= "<a rel=\"nofollow\"";
632
- if (get_option('sociable_usetargetblank') && empty($site['awesm_channel'])) {
633
  $link .= " target=\"_blank\"";
634
  }
635
  $link .= " href=\"$url\" title=\"$description\">";
636
- $link .= "<img src=\"".$imagepath.$site['favicon']."\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
637
- if (isset($site['class']) && $site['class'])
638
- $link .= " sociable_{$site['class']}";
639
- $link .= "\" />";
 
 
 
 
640
  $link .= "</a></li>";
641
 
642
- // $html .= "\t".$link."\n";
643
  $html .= "\t".apply_filters('sociable_link',$link)."\n";
644
  $i++;
645
  }
@@ -813,25 +810,20 @@ function sociable_submenu() {
813
  delete_option('sociable_active_sites', $active_sites);
814
  add_option('sociable_active_sites', $active_sites);
815
 
816
- if (isset($_POST['usetargetblank']) && $_POST['usetargetblank']) {
817
- update_option('sociable_usetargetblank',true);
818
- } else {
819
- update_option('sociable_usetargetblank',false);
 
820
  }
821
 
822
- // Added Start
823
- // update awe.sm settings
824
- if (isset($_POST['awesmenable']) && $_POST['awesmenable']) {
825
- update_option('sociable_awesmenable',true);
826
- } else {
827
- update_option('sociable_awesmenable',false);
828
  }
829
 
830
- if (!$_REQUEST['awesmapikey'])
831
- $_REQUEST['awesmapikey'] = "";
832
- update_option('sociable_awesmapikey', $_REQUEST['awesmapikey']);
833
- // Added End
834
-
835
  // update conditional displays
836
  $conditionals = Array();
837
  if (!$_POST['conditionals'])
@@ -846,19 +838,6 @@ function sociable_submenu() {
846
 
847
  update_option('sociable_conditionals', $conditionals);
848
 
849
- // update tagline
850
- if (!$_REQUEST['tagline'])
851
- $_REQUEST['tagline'] = "";
852
- update_option('sociable_tagline', $_REQUEST['tagline']);
853
-
854
- update_option('sociable_imagedir', $_REQUEST['imagedir']);
855
-
856
- if (!$_REQUEST['usecss'])
857
- $usecss = false;
858
- else
859
- $usecss = true;
860
- update_option('sociable_usecss', $usecss);
861
-
862
  sociable_message(__("Saved changes.", 'sociable'));
863
  }
864
 
@@ -872,13 +851,8 @@ function sociable_submenu() {
872
  uksort($disabled, "strnatcasecmp");
873
 
874
  // load options from db to display
875
- $tagline = stripslashes(get_option('sociable_tagline'));
876
- $imagedir = stripslashes(get_option('sociable_imagedir'));
877
  $conditionals = get_option('sociable_conditionals');
878
  $updated = get_option('sociable_updated');
879
- $usetargetblank = get_option('sociable_usetargetblank');
880
- $awesmapikey = get_option('sociable_awesmapikey'); // Added
881
- $awesmenable = get_option('sociable_awesmenable'); // Added
882
 
883
  // display options
884
  ?>
@@ -923,7 +897,7 @@ function sociable_submenu() {
923
  </th>
924
  <td>
925
  <?php _e("Change the text displayed in front of the icons below. For complete customization, copy the contents of <em>sociable.css</em> in the Sociable plugin directory to your theme's <em>style.css</em> and disable the use of the sociable stylesheet below.", 'sociable'); ?><br/>
926
- <input size="80" type="text" name="tagline" value="<?php echo attribute_escape($tagline); ?>" />
927
  </td>
928
  </tr>
929
  <tr>
@@ -952,13 +926,21 @@ function sociable_submenu() {
952
  <input type="checkbox" name="usecss" <?php echo (get_option('sociable_usecss')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use the sociable stylesheet?", "sociable"); ?>
953
  </td>
954
  </tr>
 
 
 
 
 
 
 
 
955
  <tr>
956
  <th scope="row" valign="top">
957
  <?php _e("Image directory", "sociable"); ?>
958
  </th>
959
  <td>
960
  <?php _e("Sociable comes with a nice set of images, if you want to replace those with your own, enter the URL where you've put them in here, and make sure they have the same name as the ones that come with Sociable.", 'sociable'); ?><br/>
961
- <input size="80" type="text" name="imagedir" value="<?php echo attribute_escape($imagedir); ?>" />
962
  </td>
963
  </tr>
964
  <tr>
@@ -975,8 +957,8 @@ function sociable_submenu() {
975
  </th>
976
  <td>
977
  <?php _e("You can choose to automatically have the links posted to certain sites shortened via awe.sm and encoded with the channel info and your API Key.", 'sociable'); ?><br/>
978
- <input type="checkbox" name="awesmenable" <?php echo (get_option('sociable_awesmenable')) ? ' checked="checked"' : ''; ?> /> <?php _e("Enable awe.sm URLs? (When this is enabled, <strong>all sites</strong> to which awe.sm URLs are posted will open in a new window)", "sociable"); ?><br/>
979
- <?php _e("awe.sm API Key:", 'sociable'); ?> <input size="65" type="text" name="awesmapikey" value="<?php echo $awesmapikey; ?>" />
980
  </td>
981
  </tr>
982
  <tr>
1
  <?php
 
2
  /*
3
  Plugin Name: Sociable
4
  Plugin URI: http://yoast.com/wordpress/sociable/
5
  Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites. Go to <a href="options-general.php?page=Sociable">Settings -> Sociable</a> for setup. This is based on the original <a href="http://yoast.com/wordpress/sociable">Sociable plugin</a> by Joost de Valk and has only been modified to support using awe.sm for links.
6
+ Version: 3.3.1
7
  Author: Joost de Valk
8
  Author URI: http://yoast.com/
9
 
531
  else
532
  $imagepath = get_option('sociable_imagedir');
533
 
 
 
534
  // if no sites are specified, display all active
535
  // have to check $active_sites has content because WP
536
  // won't save an empty array as an option
550
  $excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250));
551
  }
552
  $excerpt = str_replace('+','%20',$excerpt);
 
553
  $permalink = urlencode(get_permalink($post->ID));
554
+ $title = str_replace('+','%20',urlencode($post->post_title));
 
 
555
 
556
  $rss = urlencode(get_bloginfo('ref_url'));
557
 
623
  $link = '<li>';
624
  }
625
  $link .= "<a rel=\"nofollow\"";
626
+ if (get_option('sociable_usetargetblank')) {
627
  $link .= " target=\"_blank\"";
628
  }
629
  $link .= " href=\"$url\" title=\"$description\">";
630
+ if (get_option('sociable_usetextlinks')) {
631
+ $link .= $description;
632
+ } else {
633
+ $link .= "<img src=\"".$imagepath.$site['favicon']."\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
634
+ if (isset($site['class']) && $site['class'])
635
+ $link .= " sociable_{$site['class']}";
636
+ $link .= "\" />";
637
+ }
638
  $link .= "</a></li>";
639
 
 
640
  $html .= "\t".apply_filters('sociable_link',$link)."\n";
641
  $i++;
642
  }
810
  delete_option('sociable_active_sites', $active_sites);
811
  add_option('sociable_active_sites', $active_sites);
812
 
813
+ foreach ( array('usetargetblank', 'awesmenable', 'usecss', 'usetextlinks') as $val ) {
814
+ if ( isset($_POST[$val]) && $_POST[$val] )
815
+ update_option('sociable_'.$val,true);
816
+ else
817
+ update_option('sociable_'.$val,false);
818
  }
819
 
820
+ foreach ( array('awesmapikey', 'tagline', 'imagedir') as $val ) {
821
+ if ( !$_POST[$val] )
822
+ update_option( 'sociable_'.$val, '');
823
+ else
824
+ update_option( 'sociable_'.$val, $_POST[$val] );
 
825
  }
826
 
 
 
 
 
 
827
  // update conditional displays
828
  $conditionals = Array();
829
  if (!$_POST['conditionals'])
838
 
839
  update_option('sociable_conditionals', $conditionals);
840
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
  sociable_message(__("Saved changes.", 'sociable'));
842
  }
843
 
851
  uksort($disabled, "strnatcasecmp");
852
 
853
  // load options from db to display
 
 
854
  $conditionals = get_option('sociable_conditionals');
855
  $updated = get_option('sociable_updated');
 
 
 
856
 
857
  // display options
858
  ?>
897
  </th>
898
  <td>
899
  <?php _e("Change the text displayed in front of the icons below. For complete customization, copy the contents of <em>sociable.css</em> in the Sociable plugin directory to your theme's <em>style.css</em> and disable the use of the sociable stylesheet below.", 'sociable'); ?><br/>
900
+ <input size="80" type="text" name="tagline" value="<?php echo attribute_escape(stripslashes(get_option('sociable_tagline'))); ?>" />
901
  </td>
902
  </tr>
903
  <tr>
926
  <input type="checkbox" name="usecss" <?php echo (get_option('sociable_usecss')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use the sociable stylesheet?", "sociable"); ?>
927
  </td>
928
  </tr>
929
+ <tr>
930
+ <th scope="row" valign="top">
931
+ <?php _e("Use Text Links:", "sociable"); ?>
932
+ </th>
933
+ <td>
934
+ <input type="checkbox" name="usetextlinks" <?php echo (get_option('sociable_usetextlinks')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use text links without images?", "sociable"); ?>
935
+ </td>
936
+ </tr>
937
  <tr>
938
  <th scope="row" valign="top">
939
  <?php _e("Image directory", "sociable"); ?>
940
  </th>
941
  <td>
942
  <?php _e("Sociable comes with a nice set of images, if you want to replace those with your own, enter the URL where you've put them in here, and make sure they have the same name as the ones that come with Sociable.", 'sociable'); ?><br/>
943
+ <input size="80" type="text" name="imagedir" value="<?php echo attribute_escape(stripslashes(get_option('sociable_imagedir'))); ?>" />
944
  </td>
945
  </tr>
946
  <tr>
957
  </th>
958
  <td>
959
  <?php _e("You can choose to automatically have the links posted to certain sites shortened via awe.sm and encoded with the channel info and your API Key.", 'sociable'); ?><br/>
960
+ <input type="checkbox" name="awesmenable" <?php echo (get_option('sociable_awesmenable')) ? ' checked="checked"' : ''; ?> /> <?php _e("Enable awe.sm URLs?", "sociable"); ?><br/>
961
+ <?php _e("awe.sm API Key:", 'sociable'); ?> <input size="65" type="text" name="awesmapikey" value="<?php echo get_option('sociable_awesmapikey'); ?>" />
962
  </td>
963
  </tr>
964
  <tr>