Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
August 22, 2014, 09:35:30 PM

Pages: [1]   Go Down
  Print  
Author Topic: Need help positiong my Comodo SSL Seal in header using Java Script and CSS  (Read 11724 times)
link4nes
Spacescooter Operator
*****
Offline Offline

Posts: 35


WWW
« on: January 28, 2014, 10:20:34 AM »

Hello:

I have been searching all over the internet for an answer and I hope someone can help me out. Basically I am running Presta Shop and want to place this JavaScript from Comodo (Trust Logo) in my header.tpl file. I've been able to place it in there and it does work. My only problem is figuring out how to position the actual image file with the link: TrustLogo("http://www.nesgamestore.com/themes/nestheme/img/comodo_secure.png", "CL1", "none");

Does anyone know how to integrate HTML Position Style TAGS or CSS in with the Javascript code so I can position it on the right side of my header? I tried using style tags for the <a href> tag and I can move the "SSL Certificates" text over but the image remains.


1. Copy and Paste the following piece of code and insert EXACTLY before your </HEAD> tag.

<script language="javascript" type="text/javascript">

//<![CDATA[
var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
"http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>

2. Copy and Paste the following piece of code and insert EXACTLY before your </BODY> tag.

<script language="JavaScript" type="text/javascript">
TrustLogo("http://www.nesgamestore.com/themes/nestheme/img/comodo_secure.png", "CL1", "none");
</script>
<a  href="http://ssl.comodo.com" id="comodoTL">SSL Certificates</a>


* tmp_7777.png (30.91 KB, 1084x241 - viewed 35 times.)
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5863



« Reply #1 on: January 28, 2014, 11:36:19 AM »

I'm not clear on what you're trying to do. Do you want to move both the padlock icon and the "SSL Certificates" link over the right side of the page, or just one of them? Not being able to see the final HTML, JS, and CSS that's positioning the two of them in your header, it's kind of hard to suggest anything, even once it's clear what you want.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
link4nes
Spacescooter Operator
*****
Offline Offline

Posts: 35


WWW
« Reply #2 on: January 28, 2014, 12:11:29 PM »

Hi:

I'm removing the line for <a  href="http://ssl.comodo.com" id="comodoTL">SSL Certificates</a> so it would just be the pad lock pic that links the JavaScript for SSL verification from Comodo.

I would like to position the padlock so it is to the right of the PayPal picture in the header above the Menu Bar.

I made the changes to my header.tpl file and copied the final javascript code below. Preatashop uses smarty templates so the {literal} tags are added into the code below.

I have also taken my site out of maintenance mode so you can view it live at http://www.nesgamestore.com

Thank you very much for any advice you can offer!

++++++++++++++++++++++++++++++++++
<script language="javascript" type="text/javascript">
               {literal}   
                  //<![CDATA[
                  var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
                  "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
                  document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
                  //]]>
               {/literal}
               </script>
               <script language="JavaScript" type="text/javascript">
               {literal}
               TrustLogo("http://www.nesgamestore.com/themes/nestheme/img/comodo_secure.png", "CL1",
               "none")
               {/literal};
               </script>
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5863



« Reply #3 on: January 28, 2014, 01:14:29 PM »

Try this. Find:
Code:
TrustLogo("http://www.nesgamestore.com/themes/nestheme/img/comodo_secure.png", "CL1",
in your source, and wrap the following around it:
Code:
<div style="position:absolute; right:100px; top:70px;">
 TrustLogo("http://www.nesgamestore.com/themes/nestheme/img/comodo_secure.png", "CL1", "none");
</div>

Even if it positions the stuff correctly, you'll probably still have to tweak the right and top values til it's placed where you want. It's possible you'll have to give width and height properties to the <div>, too.
« Last Edit: January 28, 2014, 01:16:58 PM by MrPhil » Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
link4nes
Spacescooter Operator
*****
Offline Offline

Posts: 35


WWW
« Reply #4 on: January 28, 2014, 02:59:35 PM »

Thanks! I put in the DIV tags just before and after the script tags and it worked! Thanks!
Logged
dwaynnyt
Intergalactic Cowboy
*****
Offline Offline

Posts: 64


« Reply #5 on: March 16, 2014, 08:10:48 AM »

Nice to see this working for you buddy. If I may ask, how much did you spend in total here?
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: