inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jun 23, 2010 1:10:12 GMT -8
Change 'Posts' to 'Replies' by SubDevoTested in IE, FF, Opera, Safari and Chrome. This code changes the "Posts" column on the Main page (and Sub-Boards), to "Replies". By default, the number of Posts is the TOTAL of replies and "Topics". This code subtracts the amount of "Topics" from the amount of "Posts" and uses the result for the amount of "Replies". The code accurately handles large numbers (numbers with commas) and also correctly inserts commas back into the result. Enjoy!!! SubDevo NOTE:Some codes look for the "Posts" column in order to function. If (for some reason), this code doesn't work right away, simply move it further down in your footer. Location: Global Footer<script type="text/javascript"> /* Change 'Posts' to 'Replies' by SubDevo */ /* Global Footer - Please leave this header intact. Do not repost. */ /* interoceandesigns.com or lsdp.proboards.com */
function pI(a){return (a.replace(/,/g,"")-0);} function aCo(a){var n=/(\d+)(\d{3})/; while(n.test(a)){a=a.replace(n,"$1,$2");} return a;} if((/^(home|boardindex)$/).test(pb_action)){ var n=document.getElementsByTagName("td"),b,x=0; while(n[++x]){ if(n[x].width=="1%"&&n[x-1].width=="1%"){b=n[x].firstChild; if(b.innerHTML.indexOf(">Posts<")>0){b.firstChild.innerHTML="Replies";} else{b.innerHTML=aCo((pI(b.innerHTML)-pI(n[x-1].firstChild.innerHTML))+"");} }}} </script>
|
|