public
Created

  • Download Gist
0001-Mixed-content.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
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
0002-JavaScript-errors.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
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
0003-Use-Facebook-Like-iframe-instead-of-FBML.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
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) . '&amp;send=' . (($type == 'send') ? 'true' : 'false') . '&amp;layout=' . $style . '&amp;width=' . $width . '&amp;show_faces=' . $showfaces . '&amp;action=' . $verb . '&amp;colorscheme=' . $color . '&amp;font&amp;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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.