inherit
123128
0
Feb 3, 2020 13:53:38 GMT -8
Malagrond
Remember, remember the 5th of November.
813
April 2008
malagrond
|
Post by Malagrond on Mar 28, 2009 21:57:10 GMT -8
What this code does:This code allows you to automatically assign default avatars to users on your forum based on their Post-Rank OR their User Group The images I have in the code now are Halo-Related, but you can put in anything you like. Global Footer <script> <!-- /* Default Avatar based on Rank/Group by Malagrond
Do not repost anywhere except: [url]http://support.proboards.com[/url] [url]http://forums.smangii.com[/url] */
// Use this format: ['Rank/Group','imageURL'] // Remember to put a comma after all of them except the last one!! avatarRanks = [ ['New Member','http://wimg.co.uk/Ph9NSv.jpg'], ['Junior Member','http://wimg.co.uk/wA9DHG.jpg'], ['Full Member','http://wimg.co.uk/Atce3b.jpg'], ['Legend','http://wimg.co.uk/YmxqVb.jpg'], ['Administrator','http://wimg.co.uk/BPoT7R.jpg'] ];
// No need to edit below. if(location.href.match(/action=(display|goto|viewprofile|pmview|recent)/)) { var allC = document.getElementsByTagName("center"); for(var i=0;i<allC.length;i++){ if(allC[i].parentNode.width == "20%" && allC[i].firstChild.nodeName.toUpperCase() == "BR"){ for(var j=0;j<avatarRanks.length;j++){ if(allC[i].parentNode.innerHTML.indexOf(avatarRanks[j][0]+"<br><img src=")!=-1){ defaultAvatar = avatarRanks[j][1]; allC[i].innerHTML="<IMG SRC=\""+defaultAvatar+"\" ALT=\"[avatar]\" BORDER=\"0\">"+allC[i].innerHTML; } } } } } //--> </script>
^_^ ~Mala
|
|