inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Dec 29, 2008 16:42:27 GMT -8
This code will allow you to give your members a random display name. Note: they will have a different (possibly!) display name everytime their display name is shown.<script> /*Random Display Name Created By Wrighty Do Not: Rip, Repost or Claim*/ function ran_user(x, y){ for(d = document.getElementsByTagName('a'), a = 0; a < d.length; a++){ if(d.href.match(new RegExp('viewprofile&user=' + x))){ var num = Math.floor(Math.random() * y.length); d.innerHTML = y[num]; } } } ran_user('admin',['test', 'test2', 'test3', 'display name 4']); </script>Repeat this line for more random users: ran_user('admin',['test', 'test2', 'test3', 'display name 4']);First thing is the username, the 2nd is an array (shown in the square brackets) of the different display names to use. And yes, HTML should be supported! ;D Global Footer
|
|