Loaded Commerce Community

Banner


Board index » CRE Loaded Support » CRE Loaded 6.2

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help needed "Creating" an infobox around javascript code
PostPosted: Wed Jul 06, 2011 6:25 am 
Offline
CRE Newbie

Joined: Tue May 17, 2011 6:34 am
Posts: 16
Hi,

My site is www.cpsextoys.co.uk

I'm very much learning as I go but have previously successfully added infoboxes to the template of my site but now I'm stuck.

I've purchased Site Scanner from Go Daddy and have been provided with the Javascript code to display the Site Scanner image etc.

The only way I've managed to get the image to display is by creating a new infobox entitled site_scanner.php and pasting the javascript into this file with no other code at all. So now in my infobox_configure page it displays the new box BUT says its at the BOTTOM right of my page whereas its actually at the TOP RIGHT of my page template.

I'd like help to move it please (preferably to add it into the infobox with my SSL in). Alternatively, I want it displayed in an infobox with borders and a header such as the other boxes on my site.

I've googled, searched and tried what I've found but am still stuck, can anyone help please?

The code I usually use to install an infobox into mytemplate/boxes/ is as follows :-

Code:
<?php

/*

$Id: new_box.php
osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com
Copyright © 2001 osCommerce
Released under the GNU General Public License

*/

?>

<!-- new_box //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_HEADING_NEW_BOX

);

new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_TEXT_NEW_BOX);

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- new_box_eof //-->


With new_box being changed as needed.

Then in english.php I do the following :-

Code:
// new_box
define('BOX_HEADING_CALL_ME_SOMETHING', 'Call me something');
define('BOX_TEXT_CALL_ME_SOMETHING', '<span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=xxxxxxxxxxxxxxxx"></script><br/> </span>');
                     


So what do I need to do to get the Site Scanner seal to display?

Any help would be great, thanks.


Top
 Profile  
 
 Post subject: Re: Help needed "Creating" an infobox around javascript code
PostPosted: Thu Jul 07, 2011 7:54 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2402
Location: New Zealand
You don't need to call it from a language define.
Just modify the example.php infobox and replace:
Code:
'text' => BOX_TEXT_NEW_BOX);

with:
Code:
'text'  => '<span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=bunchofnumbers"></script></span>');


Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Help needed "Creating" an infobox around javascript code
PostPosted: Sat Jul 09, 2011 4:56 am 
Offline
CRE Newbie

Joined: Tue May 17, 2011 6:34 am
Posts: 16
Hi Simon,

Thanks for your reply.

The code given for installing the Site Scanner is as below :

Code:
                           <script type="text/JavaScript">
//<![CDATA[
var sealServer=document.location.protocol+"//seals.websiteprotection.com/sealws/xxxxxxxxxxxxxxxxxxxxxx.gif";var certServer=document.location.protocol+"//certs.websiteprotection.com/sealws/?sealId=xxxxxxxxxxxxxxxxxxxxxxxxxx";var hostName="www.cpsextoys.co.uk";document.write(unescape('<div style="text-align:center;margin:0 auto;"><a target="_blank" href="'+certServer+'&pop=true" style="display:inline-block;"><img src="'+sealServer+'" alt="Website Protection&#153; Site Scanner protects this website from security threats." title="This Website Protection site seal is issued to '+ hostName +'. Copyright © 2011, all rights reserved."oncontextmenu="alert(\'Copying Prohibited by Law\'); return false;" border="0" /></a><div id="bannerLink"><a href="https://www.godaddy.com/" target="_blank">Go Daddy</a></div></div>'));
//]]>
</script>
                   


From your post I've tried adding both

Code:
//certs.websiteprotection.com/sealws/?sealId=xxxxxxxxxxxxxxxxxxxxxxxxxx

and
Code:
//seals.websiteprotection.com/sealws/xxxxxxxxxxxxxxxxxxxxxx.gif


into the code you've suggested and I'm just getting a blank infobox. I placed the code after the src="https: part of your code.

The code in your reply is, I believe, for an SSL certificate (?!) which I've already got installed on my site. The code I've been given for the Site Scanner is completely different as you can see above so I'm guessing I need to treat it differently but obviously don't know how to implement it.

I'd appreciate it if you have any further ideas that I can try.

BTW keep up the good work with http://www.codemehappy.com I've found it VERY useful a number of times already!

Cheers,

Matt


Top
 Profile  
 
 Post subject: Re: Help needed "Creating" an infobox around javascript code
PostPosted: Sat Jul 09, 2011 6:06 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2402
Location: New Zealand
Probably because the code you posted in your OP is for a basic seal logo and nothing to do with sitescanner.
This code will work in a blank box - stick it in between the <tr><td> tags - why worry about putting it in an infobox?

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Help needed "Creating" an infobox around javascript code
PostPosted: Sun Jul 10, 2011 2:50 pm 
Offline
CRE Newbie

Joined: Tue May 17, 2011 6:34 am
Posts: 16
Hi Simon, Thanks again for your reply.

I hope you didnt think my last response was knocking your FIRST reply? I just thought I'd confused you in my wording of my problem just as I often confuse myself!

I've now got the image appearing better than it was thanks to your advice so I'm more than happy!

Thanks again for your help!

Matt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Board index » CRE Loaded Support » CRE Loaded 6.2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Mon May 21, 2012 6:32 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy