Hello, check my code today, and get a bug... return nan result of members...
My Code:
- Code:
NaN users are online (in the past 45 minutes)
NaN members, 0 guests, 0 anonymous users (See full list)
My Code:
- Code:
<script type="text/javascript">
//<![CDATA[
('IP.Board statistics of forumotion forums, by BitCoding.');
('Bug Fix v1.0 by SSYT, o.d.f forumotion');
('www.bitcoding.tk');
$('#board_statistics p.statistics_brief st').each(function() {
var arrs = new Array();
arrs['total'] = $(this).text().match(/\d+/g)[0];
arrs['users'] = $(this).text().match(/\d+/g)[1];
arrs['guests'] = $(this).text().match(/\d+/g)[3];
arrs['invisible'] = $(this).text().match(/\d+/g)[2];
arrs['bots'] = $(this).text().match(/\d+/g)[4];
arrs['total2'] = parseInt(arrs.users) + parseInt(arrs.bots);
arrs['total3'] = parseInt(arrs.total) + parseInt(arrs.bots);
if(arrs.bots != 0) { $(this).replaceWith(''+ arrs.total2 +' members, '+ arrs.guests +' guests, '+ arrs.invisible +' anonymous users'); }
else { $(this).replaceWith(''+ parseInt(arrs.users) +' members, '+ arrs.guests +' guests, '+ arrs.invisible +' anonymous users'); }
if(arrs.bots != 0) { vars('{.VIEWV_ONLINES}', arrs.total3 + ' users are online (in the past 45 minutes)'); }
else { vars('{.VIEWV_ONLINES}', arrs.total + ' users are online (in the past 45 minutes)'); }
});
//]]>
</script>