This is a known issue with certain versions of Windows servers (which we don’t support) — which I’m guessing is why you’re seeing it.
Yeah I read a bit about that, but since I’m on bluehost which uses Linux and Apache (near bottom of page), that’s probably not the issue. I used to have an SSL setup with them so maybe there is some strange artifact getting picked up. It is not a problem for me anymore since I modified that bit of code.
@ronstrilaeff – would be so kind as to help a php nob? Where in the below code does your fix (('on' == strtolower($_SERVER['HTTPS'])) belong?
// Return Current URL
function _trackableshare_buildurl() {
return 'http'.($_SERVER['HTTPS']?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
// Return Button Paths
function _trackableshare_setpaths($file,$admin=false) {
if($file == 'custom') {
$path = WP_CONTENT_DIR.'/uploads/trackableshare/';
$url = ($_SERVER['HTTPS']?str_replace('http://','https://',WP_CONTENT_URL):WP_CONTENT_URL).'/uploads/trackableshare/';
} else {
$path = ($admin?'../':'').TRACKABLESHARE_PLUGINS.'/'.TRACKABLESHARE_DIRNAME.'/buttons/'.$file.'/';
$url = ($_SERVER['HTTPS']?str_replace('http://','https://',WP_PLUGIN_URL):WP_PLUGIN_URL).'/'.TRACKABLESHARE_DIRNAME.'/buttons/'.$file.'/';
}
return array($path,$url);
}
Thank you!
Hi dpaule..
See the lines below //ronedit
Hope this helps.
// Return Current URL
function _trackableshare_buildurl() {
//ronedit replaced by line below return 'http'.($_SERVER['HTTPS']?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
//ronedit this plugin always thinks that my site is https even when it is not
return 'http'.(('on' == strtolower($_SERVER['HTTPS']))?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
// Return Button Paths
function _trackableshare_setpaths($file,$admin=false) {
if($file == 'custom') {
$path = WP_CONTENT_DIR.'/uploads/trackableshare/';
//ronedit replaced by line below $url = ($_SERVER['HTTPS']?str_replace('http://','https://',WP_CONTENT_URL):WP_CONTENT_URL).'/uploads/trackableshare/';
$url = (('on' == strtolower($_SERVER['HTTPS']))?str_replace('http://','https://',WP_CONTENT_URL):WP_CONTENT_URL).'/uploads/trackableshare/';
} else {
$path = ($admin?'../':'').TRACKABLESHARE_PLUGINS.'/'.TRACKABLESHARE_DIRNAME.'/buttons/'.$file.'/';
//ronedit replaced by line below $url = ($_SERVER['HTTPS']?str_replace('http://','https://',WP_PLUGIN_URL):WP_PLUGIN_URL).'/'.TRACKABLESHARE_DIRNAME.'/buttons/'.$file.'/';
$url = (('on' == strtolower($_SERVER['HTTPS']))?str_replace('http://','https://',WP_PLUGIN_URL):WP_PLUGIN_URL).'/'.TRACKABLESHARE_DIRNAME.'/buttons/'.$file.'/';
}
return array($path,$url);
}
oh, and btw .. the correct spelling is “nub” and I are one 🙂
Yea! It works beautifully. Thank you for sharing your fix. Nub, yes. Shows what a nub I really am.