Web Hosting Forum | Lunarpages
News: April 3, 2008 - New Contest! - Win 5 Years of Hosting and $1,000!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 06, 2008, 12:57:33 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Frustrated with Comodo Cornertrust Logo  (Read 167 times)
Rapunzl
Pong! (the videogame) Master
*****
Offline Offline

Posts: 20


« on: May 10, 2008, 05:02:32 PM »

I've wasted hours on this, so I'm finally handing it over to someone who knows what they're doing. I had my cornertrust logo working before, but when I reinstalled it on my new Joomla 1.5.3 installation template index.php (hotlinks disabled) it no longer shows up anymore.

I followed the instructions and inserted the two sections of javascript before </head> and </body> with cut and paste. I've tried using http and https in the section before the /body tag. Any help is greatly appreciated.

http://www.rapunzl.com
« Last Edit: May 10, 2008, 05:06:29 PM by Rapunzl » Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3031



« Reply #1 on: May 10, 2008, 07:02:50 PM »

I see a couple of strange things. In the document.writeln line, you have

...src="/'+cot_loc0+'" type="text\/javascript">' + '<\/scr'...

Why is there a slash before the URL (end result ...src="/https://secure...)? And I'm not sure you need an escape before the slash in the type and end script tag. Try

...src="'+cot_loc0+'" type="text/javascript">' + '</scr'...

Maybe try dropping the first / and testing, before dropping the two \s.

Anyway, it appears that the idea is to insert <script language="JavaScript" src="https://secure.blahblah" type="text/javascript" > into the page, based on whether the current page is accessed with http: or https:. This script hopefully gets run at some point to do something about your logo.

When you say "hotlinks disabled", do you mean that hotlink protection is disabled, or that hotlinking itself  is disabled? If the latter, make sure that both http: and https: versions of your domain are in the allowed (exceptions) list in .htaccess.
Logged

Rapunzl
Pong! (the videogame) Master
*****
Offline Offline

Posts: 20


« Reply #2 on: May 10, 2008, 07:22:21 PM »

This is the exact code from Comodo that I cut and pasted into my Joomla 1.5 template index.php. As you point out, something is changing it during execution. Oh, and I meant hotlink protection is disabled. Sorry for the confusion there.
Code:
<script language="javascript" type="text/javascript">
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>

</head>
and
Code:
<a href="http://www.instantssl.com" id="comodoTL">SSL</a>
<script language="JavaScript" type="text/javascript">
COT("http://www.rapunzl.com/cornertrust.gif", "SC2", "none");
</script>

</body>

This is the source code after execution.
Code:
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="/'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>

</head>

Code:
<a href="http://www.instantssl.com" id="comodoTL">SSL</a>
<script language="JavaScript" type="text/javascript">
COT("http://www.rapunzl.com/cornertrust.gif", "SC2", "none");
</script>

</body>

Another note: I'm getting a COT is undefined error.

Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3031



« Reply #3 on: May 11, 2008, 05:33:50 AM »

Interesting. So you're entering ...src="'+cot... and what's showing up is ...src="/'+cot...? Double check that (without the extra /) is what you saved in the file and check what is actually in your file on the server (cPanel > File Manager > Display file contents). You need to find when that extra slash is coming in, as I'm sure it will severely bollix everything. As for the escaped slashes (\/), I don't think the escape (\) is necessary, but it probably doesn't hurt. (Any JS mavens out there know if / within single-quoted strings gets treated as a division?)

The undefined COT is probably a consequence of the Javascript file (cot.js) not being included due to the error above. Fix that problem first.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM