|
Post by teksura on Oct 8, 2005 15:39:41 GMT -8
I found this code and traced it back here, the code in its original form was useless to me (Its a pokemon RP forum, Magic points, HP, and stamina are not really used) I was able to edit enough of it myself to change the names to something of a little more use to my needs. however It still has a few problems when it comes to the needs of my site
First I'd like to ask that the creator of this code not be mad that i edited it without his permission. second I'd like to know exactally how it can be edited so everything starts at a default of 0 and (I'm not sure if it rises on its own by post count but if it does) and not rise with post count... someone told me it did.
|
|
|
Post by CrAzY_J on Oct 9, 2005 19:26:45 GMT -8
<script type='text/javascript'> /* RPG Me V1.0 Created by cRAzY_J (http://hatakeforum.proboards30.com) do no redistribute this code without the creator's permission this header must not be remove*/
var redbull=document.body.getElementsByTagName("td"); var coffee=document.body.getElementsByTagName("table"); function cocacola(){ for(t=0;t<redbull.length;t++){ if(redbull[t].colSpan=="2" && redbull[t].innerHTML.match(/Member's\sBio/)){ redbull[t].getElementsByTagName("a")[0].href.match(/&user=(.+?)$/) redbull[t].getElementsByTagName("b")[0].innerHTML+= " - <a href='/index.cgi?action=modifyprofile&user="+RegExp.$1+"&rpgstats'>RPG Stats</a>"; } } } function mtdew(){ for(mock=4;mock<coffee.length;mock++) coffee[mock].style.display="none"; var gatorade=document.modifyForm.posts.value; var a,b,c,d; if(!document.modifyForm.personaltext.value.match(/gpr%%(\d+)%%(\d+)%%(\d+)%%(\d+)%%/)){ a = 0;b = 0;c = 0;d = 0; }else{ a = RegExp.$1; b = RegExp.$2; c = RegExp.$3; d = RegExp.$4; } var pepsi= "<table width='92%' class='bordercolor' border='0' cellPadding='0' align='center'>" pepsi+= "<tr><td><table width='100%' cellPadding='4' cellSpacing='1'><tr><td class='titlebg'>" pepsi+= "<font size='2' class='cattext'>RPG Profile</font></td></tr></table>" pepsi+= "<table width='100%' cellPadding='4' cellSpacing='1'><tr>" pepsi+= "<td class='windowbg' width='50%'>Money 1:</td><td width='50%' class='windowbg'>" pepsi+= "<input id='money' value='"+a+"'></td></tr>" pepsi+= "<tr><td class='windowbg' width='50%'>Badges 1:</td><td width='50%' class='windowbg'>" pepsi+= "<input id='badge' value='"+b+"'></td></tr>" pepsi+= "<tr><td class='windowbg' width='50%'>Money 2:</td><td width='50%' class='windowbg'>" pepsi+= "<input id='moneyt' value='"+c+"'></td></tr>" pepsi+= "<tr><td class='windowbg' width='50%'>Badges 2:</td><td width='50%' class='windowbg'>" pepsi+= "<input id='badget' value='"+d+"'></td></tr></table>" pepsi+= "<table width='100%' cellPadding='4' cellSpacing='1'><tr><td class='titlebg' align='center'>" pepsi+= "<input type='button' value='Submit Changes' onClick='sprite();'></td></tr></table></td></tr></table>" document.write(pepsi); }
function sprite(){ var one = document.getElementById("money").value; var two = document.getElementById("badge").value; var three = document.getElementById("moneyt").value; var four = document.getElementById("badget").value; document.modifyForm.personaltext.value = "gpr%%"+one+"%%"+two+"%%"+three+"%%"+four+"%%"; document.modifyForm.submit(true); }
function fanta(){ for(can=0;can<redbull.length;can++){ if(redbull[can].innerHTML.match(/Personal\sText:/) && redbull[can].width=="160") redbull[can].parentNode.style.display = "none"; } }
function orangejuice(){ for(glass=0;glass<redbull.length;glass++){ if( redbull[glass].width=="20%" && redbull[glass].innerHTML.match(/Posts:\s(\d+)/)){ if(redbull[glass].innerHTML.match(/gpr%%(\d+)%%(\d+)%%(\d+)%%(\d+)%%/)){ redbull[glass].innerHTML+= "<br />Money 1: "+RegExp.$1+"<br />Badge 1: "+RegExp.$2+"<br />Money 2: "+RegExp.$3+"<br />Badge 2: "+RegExp.$4; redbull[glass].innerHTML = redbull[glass].innerHTML.replace(/gpr%%(\d+)%%(\d+)%%(\d+)%%(\d+)%%/,""); }else{ redbull[glass].innerHTML+= "<br /> Money 1: 0<br /> Badge 1: 0<br /> Money 2: 0<br /> Badge 2: 0"; } } } }
if(location.href.match(/modifyprofile/)) fanta(); if(location.href.match(/(view(profile)?|display)/)) orangejuice(); if(redbull[5].innerHTML.match(/admin/)){ cocacola(); if(location.href.match(/&rpgstats/)) mtdew(); } </script>
try it out
|
|
|
Post by teksura on Oct 15, 2005 8:16:06 GMT -8
Thank you very much
|
|