Post by acoolie530 on Feb 4, 2005 22:20:22 GMT
I realize that Infinite made a similiar code but mine is um... better. And it has two versions
Name: Alter post count
Compatibility: Firefox/IE
Edit: In code and below code
Preview: Alans post count
Placement: All footers
To edit: Follow the in-code instructions
Add this line directly below the matching one for more users:
I also made a version which replaces only the "posts:" part and not the actual count:
Same instructions as previous version except make sure that the prefix ends in a ":"
Name: Alter post count
Compatibility: Firefox/IE
Edit: In code and below code
Preview: Alans post count
Placement: All footers
<script>
<!--
//Change post count by ACoolie530
//Do not redistribute without my permission
//This message must stay in tact
function posts(name,count) {
var td = document.getElementsByTagName("td");
for(i=0;i<td.length;i++) {
//View profile part. If you do not want special count to display in profile, remove this part
if(location.href.indexOf("action=viewprofile&username="+name) !=-1 && td[i].innerHTML.match(/Posts: (\d+)/i)) {
var posts = RegExp.$1;
td[i].innerHTML = td[i].innerHTML.replace(posts,count);
}
//End profile part
if(td[i].width=="20%" && td[i].vAlign=="top" && td[i].getElementsByTagName("font")[1].innerHTML.match("username="+name) && td[i].innerHTML.match(/Posts: (\d+)/i)) {
var posts = RegExp.$1;
td[i].innerHTML = td[i].innerHTML.replace(posts,count);
}
}
}
posts("Username here","Special Count here");
//-->
</script>
To edit: Follow the in-code instructions
Add this line directly below the matching one for more users:
posts("Username here","Special Count here");
I also made a version which replaces only the "posts:" part and not the actual count:
<script>
<!--
//Change post count by ACoolie530
//Do not redistribute without my permission
//This message must stay in tact
function posts(name,count) {
var td = document.getElementsByTagName("td");
for(i=0;i<td.length;i++) {
//View profile part. If you do not want special count to display in profile, remove this part
if(location.href.indexOf("action=viewprofile&username="+name) !=-1 && td[i].innerHTML.match(/Posts: \d+/i)) {
td[i].innerHTML = td[i].innerHTML.replace(/Posts:\s/i,count);
}
//End profile part
if(td[i].width=="20%" && td[i].vAlign=="top" && td[i].getElementsByTagName("font")[1].innerHTML.match("username="+name) && td[i].innerHTML.match(/Posts: \d+/i)) {
td[i].innerHTML = td[i].innerHTML.replace(/Posts:\s/i,count);
}
}
}
posts("Username here","Special prefix here");
//-->
</script>
Same instructions as previous version except make sure that the prefix ends in a ":"