Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : EQ2 > Guild Roster - Hide/Show Ranks
Mottie (SuperAdmin) 5/5/2010 12:19 PM EST : Hide/Show Guild Roster Ranks
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Guild Roster - Hide/Show Ranks

GuildPortal admin site link to the original post

I made this script because some guild rosters are huge and unwieldly. Basically it adds some check boxes above your roster table. You can then check (shows rank) or uncheck (hides rank) to show/hide the row with that particular rank. I've made the script relatively general, so it should work if you want to use this script to do the same to the class.

The actual rank names are extracted from the table itself, so there is no need to define them.



Code

Add the code below to a Free Form Text/HTML Widget on your Guild Roster page.
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('#tblEq2Roster').hideRosterRanks({
  rosterRankColumn : 2
 });
})
</script>

Customizing
  • Roster Table: The code in blue targets the specific roster table, so don't change it at all.
  • Rank Column: The rank column varies from table to table, by default the code targets the 4th column (start counting the first column as column zero). As you can see for the EQ2 table, the rank is shown in the 3rd column ( remember it starts with column zero, so we use 2 instead of 3 ).

    Lets say you want to add this selector to hide/show the class names, then all you need to do is change the column number, and the label text (below).

  • Rank Text: The check boxes are added to a row that starts out with "Rank to Show:". You can change this text using the "rankToShowText" variable. I'll include several examples so you know how to do this. Make sure you add a comma between each variable set (added in bold green below):

    <script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
     $('#tblEq2Roster').hideRosterRanks({
      rosterRankColumn : 2
    ,
      rankToShowText   : "Some new Text"
     });
    })
    </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%