Created
March 29, 2013 15:42
-
-
Save mallorydxw/5271631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d0c750611b10a017ffd3df55bc8c4dcb73dc1f89 Mon Sep 17 00:00:00 2001 | |
From: Tom Adams <tom@dxw.com> | |
Date: Fri, 5 Oct 2012 10:45:24 -0400 | |
Subject: [PATCH 1/3] Mixed content | |
--- | |
wp-socializer.php | 10 +++++----- | |
1 file changed, 5 insertions(+), 5 deletions(-) | |
diff --git a/wp-socializer.php b/wp-socializer.php | |
index 72337d0..f631a53 100644 | |
--- a/wp-socializer.php | |
+++ b/wp-socializer.php | |
@@ -1470,13 +1470,13 @@ function wpsr_scripts_adder(){ | |
} | |
if(wpsr_button_used('retweet') == 1 && $wpsr_retweet_service == 'twitter'){ | |
- array_push($scripts, '"http://platform.twitter.com/widgets.js"'); | |
+ array_push($scripts, '"https://platform.twitter.com/widgets.js"'); | |
} | |
if(wpsr_button_used('facebook') == 1){ | |
$fbappid = $wpsr_facebook['appid']; | |
$fbparam = ($fbappid == '') ? '' : '&appId=' . $fbappid; | |
- array_push($scripts, '"http://connect.facebook.net/en_US/all.js#xfbml=1' . $fbparam . '"'); | |
+ array_push($scripts, '"https://connect.facebook.net/en_US/all.js#xfbml=1' . $fbparam . '"'); | |
} | |
if(wpsr_button_used('digg') == 1){ | |
@@ -1498,7 +1498,7 @@ function wpsr_scripts_adder(){ | |
} | |
if(wpsr_button_used('linkedin') == 1){ | |
- array_push($scripts, '"http://platform.linkedin.com/in.js"'); | |
+ array_push($scripts, '"https://platform.linkedin.com/in.js"'); | |
} | |
if(wpsr_button_used('stumbleupon') == 1){ | |
@@ -1506,7 +1506,7 @@ function wpsr_scripts_adder(){ | |
} | |
if(wpsr_button_used('pinterest') == 1){ | |
- array_push($scripts, '"http://assets.pinterest.com/js/pinit.js"'); | |
+ array_push($scripts, '"https://assets.pinterest.com/js/pinit.js"'); | |
} | |
$scriptsCount = count($scripts); | |
@@ -1615,4 +1615,4 @@ function wpsr_add_wpsrbutton_tinymce($plugin_array) { | |
// init process for button control | |
add_action('init', 'wpsr_add_wpsr_button'); | |
-?> | |
\ No newline at end of file | |
+?> | |
\ No newline at end of file | |
-- | |
1.8.2.rc2.4.g7799588 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 32a29030ba7b6e93876ce6b71fbeb381a14946ef Mon Sep 17 00:00:00 2001 | |
From: Tom Adams <tom@holizz.com> | |
Date: Wed, 8 Aug 2012 11:37:17 -0400 | |
Subject: [PATCH 2/3] JavaScript errors | |
--- | |
public/js/wp-socializer-floating-bar-js.js | 32 +++++++++++++++++------------- | |
1 file changed, 18 insertions(+), 14 deletions(-) | |
diff --git a/public/js/wp-socializer-floating-bar-js.js b/public/js/wp-socializer-floating-bar-js.js | |
index 6011809..65ddf19 100644 | |
--- a/public/js/wp-socializer-floating-bar-js.js | |
+++ b/public/js/wp-socializer-floating-bar-js.js | |
@@ -23,24 +23,28 @@ jQuery(document).ready(function(){ | |
anchorOffset = jQuery('.wpsr_floatbts_anchor').offset(); | |
barDistance = jQuery('.wpsr_floatbts_anchor').attr('data-offset'); | |
- $floatbar.css({ | |
- position: "absolute", | |
- top: anchorOffset.top + "px", | |
- left: (anchorOffset.left - $floatbar.outerWidth() - barDistance) | |
- }); | |
+ if (anchorOffset) { | |
+ $floatbar.css({ | |
+ position: "absolute", | |
+ top: anchorOffset.top + "px", | |
+ left: (anchorOffset.left - $floatbar.outerWidth() - barDistance) | |
+ }); | |
+ } | |
} | |
// On window scroll | |
if(jQuery(".wpsr-floatbar-movable").length > 0){ | |
jQuery(window).scroll(function(){ | |
- var b = jQuery(window).scrollTop(); | |
- var d = anchorOffset.top; | |
- var c = $floatbar; | |
- if(b>d-30){ | |
- c.css({position:"fixed", top: "30px"}); | |
- }else{ | |
- if(b<=d){ | |
- c.css({position:"absolute", top: anchorOffset.top + "px"}); | |
+ if (anchorOffset) { | |
+ var b = jQuery(window).scrollTop(); | |
+ var d = anchorOffset.top; | |
+ var c = $floatbar; | |
+ if(b>d-30){ | |
+ c.css({position:"fixed", top: "30px"}); | |
+ }else{ | |
+ if(b<=d){ | |
+ c.css({position:"absolute", top: anchorOffset.top + "px"}); | |
+ } | |
} | |
} | |
}); | |
@@ -89,4 +93,4 @@ jQuery(document).ready(function(){ | |
} | |
}); | |
-}); | |
\ No newline at end of file | |
+}); | |
-- | |
1.8.2.rc2.4.g7799588 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c27be73f19f1af37efe00b4bab84721774a920c5 Mon Sep 17 00:00:00 2001 | |
From: Tom Adams <tom@dxw.com> | |
Date: Thu, 15 Nov 2012 16:25:19 -0500 | |
Subject: [PATCH 3/3] Use Facebook Like iframe instead of FBML | |
Some IE7 users were being redirected to $url?fb_xd_fragment | |
--- | |
includes/wpsr-facebook.php | 2 +- | |
wp-socializer.php | 8 +------- | |
2 files changed, 2 insertions(+), 8 deletions(-) | |
diff --git a/includes/wpsr-facebook.php b/includes/wpsr-facebook.php | |
index 5937a2b..aec5c6a 100644 | |
--- a/includes/wpsr-facebook.php | |
+++ b/includes/wpsr-facebook.php | |
@@ -39,7 +39,7 @@ function wpsr_facebook($args = ''){ | |
case 'button': | |
$facebook_processed .= | |
- '<div class="fb-like" data-href="' . $url . '" data-send="' . (($type == 'send') ? 'true' : 'false') . '" data-layout="' . $style . '" data-width="' . $width . '" data-show-faces="' . $showfaces . '" data-action="' . $verb . '" data-font="' . $font . '" data-colorscheme="' . $color . '"></div>'; | |
+ '<iframe src="//www.facebook.com/plugins/like.php?href=' . urlencode($url) . '&send=' . (($type == 'send') ? 'true' : 'false') . '&layout=' . $style . '&width=' . $width . '&show_faces=' . $showfaces . '&action=' . $verb . '&colorscheme=' . $color . '&font&height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' . $width . 'px; height:90px;" allowTransparency="true"></iframe>'; | |
break; | |
diff --git a/wp-socializer.php b/wp-socializer.php | |
index f631a53..060c832 100644 | |
--- a/wp-socializer.php | |
+++ b/wp-socializer.php | |
@@ -1473,12 +1473,6 @@ function wpsr_scripts_adder(){ | |
array_push($scripts, '"https://platform.twitter.com/widgets.js"'); | |
} | |
- if(wpsr_button_used('facebook') == 1){ | |
- $fbappid = $wpsr_facebook['appid']; | |
- $fbparam = ($fbappid == '') ? '' : '&appId=' . $fbappid; | |
- array_push($scripts, '"https://connect.facebook.net/en_US/all.js#xfbml=1' . $fbparam . '"'); | |
- } | |
- | |
if(wpsr_button_used('digg') == 1){ | |
array_push($scripts, '"http://widgets.digg.com/buttons.js"'); | |
} | |
@@ -1615,4 +1609,4 @@ function wpsr_add_wpsrbutton_tinymce($plugin_array) { | |
// init process for button control | |
add_action('init', 'wpsr_add_wpsr_button'); | |
-?> | |
\ No newline at end of file | |
+?> | |
-- | |
1.8.2.rc2.4.g7799588 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment