Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : LotRO > Roster Icons
Mottie (SuperAdmin) 1/6/2009 5:43 AM EST : LotRO Roster Icons
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

LotRO Roster Icons

This script adds a class icon next to the class name in the roster. Add this code to your header area, footer or into a free form text/HTML box on your roster page. Make sure you switch to HTML mode () before pasting or right click in the editor and choose "Paste As Html".


GuildPortal admin site link to the original post

Code
<script type="text/javascript">
$(document).ready(function() {
 var tmp, cIcon = [];
 var iconHeight = 25;
 var iconWidth = 25;
 cIcon.push (["Burglar","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/burglar_icon64.png"]);
 cIcon.push (["Captain","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/captain_icon64.png"]);
 cIcon.push (["Champion","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/champion_icon64.png"]);
 cIcon.push (["Guardian","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/guardian_icon64.png"]);
 cIcon.push (["Hunter","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/hunter_icon64.png"]);
 cIcon.push (["Lore-master","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/lore_master_icon64.png"]);
 cIcon.push (["Minstrel","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/minstrel_icon64.png"]);
 cIcon.push (["Rune-keeper","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/runekeeper_icon64.png"]);
 cIcon.push (["Warden","http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/warden_icon64.png"]);

 var iconImg = "<img style='vertical-align:middle' height='" + iconHeight + "' width='" + iconWidth + "' src='";
 var c2 = $.map(cIcon, function(n){ return n[0] }); // grab first entry of each cIcon so $.inArray can be used
 $(".gpWidget-rosterlrg").find("tr.NormGridRow,tr.AltGridRow").find("td:gt(1)").each(function(){
  tmp = $(this).text().replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,'');
  if (tmp.length) {
   tmp = $.inArray( tmp, c2 );
   if ( tmp >= 0 ) {
    $(this).html(function(i,h){ return iconImg + cIcon[tmp][1] + "'> " + h; });
   }
  }
 })
});
</script>
Edit (3/14/2009): Fixed the LotRO guardian icon... I corrected the spelling of the image and not the URL here LOL
Edit (6/13/2010): Improved the script to reduce the number of times you cycle through the roster (prevent IE error about slow script).
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%