Jump to content

Show SSL Image for Secure Pages


clbryan26

Recommended Posts

This is my first contribution to the community. I hope you enjoy it.

 

Show your customers that you are committed to their security. Display a message and image in your footer telling them they are on a secure page.

 

You can see an example by going to my install and looking at my footer. I know the site may be a little messed up, I am working on the WHMCS integration with my site and its a work in progress.

 

http://mybill.mycommon.net/index.php

 

When you hover over the image and text it allows you to change to the HTTPS (SSL) version of the page.

 

All you need to do is edit the footer.tpl file in your theme by placing the following code near the top of your footer.

 

Below is the code from my footer to give you an example of how to use html and images inside php.

 

if($_SERVER['HTTPS']){
echo ' <img alt="SSL (Secure Version)" height="48" longdesc="You are connected to the SSL (Secure) version of this page. Information you submit is encrypted for your protection." src="https://www.mycommon.net/images/ssl.png" width="48" style="float: left">
<strong>You are connected to the <em>SECURE </em>version of this page. 
Information you submit is encrypted for your protection.</strong>';
}else{
echo '<a href="https://mybill.mycommon.net/">  
<img alt="Non Secure (HTTP) Version" height="48" longdesc="Non Secure (HTTP) Version - Do not submit confidential or private information. Please consider viewing the HTTPS (Secure) Version of this page." src="https://www.mycommon.net/images/http.png" width="48" style="float: left">
<strong>You are connected to the <em>NON-SECURE</em> version of this page. 
Please click here to be directed to our SECURE (HTTPS) version. For your safety 
DO NOT enter any confidential or personal information over a NON-SECURE  connection.</strong></a>';
}

 

You will want to enclose the above code in {php} {/php} tags so that it parses correctly within WHMCS.

 

You can edit the text and images to suit your install.

 

Below is the blank code to do it yourself.

 

if($_SERVER['HTTPS']){
echo 'IF HTTPS SSL TEXT HERE';
}else{
echo 'IF HTTP NOT SSL TEXT HERE';
}

 

Thanks,

 

Corey

Edited by mycommon
Link to comment
Share on other sites

Although I can see where your going with it, the huge box that pops up when I go to your site saying its not a secure site is a bit of a put off ;)

 

Though is still a nice touch, and will be a good addition when done.

 

We actually run our entire WHMCS install securely though, and find that displaying our certificate providers logo on there is more comforting to clients.

 

https://www.xtrgameservers.com/services/index.php

 

After all, anyone can issue a ssl cert and put text on their own page.

Link to comment
Share on other sites

  • 2 weeks later...

Hi ChrisGooding, i checked out ur site https://www.xtrgameservers.com/services/cart.php?a=add&pid=52, it looks great.

 

Im currently having a problem with my images in my site as i get an error message saying: this page contains both secure and non-secure items,a nd when i click on no secure items it doesnt show my images so the problems is with the images and i need to change from http to https, but i images are like: (images/bgr_down.jpg) so how do i change that to https, need help thanks. I need to know where i change the images to http and reference it to https, when i cant find any http ones, so confused???

Link to comment
Share on other sites

Im currently having a problem with my images in my site as i get an error message saying: this page contains both secure and non-secure items,a nd when i click on no secure items it doesnt show my images so the problems is with the images and i need to change from http to https, but i images are like: (images/bgr_down.jpg) so how do i change that to https, need help thanks. I need to know where i change the images to http and reference it to https, when i cant find any http ones, so confused???

 

the images are the same for either connection. to get rid of that error messages, make sure the images and style sheets (i.e. external file calls) in your whmcs tempates are all RELATIVE and not absolute paths.

 

i.e. an image src of /images/myimage.gif will avoid this error, while http://mydomain/images/myimage.gif will create it.

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated