|
Post by Ross on Jan 7, 2006 18:10:29 GMT -5
Main Footer This can be used to modify any of the totals shown in the info center, just change the numbers in red to the amount you want to add or minus to each total.
<script type="text/javascript"> <!-- /* adjust info center totals */
var tAdd = 1000; // Topics to add var pAdd = 500; // Posts to add var mAdd = 2; // Members to add
function aNum(num, add){ num = parseInt(num.replace(/,/g,'')) + add; num = num.toLocaleString().replace(/\.\d+/, ''); return num; } var td = document.getElementsByTagName('td'); for(i=td.length-1; i>0; i--) { if(td.item(i).width == '60%' && td.item(i).innerHTML.match(/Total Topics: (.+?)\s.+Total Posts: (.+?)</)) { var pNew = RegExp.$2; var tNew = RegExp.$1; td.item(i).innerHTML = td.item(i).innerHTML.replace(/(Total Topics: )(.+?)\s/,'$1'+ aNum(tNew, tAdd)).replace(/(Total Posts: )(.+?)</,'$1'+ aNum(pNew, pAdd) +'<'); if(td.item(i+1).innerHTML.match(/(Total Members: <.+?>(.+?)<)/)) { var mNew = aNum(RegExp.$2, mAdd); td.item(i+1).firstChild.childNodes[1].innerHTML = mNew; } break; } } //--> </script>
|
|