LavIgor, спасибо, по аналогии получилось!
хотелось бы уточнить:
в
overall_footer_copyright_prepend.html размещен полный код счетчика для всех страниц (сразу добавил
class="cnstats_image"
):
Код: Выделить всё
<!-- CNStats begin -->
<script type="text/javascript">
cnsd=document;cnst=escape(cnsd.title);
cnst=cnst.replace(/\+/g,'%2B');cnsa=navigator.appName;
cnsn=(cnsa.substring(0,2)=='Mi')?0:1;cnss=screen;cnspx=(cnsn==0)?cnss.colorDepth:cnss.pixelDepth;
document.write('<img class="cnstats_image" src="http://custommoto.com.ua/cnstats/cnt-gif1x1.php?e='+cnss.width+'.'+cnss.height+'&d='+cnspx+'&r='+escape(cnsd.referrer)+'&p='+escape(cnsd.location)+'&t='+cnst+'" width="1" height="1" border="0">');
</script><noscript><img src="http://custommoto.com.ua/cnstats/cnt-gif1x1.php?468&c=0" width="1" height="1" border="0" alt=""></noscript>
<!-- CNStats end -->
<img src="http://custommoto.com.ua/cnstats/cnt-show.php" width="88" height="31" border="0" alt=""/>
в
overall_footer_after.html, в скрипте разместил собранный по примеру код, с условием только для страниц тем:
Код: Выделить всё
<!-- IF S_VIEWTOPIC -->
function generate_cnstats_image() {
return '<img class="cnstats_image" src="http://custommoto.com.ua/cnstats/cnt-gif1x1.php?e='+cnss.width+'.'+cnss.height+'&d='+cnspx+'&r='+escape(cnsd.referrer)+'&p='+escape(cnsd.location)+'&t='+cnst+'" width="1" height="1" border="0">';
}
document.write(generate_cnstats_image());
jQuery('#qr_posts').on('qr_loaded', function() {
jQuery('.cnstats_image').replaceWith(generate_cnstats_image());
});
<!-- ENDIF -->
все верно? т.е. к основному коду счетчика добавляется скриптовый вариант для поддержки аякса?
может где и ошибка, но по крайней мере аякс-страницы считаются.