inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Dec 14, 2005 13:39:30 GMT -8
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+/, ''); while(num.match(/\d(\d{3})($|,)/)) { num = num.replace(/(\d)(\d{3})($|,)/, '$1,$2$3'); } 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>
|
|