|
Post by CrAzY_J on Aug 28, 2005 16:41:01 GMT -8
Description: A extra text field will appear in the user's "modify profile" page, in this newly added text field the user can choose to add their game name. If they do not wish to do this, they can just leave the field blank. code placement: Global Footers
<script type='text/javascript'> /* Currently playing in Profile Code requested @ http://studiozero.proboards44.com Request filled by CrAzY_J Do no redistribute this code without the permission of CrAzY_J*/
if(location.href.match(/modifyprofile/)){ var gTab=document.body.getElementsByTagName("table"); for(t=0;gTab.length;t++){ if(gTab[t].cellSpacing=="2" && gTab[t].innerHTML.match(/Gender:/)){ var iRow=gTab[t].insertRow(1); var iCell=iRow.insertCell(0);var iCell2=iRow.insertCell(1);var iCell3=iRow.insertCell(2); iCell.innerHTML="<font size='2'>Currently playing:</font>" iCell2.innerHTML="<input id='play' size='35'>"; iCell3.innerHTML="What game are you currently playing?"; if(document.modifyForm.personaltext.value.match(/plg:(.+?):/)) document.getElementById('play').value=RegExp. $1;
document.modifyForm.onsubmit=function(){ if(!document.getElementById('play').value == "" ){ if(document.modifyForm.personaltext.value.match(/plg:(.+?):/)) document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(RegExp.$1,document.getElementById("play").value); else document.modifyForm.personaltext.value+="plg:"+document.getElementById("play").value+":"; } } } } }
if(location.href.match(/(view(profile)?|display)/)){ var TD=document.getElementsByTagName("td"); for(t=0;t<TD.length;t++){ if(TD[t].width=="20%" && TD[t].innerHTML.match(/plg:(.+?):/)){ TD[t].innerHTML=TD[t].innerHTML.replace(/plg:.+?:/,"Currently playing:"+RegExp.$1); } } } </script>
|
|