Hide graphic if page is unsecure
I want to hide a Thawte SSL badge when looking at a HTTP page and show the badge when looking at HTTPS pages.
This would be something like: Code:
{if $secure} So far, I haven't found a Smarty tag to use as the trigger. Any help would be much appreciated! -Glen |
heres how i did it
Code:
{if $smarty.server.HTTPS eq "on"} |
Wow - that was a fast response! Works perfectly!
-Glen |
:wink:
|
Really excellent, Shan. Thanks. I used the following code:
Code:
{if $smarty.server.HTTPS eq "on"} A further question: Thawte will let me load a SecondTier Seal image on the other pages. (We could also have it hyperlinked to our "secure pages" but since they only happen when someone logs in, I don't think that is possible.) Is it possible to modify your code so that if it isn't https, it will load an image in the same spot? |
Quote:
just do this Code:
{if $smarty.server.HTTPS eq "on"} or just use Code:
{if $smarty.server.HTTPS ne "on"} |
We have the opposite problem. We want to run a small chunk of code only under HTTP. Could we change the "on" variable in the first line to "off" and that would resolve my problem?
What we're having problems with is HTML banners that are being called by a PHP script. In any HTTPS areas of the site we get that annoying pop-up. Quote:
|
yeh
|
Excellent. Thank you very much for the quick reply!
|
Re: Hide graphic if page is unsecure
Great tip, we use this to display invocation code from adsense on non secure pages (which obviously needs to be stopped on https delivery),and to display info about secure pages when secure.
Cheers |
All times are GMT -8. The time now is 04:34 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.