wildone Posted October 5, 2008 Share Posted October 5, 2008 (edited) 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 October 5, 2008 by wildone Quote Link to comment Share on other sites More sharing options...
Kanie Posted October 5, 2008 Share Posted October 5, 2008 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. Quote Link to comment Share on other sites More sharing options...
wildone Posted October 5, 2008 Author Share Posted October 5, 2008 many thanks Kanie, works a treat. I have been tinkering about with this for a few hours this morning and i was on the write track, but probably would not of got there. :rolleyes: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.