SNIPPET: DETECT HTTPS MODE IN SMARTY

Snippet: Detect HTTPS mode in Smarty 
Compatibility
All Versions
Rating
  • Currently 5.00/5

Rating: 5.0/5
(2 votes cast)

Login to Rate

If you get a security alert when in secure mode, it's usually due to offsite elements such as SSL certificate seals, images and javascript that are not secure, in which case you can fix with this code...

Examples...

{if $smarty.server.HTTPS eq "1"}Secure{else}Not secure{/if}
{if $smarty.server.HTTPS eq "1"}{$https_location}{else}{$http_location}{/if}
<img src="http{if $smarty.server.HTTPS eq '1'}s{/if}://www.geotrust.com/seal.gif" />


ID: 82 | CAT: 19
 
donpiotrJanuary 20, 2012 Reply

{if $smarty.server.HTTPS eq "on"}Secure{else}Not secure{/if}

Comment / Reply



Emails will not be published or shared. If you have a Gravatar account - the avatar image associated with your email address will appear. Please note, all comments are moderated, so be nice.



Like this comments mod? Get it here

There have been no reviews/comments yet

Please login to leave a comment/review
Name: *
Email: *
Telephone:  
Question(s): *
Code:  
Enter Code: *
    Submit
Your name
Your email
Recipient's email
  Send to friend
 X 

You added a product to the cart!

View cart

Checkout

Back to products

Close

PayPal Accepted