Post by [dmsuperman] on Mar 25, 2005 18:45:48 GMT
This money hack is editable in profile, and it goes up a set number of points per post.
It's cross browser. Enjoy
Main footer:
<script language="javascript" type="text/javascript">
<!--
//Money hack - profile editable by [dmsuperman]
//Do not remove this header
//May be reposted and edited
//Main footer
//Cross browser
var title = "Money:";//The label for your money
var inc = 5;//The amount of money each post earns
var td = document.getElementsByTagName("TD");
var table = document.getElementsByTagName("TABLE");
if(location.href.match("action=profile") && !location.href.match("profile2") && document.creator.settings6){
if(document.creator.usertext.value.match("_MONEY_")){
var cur = document.creator.usertext.value.split("_MONEY_");
var curmoney = cur[1];
var curtext = cur[0];
}else{
var curmoney = 0;
var curtext = document.creator.usertext.value;
}
for(x=0;x<table.length;x++){
if(table[x].width=="100%" && td[x].innerHTML.match(/posts/i) && table[x].border=="0" && table[x].cellPadding=="3"){
var rowA = table[x+2].insertRow(-1);
var cellAB = rowA.insertCell(-1);
var cellBB = rowA.insertCell(-1);
cellAB.width = "320";
cellAB.innerHTML = "<font size=2><b>Current "+title+"</b></font>";
var num = document.creator.settings6.value*inc;
num = parseInt(num);
curmoney = parseInt(curmoney);
var newcurmoney = num+curmoney;
cellBB.innerHTML = "<font size=2><b>"+newcurmoney+"</b></font>";
var rowB = table[x+2].insertRow(-1);
var cellAA = rowB.insertCell(-1);
cellAA.innerHTML = "<font size='2'><b>Modifier:</b></font>";
cellAA.width="320";
cellBA = rowB.insertCell(-1);
cellBA.innerHTML = "<font size='2'><input type='text' name='usertext2' value='"+curmoney+"'></font>";
}
}
function update(){
if(!document.creator.usertext.value.match("_MONEY_")){
var money = document.creator.usertext2.value;
document.creator.usertext.value = document.creator.usertext.value+"_MONEY_"+money;
}
}
document.creator.usertext.value=curtext;
document.forms[0].onsubmit=update;
}
if(document.title.match(/view profile/i) || location.href.match("imshow")){
for(x=0;x<td.length;x++){
if(td[x].width=="30%" || td[x].width=="20%"){
if(td[x].innerHTML.match("imsend")){
var br = td[x].innerHTML.split(/<br>/i);
for(y=0;y<br.length;y++){
if(br[y].match(/posts/i)){
var posts = br[y].split("Posts: ")[1];
var posts = parseInt(posts);
var totmoney = posts*inc;
}
}
if(td[x].innerHTML.match("_MONEY_")){
for(y=0;y<br.length;y++){
if(br[y].match("_MONEY_")){
var tdparts = td[x].innerHTML.split(br[y]);
var newbr = br[y].split("_MONEY_")[0];
var money = br[y].split("_MONEY_")[1];
var money = parseInt(money);
var totmoney = totmoney+money;
td[x].innerHTML = tdparts[0]+newbr+tdparts[1]+"<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}else{
td[x].innerHTML += "<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}
}
}
//-->
</script>
Board footers:
<script language="javascript" type="text/javascript">
<!--
//Money hack - profile editable by [dmsuperman]
//Do not remove this header
//May be reposted and edited
//Board footers
//Cross browser
var title = "Money:";//The label for your money
var inc = 5;//The amount of money each post earns
var td = document.getElementsByTagName("td");
if(location.href.match("display")){
for(x=0;x<td.length;x++){
if(td[x].width=="30%" || td[x].width=="20%"){
if(td[x].innerHTML.match("imsend")){
var br = td[x].innerHTML.split(/<br>/i);
for(y=0;y<br.length;y++){
if(br[y].match(/posts/i)){
var posts = br[y].split("Posts: ")[1];
var posts = parseInt(posts);
var totmoney = posts*inc;
}
}
if(td[x].innerHTML.match("_MONEY_")){
for(y=0;y<br.length;y++){
if(br[y].match("_MONEY_")){
var tdparts = td[x].innerHTML.split(br[y]);
var newbr = br[y].split("_MONEY_")[0];
var money = br[y].split("_MONEY_")[1];
var money = parseInt(money);
var totmoney = totmoney+money;
td[x].innerHTML = tdparts[0]+newbr+tdparts[1]+"<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}else{
td[x].innerHTML += "<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}
}
}//-->
</script>
To edit:
Edit the values of the inc (the amount of money's per post, keep this OUT of quotations), and title (example: Dollars:)
To edit the users money via profile:
You go to profile, at the bottom it says current money (which is after the modifier is applied), and modifier. Modifier is what you want to change the money by. You can use negative numbers in this spot, if you wish. If the current value is 5 (meaning you already added 5) and you wish to add 5 money's to the user, you would change it to 10.
It's cross browser. Enjoy
Main footer:
<script language="javascript" type="text/javascript">
<!--
//Money hack - profile editable by [dmsuperman]
//Do not remove this header
//May be reposted and edited
//Main footer
//Cross browser
var title = "Money:";//The label for your money
var inc = 5;//The amount of money each post earns
var td = document.getElementsByTagName("TD");
var table = document.getElementsByTagName("TABLE");
if(location.href.match("action=profile") && !location.href.match("profile2") && document.creator.settings6){
if(document.creator.usertext.value.match("_MONEY_")){
var cur = document.creator.usertext.value.split("_MONEY_");
var curmoney = cur[1];
var curtext = cur[0];
}else{
var curmoney = 0;
var curtext = document.creator.usertext.value;
}
for(x=0;x<table.length;x++){
if(table[x].width=="100%" && td[x].innerHTML.match(/posts/i) && table[x].border=="0" && table[x].cellPadding=="3"){
var rowA = table[x+2].insertRow(-1);
var cellAB = rowA.insertCell(-1);
var cellBB = rowA.insertCell(-1);
cellAB.width = "320";
cellAB.innerHTML = "<font size=2><b>Current "+title+"</b></font>";
var num = document.creator.settings6.value*inc;
num = parseInt(num);
curmoney = parseInt(curmoney);
var newcurmoney = num+curmoney;
cellBB.innerHTML = "<font size=2><b>"+newcurmoney+"</b></font>";
var rowB = table[x+2].insertRow(-1);
var cellAA = rowB.insertCell(-1);
cellAA.innerHTML = "<font size='2'><b>Modifier:</b></font>";
cellAA.width="320";
cellBA = rowB.insertCell(-1);
cellBA.innerHTML = "<font size='2'><input type='text' name='usertext2' value='"+curmoney+"'></font>";
}
}
function update(){
if(!document.creator.usertext.value.match("_MONEY_")){
var money = document.creator.usertext2.value;
document.creator.usertext.value = document.creator.usertext.value+"_MONEY_"+money;
}
}
document.creator.usertext.value=curtext;
document.forms[0].onsubmit=update;
}
if(document.title.match(/view profile/i) || location.href.match("imshow")){
for(x=0;x<td.length;x++){
if(td[x].width=="30%" || td[x].width=="20%"){
if(td[x].innerHTML.match("imsend")){
var br = td[x].innerHTML.split(/<br>/i);
for(y=0;y<br.length;y++){
if(br[y].match(/posts/i)){
var posts = br[y].split("Posts: ")[1];
var posts = parseInt(posts);
var totmoney = posts*inc;
}
}
if(td[x].innerHTML.match("_MONEY_")){
for(y=0;y<br.length;y++){
if(br[y].match("_MONEY_")){
var tdparts = td[x].innerHTML.split(br[y]);
var newbr = br[y].split("_MONEY_")[0];
var money = br[y].split("_MONEY_")[1];
var money = parseInt(money);
var totmoney = totmoney+money;
td[x].innerHTML = tdparts[0]+newbr+tdparts[1]+"<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}else{
td[x].innerHTML += "<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}
}
}
//-->
</script>
Board footers:
<script language="javascript" type="text/javascript">
<!--
//Money hack - profile editable by [dmsuperman]
//Do not remove this header
//May be reposted and edited
//Board footers
//Cross browser
var title = "Money:";//The label for your money
var inc = 5;//The amount of money each post earns
var td = document.getElementsByTagName("td");
if(location.href.match("display")){
for(x=0;x<td.length;x++){
if(td[x].width=="30%" || td[x].width=="20%"){
if(td[x].innerHTML.match("imsend")){
var br = td[x].innerHTML.split(/<br>/i);
for(y=0;y<br.length;y++){
if(br[y].match(/posts/i)){
var posts = br[y].split("Posts: ")[1];
var posts = parseInt(posts);
var totmoney = posts*inc;
}
}
if(td[x].innerHTML.match("_MONEY_")){
for(y=0;y<br.length;y++){
if(br[y].match("_MONEY_")){
var tdparts = td[x].innerHTML.split(br[y]);
var newbr = br[y].split("_MONEY_")[0];
var money = br[y].split("_MONEY_")[1];
var money = parseInt(money);
var totmoney = totmoney+money;
td[x].innerHTML = tdparts[0]+newbr+tdparts[1]+"<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}else{
td[x].innerHTML += "<center><font size=1>"+title+" "+totmoney+"</font></center>";
}
}
}
}
}//-->
</script>
To edit:
Edit the values of the inc (the amount of money's per post, keep this OUT of quotations), and title (example: Dollars:)
To edit the users money via profile:
You go to profile, at the bottom it says current money (which is after the modifier is applied), and modifier. Modifier is what you want to change the money by. You can use negative numbers in this spot, if you wish. If the current value is 5 (meaning you already added 5) and you wish to add 5 money's to the user, you would change it to 10.