Suppress page element on ssl encrypted page
Hey there,
I have a small flash animation run on the pages header. It pulls the images from my gallery located on a different domain.
When I access encrypted pages (during checkout for example), this mini slideshow triggers the page to be partially encrypted. Not a biggy, but it is not nice for customers, as they may be turned off by this.
Is there a way of just not loading this mini slideshow (which I coded into the tpl_header file)? Maybe with some kind of php magic?
Any help would be appreciated!
www.chocolateriewanders.com/shop
thanks :)
Re: Suppress page element on ssl encrypted page
Code:
<?php // If page is SSL then use Secure Code
if($_SERVER['HTTPS']=='on'){
?>
YOUR_CODE_HERE
<?php // Else use Non-Secure Code
} else {
?>
YOUR_CODE_HERE
<?php }
Re: Suppress page element on ssl encrypted page
Louis,
Thank you for your reply. Unfortunately that didn't work. My code was:
Code:
<?php // If page is SSL then use Secure Code
if($_SERVER['HTTPS']=='on'){
?>
<br />
<?php // Else use Non-Secure Code
} else {
?>
<div style="float:right;"><embed src="http://www.****.us/gallery2/minislideshow.swf" width="120" height="80" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="minislide" wmode="transparent" allowFullscreen="true" allowScriptAccess="always" quality="high" flashvars="xmlUrl=http://www.****.us/gallery2/mediaRss.php?g2_itemId=4953&shuffle=true&showDropShadow=true&roundedMask=true&limit=40&noLink=true&showControls=false"></embed>
</div>
<?php }
inside header_tpl ..... but it generated an empty page, after the mainwrapper, nothing loaded (either in http or https)
:dontgetit
Re: Suppress page element on ssl encrypted page
This is working for me.
Code:
<?php // If page is SSL then use Secure Code
if($_SERVER['HTTPS']=='on'){
?>
<?php // Else use Non-Secure Code
} else {
?>
<div style="float:right;"><embed src="http://www.wanders.us/gallery2/minislideshow.swf" width="120" height="80" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="minislide" wmode="transparent" allowFullscreen="true" allowScriptAccess="always" quality="high" flashvars="xmlUrl=http://www.wanders.us/gallery2/mediaRss.php?g2_itemId=4953&shuffle=true&showDropShadow=true&roundedMask=true&limit=40&noLink=true&showControls=false"></embed>
</div>
<?php }
?>
Re: Suppress page element on ssl encrypted page
I think the person who responded forgot the final "?>"
Code:
<?php // If page is SSL then use Secure Code
if($_SERVER['HTTPS']=='on'){
?>
<br />
<?php // Else use Non-Secure Code
} else {
?>
<div style="float:right;"><embed src="http://www.****.us/gallery2/minislideshow.swf" width="120" height="80" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="minislide" wmode="transparent" allowFullscreen="true" allowScriptAccess="always" quality="high" flashvars="xmlUrl=http://www.****.us/gallery2/mediaRss.php?g2_itemId=4953&shuffle=true&showDropShadow=true&roundedMask=true&limit=40&noLink=true&showControls=false"></embed>
</div>
<?php } ?>
Try that, but remember to fix the domain if you copy/paste
Re: Suppress page element on ssl encrypted page
Louis & dbeeken,
Thank you both very much, this is working like a charm!
Indeed, I did not have the "?>" in the first code snippet :oops:
Thanks again - now all parts of the page are encrypted :)
Re: Suppress page element on ssl encrypted page
Glad to hear it is working.