GuildPortal will be going offline (permanently) by the end of the month.
Sign Up! Login: Password: New User? Forgot? Support
Forums : DDO > DDO Roster Icons
Mottie (SuperAdmin) 1/5/2011 11:20 AM EST : DDO Roster Icons
Posts: 3884



Dungeon & Dragons Online 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


<script type="text/javascript">
 var tmp, cIcon = [];
 var iconHeight = 25;
 var iconWidth = 25;
 cIcon.push (["Barbarian",""]);       
 cIcon.push (["Bard",""]);       
 cIcon.push (["Cleric",""]);       
 cIcon.push (["Fighter",""]);       
 cIcon.push (["Monk",""]);       
 cIcon.push (["Paladin",""]);       
 cIcon.push (["Ranger",""]);       
 cIcon.push (["Rogue",""]);       
 cIcon.push (["Sorcerer",""]); 
 cIcon.push (["Favored Soul",""]);             
 cIcon.push (["Wizard",""]);       

 // Don't change anything below
 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
  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; });
Edit (6/13/2010): Improved the script to reduce the number of times you cycle through the roster (prevent IE error about slow script).
Edit (1/5/2010): Split into separate posts (removed LotRO stuff).
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems

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!