WP Socializer - Version 2.2

Version Description

  • Conflict with the tinyMCE editor fixed.
  • A "WP Socializer" button is added to the visual editing and code editing toolbar for inserting social buttons into posts easily.
Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 WP Socializer
Version 2.2
Comparing to
See all releases

Code changes from version 2.1 to 2.2

Thumbs.db ADDED
Binary file
admin/images/Thumbs.db ADDED
Binary file
admin/tinymce/editor_plugin.js CHANGED
@@ -1,49 +1,49 @@
1
  /*
2
  * WP Socializer shortcode inserting javascript in TinyMCE editor
3
  * http://www.aakashweb.com
4
- * v1.0
5
  * Added since WP Socializer v2.0
6
  */
7
- String.prototype.trim = function() {
8
- return this.replace(/^\s+|\s+$/g,"");
9
- }
10
-
11
- function wpsr_insert_shortcode(type, edparam){
12
-
13
- var choice = prompt('Choose your button: \n\n1.Social buttons \n2.Addthis \n3.Sharethis \n4.Retweet \n5.Google Buzz \n6.Google +1 \n7.Digg \n8.Facebook \n9.StumbleUpon \n10.Reddit \n\neg: 4', '');
14
  var btncode;
15
 
16
- switch(choice.trim()){
17
- case '1':
18
- btncode = "socialbts";
19
- case '2':
20
- btncode = "addthis"; break;
21
- case '3':
22
- btncode = "sharethis"; break;
23
- case '4':
24
- btncode = "retweet"; break;
25
- case '5':
26
- btncode = "buzz"; break;
27
- case '6':
28
- btncode = "plusone"; break;
29
- case '7':
30
- btncode = "digg"; break;
31
- case '8':
32
- btncode = "facebook"; break;
33
- case '9':
34
- btncode = "stumbleupon"; break;
35
- case '10':
36
- btncode = "reddit"; break;
37
- default:
38
- return '';
39
- }
40
-
41
- var shortcode = "[wpsr_" + btncode + "]";
42
-
43
- if(type == 'visual'){
44
- edparam.execCommand('mceInsertContent', false, shortcode);
 
 
 
 
 
45
  }else{
46
- edInsertContent(edCanvas, shortcode);
47
  }
48
  }
49
 
@@ -53,7 +53,7 @@ function wpsr_insert_shortcode(type, edparam){
53
 
54
  init : function(ed, url) {
55
  ed.addButton('wpsrbutton', {
56
- title : wpsr_sc_button.title,
57
  image : url + '/icon.png',
58
  onclick : function() {
59
  wpsr_insert_shortcode('visual', ed);
@@ -67,7 +67,7 @@ function wpsr_insert_shortcode(type, edparam){
67
  author : 'Aakash Chakravarthy',
68
  authorurl : 'http://www.aakashweb.com/',
69
  infourl : 'http://www.aakashweb.com/',
70
- version : '1.0'
71
  };
72
  }
73
 
@@ -80,16 +80,15 @@ function wpsr_insert_shortcode(type, edparam){
80
 
81
  if(document.getElementById("ed_toolbar")){
82
  qt_toolbar = document.getElementById("ed_toolbar");
83
- edButtons[edButtons.length] = new edButton("ed_wpsrbutton", wpsr_sc_button.value, "", "","");
84
  var qt_button = qt_toolbar.lastChild;
85
  while (qt_button.nodeType != 1){
86
  qt_button = qt_button.previousSibling;
87
  }
88
  qt_button = qt_button.cloneNode(true);
89
- qt_button.value = wpsr_sc_button.value;
90
- qt_button.title = wpsr_sc_button.title;
91
  qt_button.onclick = function(){ wpsr_insert_shortcode('code', ''); };
92
  qt_button.id = "ed_wpsrbutton";
93
  qt_toolbar.appendChild(qt_button);
94
- }
95
-
1
  /*
2
  * WP Socializer shortcode inserting javascript in TinyMCE editor
3
  * http://www.aakashweb.com
4
+ * v1.1
5
  * Added since WP Socializer v2.0
6
  */
7
+ function wpsr_insert_shortcode(type, edparam) {
8
+ var choice = prompt('Select the button to insert: \n\n1.Social buttons \n2.Addthis \n3.Sharethis \n4.Retweet \n5.Google Buzz \n6.Google +1 \n7.Digg \n8.Facebook \n9.StumbleUpon \n10.Reddit \n\nExample: 4 \n\n Please refer "http://bit.ly/wpsrParams" for parameters.', '');
 
 
 
 
 
9
  var btncode;
10
 
11
+ if (choice !== null) {
12
+ switch (jQuery.trim(choice)) {
13
+ case '1':
14
+ btncode = "socialbts"; break;
15
+ case '2':
16
+ btncode = "addthis"; break;
17
+ case '3':
18
+ btncode = "sharethis"; break;
19
+ case '4':
20
+ btncode = "retweet"; break;
21
+ case '5':
22
+ btncode = "buzz"; break;
23
+ case '6':
24
+ btncode = "plusone"; break;
25
+ case '7':
26
+ btncode = "digg"; break;
27
+ case '8':
28
+ btncode = "facebook"; break;
29
+ case '9':
30
+ btncode = "stumbleupon"; break;
31
+ case '10':
32
+ btncode = "reddit"; break;
33
+ default:
34
+ return '';
35
+ }
36
+
37
+ var shortcode = "[wpsr_" + btncode + "]";
38
+
39
+ if (type === 'visual') {
40
+ edparam.execCommand('mceInsertContent', false, shortcode);
41
+ }else{
42
+ edInsertContent(edCanvas, shortcode);
43
+ }
44
+
45
  }else{
46
+ return '';
47
  }
48
  }
49
 
53
 
54
  init : function(ed, url) {
55
  ed.addButton('wpsrbutton', {
56
+ title : 'Insert WP Socializer buttons',
57
  image : url + '/icon.png',
58
  onclick : function() {
59
  wpsr_insert_shortcode('visual', ed);
67
  author : 'Aakash Chakravarthy',
68
  authorurl : 'http://www.aakashweb.com/',
69
  infourl : 'http://www.aakashweb.com/',
70
+ version : '1.1'
71
  };
72
  }
73
 
80
 
81
  if(document.getElementById("ed_toolbar")){
82
  qt_toolbar = document.getElementById("ed_toolbar");
83
+ edButtons[edButtons.length] = new edButton("ed_wpsrbutton", "WP Socializer", "", "","");
84
  var qt_button = qt_toolbar.lastChild;
85
  while (qt_button.nodeType != 1){
86
  qt_button = qt_button.previousSibling;
87
  }
88
  qt_button = qt_button.cloneNode(true);
89
+ qt_button.value = 'WP Socializer';
90
+ qt_button.title = 'Insert WP Socializer buttons';
91
  qt_button.onclick = function(){ wpsr_insert_shortcode('code', ''); };
92
  qt_button.id = "ed_wpsrbutton";
93
  qt_toolbar.appendChild(qt_button);
94
+ }
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: social, social bookmarking, bookmarks, bookmarking, bookmarks menu, share,
6
  Donate Link: http://bit.ly/wpsrDonate
7
  Requires at least: 2.6
8
  Tested up to: 3.3
9
- Stable tag: 2.1
10
 
11
  All in one plugin for inserting Social bookmarking buttons(105), Retweet, Google+1, Facebook, Digg, Addthis, Sharethis buttons in a WordPress site.
12
 
@@ -66,7 +66,7 @@ WP Socializer allows to insert 8 different types of social and sharing buttons.
66
  1. Use the corresponding button code in the placement template.
67
  1. That's all. Enjoy !
68
 
69
- * [Documentation](http://www.aakashweb.com/docs/wp-socializer-docs/)
70
 
71
  == Frequently Asked Questions ==
72
 
@@ -82,6 +82,10 @@ Frequently Asked Questions can be seen [here](http://www.aakashweb.com/faqs/word
82
 
83
  == Changelog ==
84
 
 
 
 
 
85
  = 2.1 =
86
  * Admin Blank page error fixed in Firefox 3.6.x
87
  * Encoded title fix for Sharethis buttons.
6
  Donate Link: http://bit.ly/wpsrDonate
7
  Requires at least: 2.6
8
  Tested up to: 3.3
9
+ Stable tag: 2.2
10
 
11
  All in one plugin for inserting Social bookmarking buttons(105), Retweet, Google+1, Facebook, Digg, Addthis, Sharethis buttons in a WordPress site.
12
 
66
  1. Use the corresponding button code in the placement template.
67
  1. That's all. Enjoy !
68
 
69
+ [Documentation](http://www.aakashweb.com/docs/wp-socializer-docs/)
70
 
71
  == Frequently Asked Questions ==
72
 
82
 
83
  == Changelog ==
84
 
85
+ = 2.2 =
86
+ * Conflict with the tinyMCE editor fixed.
87
+ * A "WP Socializer" button is added to the visual editing and code editing toolbar for inserting social buttons into posts easily.
88
+
89
  = 2.1 =
90
  * Admin Blank page error fixed in Firefox 3.6.x
91
  * Encoded title fix for Sharethis buttons.
wp-socializer.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Socializer
4
- Version: 2.1
5
  Plugin URI: http://www.aakashweb.com/
6
- Description: WP Socializer is an advanced and powerful plugin for adding bookmarking buttons like addthis, buzz, digg, retweet, facebook like/share for posts.
7
  Author: Aakash Chakravarthy
8
  Author URI: http://www.aakashweb.com/
9
  */
@@ -14,7 +14,7 @@ if(!defined('WP_CONTENT_URL')) {
14
  $wpsr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
15
  }
16
 
17
- define('WPSR_VERSION', '2.1');
18
  define('WPSR_AUTHOR', 'Aakash Chakravarthy');
19
  define('WPSR_URL', $wpsr_url);
20
  define('WPSR_PUBLIC_URL', WPSR_URL . 'public/');
@@ -1520,7 +1520,7 @@ if(!function_exists('aw_dashboard')){
1520
  $rss = array('url' => 'http://feeds2.feedburner.com/aakashweb', 'items' => '5','show_date' => 0, 'show_summary'=> 0);
1521
  $subscribe = "window.open('http://feedburner.google.com/fb/a/mailverify?uri=aakashweb', 'win','menubar=1,resizable=1,width=600,height=500'); return false;" ;
1522
  echo '<div class="rss-widget">';
1523
- echo '<p>'; wp_widget_rss_output($rss); echo '</p>';
1524
  echo '<p><a href="#" onclick="' . $subscribe . '">Subscribe to Updates</a> | <a href="http://twitter.com/vaakash" target="_blank">Follow on Twitter</a> | <a href="http://www.aakashweb.com/" target="_blank">Home Page</a></p>';
1525
  echo "</div>";
1526
  }
@@ -1594,19 +1594,4 @@ function wpsr_add_wpsrbutton_tinymce($plugin_array) {
1594
  // init process for button control
1595
  add_action('init', 'wpsr_add_wpsr_button');
1596
 
1597
- // TinyMCE button translation
1598
- function wpsr_wpsrbt_info(){
1599
- echo
1600
- '<script type="text/javascript">
1601
- /* <![CDATA[ */
1602
- var wpsr_sc_button = {
1603
- value : "' . __('WP Socializer', 'wpsr') . '",
1604
- title : "' . __('Insert WP Socializer buttons', 'wpsr') . '"
1605
- };
1606
- /* ]]> */
1607
- </script>' . "\n";
1608
- }
1609
-
1610
- add_action('edit_form_advanced', 'wpsr_wpsrbt_info');
1611
-
1612
  ?>
1
  <?php
2
  /*
3
  Plugin Name: WP Socializer
4
+ Version: 2.2
5
  Plugin URI: http://www.aakashweb.com/
6
+ Description: WP Socializer is an advanced and powerful plugin for adding bookmarking buttons like social buttons, addthis, digg, retweet, facebook like/share in posts and excerpts.
7
  Author: Aakash Chakravarthy
8
  Author URI: http://www.aakashweb.com/
9
  */
14
  $wpsr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
15
  }
16
 
17
+ define('WPSR_VERSION', '2.2');
18
  define('WPSR_AUTHOR', 'Aakash Chakravarthy');
19
  define('WPSR_URL', $wpsr_url);
20
  define('WPSR_PUBLIC_URL', WPSR_URL . 'public/');
1520
  $rss = array('url' => 'http://feeds2.feedburner.com/aakashweb', 'items' => '5','show_date' => 0, 'show_summary'=> 0);
1521
  $subscribe = "window.open('http://feedburner.google.com/fb/a/mailverify?uri=aakashweb', 'win','menubar=1,resizable=1,width=600,height=500'); return false;" ;
1522
  echo '<div class="rss-widget">';
1523
+ wp_widget_rss_output($rss);
1524
  echo '<p><a href="#" onclick="' . $subscribe . '">Subscribe to Updates</a> | <a href="http://twitter.com/vaakash" target="_blank">Follow on Twitter</a> | <a href="http://www.aakashweb.com/" target="_blank">Home Page</a></p>';
1525
  echo "</div>";
1526
  }
1594
  // init process for button control
1595
  add_action('init', 'wpsr_add_wpsr_button');
1596
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1597
  ?>