Peter
New Member
God
Posts: 6
|
Post by Peter on Oct 30, 2004 13:19:07 GMT
Code by Webworldx
This hack doesn't claim to be complete by any means, but here's a simple RPG field in your profile, removes the Custom Text input box and replaces it with an Option Select box. You could use it to give users an RPG race choice when they join your forum. <script type="text/javascript"> //Created by Webworldx - RPG Profile Modifier //Open Source, but please keep this in the header. if (location.href.indexOf("=headersfooters") != -1) { } else { var range = document.body.createTextRange(); range.collapse(true); while (range.findText("Personal Text")) { range.text="RPG Race" range.collapse(false); }
var itype = document.getElementsByTagName('input'); for(a=0;a<itype.length;a++){ if (itype[a].name=="usertext") { itype[a].outerHTML = itype[a].outerHTML.replace(/size=50/gi,"") itype[a].outerHTML = itype[a].outerHTML.replace(/input/gi,"select") } } var stype = document.getElementsByTagName('select'); for(a=0;a<stype.length;a++){ if (stype[a].name=="usertext") { stype[a].outerHTML = stype[a].outerHTML + '<option value="RPG Race - Human">Human<option value="RPG Race - Alien">Alien<option value="RPG Race - Predator">Predator<option value="RPG Race - Pterodactyl">Pterodactyl<option value="RPG Race - Shark">Shark<option value="RPG Race - Wolf">Wolf</select>' } }
} </script>
That's basically it, should work ok, but as said in the header of it, it's open source, so feel free to mod it as long as you keep my text in the code. Goes in the footers by the way
|
|