Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new infobox help


wildone

Recommended Posts

ok I have managed to create a new infobox called counter.php

 

<!-- counter Info Box //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<font color="' . $font_color . '">' . BOX_HEADING_COUNTER . '</font>'
);
new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',

'text' => ".........."
);


new infoBox($info_box_contents);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => tep_draw_separator('pixel_trans.gif', '100%', '1')
);
new infoboxFooter($info_box_contents, true, true);


?>
</td></tr>
<!-- counter_eof //-->

 

this is code I found from something else, I dont really understand how the box is made up but this gives me a box with my heading in the tittle bar and a row of "........" in the main area of the box.

 

I would like to insert some counter code from precisioncounter.com, to take the place of the "......" this code looks like this

 

<!-- START PrecisionCounter.com Hits/Stats Code -->
<!-- COPYRIGHT 2008 PrecisionCounter.com -- ALL RIGHTS RESERVED. -->
<!-- PRIVACY NOTICE at http://www.precisioncounter.com/privacy.php -->
<!-- webbot bot="HTMLMarkup" startspan -->

<p align="center"><script language="javascript">
 var data, p;
 var agt=navigator.userAgent.toLowerCase();
 p='http';
 if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&a=RlHwJsSnUn' + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent);
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)};
  document.write('<a href="http://www.precisioncounter.com/stats.php?i=13601&a=RlHwJsSnUn" target="_blank" >');
  document.write('<img border=0 hspace=0 '+'vspace=3 src="http://www.precisioncounter.com/counter.php?i=13601&a=RlHwJsSnUn' + data + '"></a>');
</script><br><a href="http://www.precisioncounter.com" target="_blank" 
 title="FREE Hit Counters and Site Statistics!" 
 style="font-family: tahoma, verdana, arial, helvetica, sans-serif; 
 color: gray; 
 font-size: 10px;
 text-decoration: none;">FREE Hit Counters!</a></p>

 

so that i can have my counter inside the box. having the counter with no box is easy.

can anyone help me out?

 

much appreciated

 

Thanks

 

John

Edited by wildone
Link to comment
Share on other sites

This should work:

 

<!-- counter Info Box //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<font color="' . $font_color . '">' . BOX_HEADING_COUNTER . '</font>'
);
new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',

'text' => "<script language=\"javascript\">
 var data, p;
 var agt=navigator.userAgent.toLowerCase();
 p='http';
 if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&a=RlHwJsSnUn' + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent);
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)};
  document.write('<a href=\"http://www.precisioncounter.com/stats.php?i=13601&a=RlHwJsSnUn\" target=\"_blank\" >');
  document.write('<img border=0 hspace=0 '+'vspace=3 src=\"http://www.precisioncounter.com/counter.php?i=13601&a=RlHwJsSnUn' + data + '\"></a>');
</script><br><a href=\"http://www.precisioncounter.com\" target=\"_blank\"
 title=\"FREE Hit Counters and Site Statistics!\"
 style=\"font-family: tahoma, verdana, arial, helvetica, sans-serif;
 color: gray;
 font-size: 10px;
 text-decoration: none;\">FREE Hit Counters!</a>"
);


new infoBox($info_box_contents);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => tep_draw_separator('pixel_trans.gif', '100%', '1')
);
new infoboxFooter($info_box_contents, true, true);


?>
</td></tr>
<!-- counter_eof //-->

I got rid of the counter code comments ("<!-- START PrecisionCounter.com Hits/Stats Code -->", etc) from the top as they are not needed, as well as removing the wrapping paragraph (<p>) tag.

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...