Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Voodoo Tech and Scripter's Den of Scriptniquity > Guild Roster - Hide/Show Ranks
Mottie (MVP) 5/5/2010 12:21 PM EST : Guild Roster - Hide/Show Ranks
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Guild Roster - Hide/Show Ranks

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 on multiple types of guild rosters (every roster page is different) or 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.

If I don't have your game listed below, send me a link to your roster page and I'll update this post.
 EQ2

 LotRO 
 WoW

Code

Add the code below for your specific game to a Free Form Text/HTML Widget on your Guild Roster page.
 EQ2:  <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>

 LotRO: <script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('#tblLotroRoster').hideRosterRanks({
  rosterTableRows : 'tbody tr'
 });
})
</script>

 WoW: <script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('.gpWidget-gpwowautoroster table.ContentTable').hideRosterRanks();
})
</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):

    EQ2:
    <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>


    LoTRO:
    <script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
     $('#tblLotroRoster').hideRosterRanks({
      rosterTableRows : 'tbody tr',
      rankToShowText  : "Some new Text"
     });
    })
    </script>


    WoW:
    <script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
     $('.gpWidget-gpwowautoroster table.ContentTable').hideRosterRanks({
     
    rankToShowText : "Some new Text"
     });
    })
    </script>
TopBottom

UltherDuck (New Admin) 6/3/2010 3:31 PM EST : RE: Guild Roster - Hide/Show Ranks

UltherDuck
Posts: 18
Becoming Adept!

Mottie,

This seems like a really neat feature and I would like to add it into my roster as my guild has around 150 people in it. However I am a bit confused, The roster example shown for WOW is not the one build into GP, neither is it the one that uses the wow armoury data. So where did that roster design come from? I am sorry if it should be obvious but I did have a look through the admin forums and I couldn't find it.

Also,
would it be very difficult to customize this to work with the roster design in your post titiled "Wow roster XSL and statistics"? This is the design I currently have on my page.

Thanks!

UltherDuck
TopBottom

Mottie (MVP) 6/3/2010 4:34 PM EST : RE: Guild Roster - Hide/Show Ranks
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi UltherDuck!

Actually, I just updated the WoW Roster XSL & Statistics script (if you use the Roster with statistics script)... it adds a Filter at the top of the table. Just start typing in that box and it will only show the rows that match.

But if you wanted to use this script with the WoW Roster XSL script, use the following code (follow the instructions above for more details):
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
<script type="text/javascript">

$(window).load(function(){
 $('#wowroster').hideRosterRanks({ rosterRankColumn : 6 }); // this is 6 because the XSL roster has a hidden row
})
</script>
TopBottom

Kolvarg (New Admin) 6/30/2010 12:47 AM EST : RE: Guild Roster - Hide/Show Ranks
Kolvarg
Posts: 33
Becoming Adept!

Can you show me the code to use for DDO (Dungeons and Dragons Online)?

outcastdefenders.guildportal.com

Thanks!
TopBottom

Mottie (MVP) 6/30/2010 9:04 AM EST : RE: Guild Roster - Hide/Show Ranks
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Kolvarg!

Since I don't see a Rank column in the DDO roster, I figured you could use this script to do the same thing to the class column? The only problem is the blank spaces in the class column show up in the check box list above the roster as an empty block (with a checkbox of course). Anyway, try this:

DDO Hide/Show Classes
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/hideRosterRanks-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('.gpWidget-rosterlrg table[id$=grdRoster]').hideRosterRanks({
     rosterRankColumn : 4,
  rankToShowText : "Some new Text"
 });
})
</script>
NOTE: Change the rosterRankColumn from 4 to 3 if your table has the GP User column hidden.
TopBottom

Kolvarg (New Admin) 6/30/2010 2:56 PM EST : RE: Guild Roster - Hide/Show Ranks
Kolvarg
Posts: 33
Becoming Adept!

Thanks.  This is a great feature.
TopBottom

Legend Light (Guild Admin) 8/9/2011 9:38 PM EST : RE: Guild Roster - Hide/Show Ranks
Legend Light
Posts: 179
Posts With Wolves

Hi Mottie! 

I hate to bump this old topic, but I would like to use this to hide two sections of our SuperGroup's City of Heroes roster.  (Link: http://thehouseoftera.guildportal.com/Guild.aspx?GuildID=31235&TabID=279662)


I actually would prefer to hide them altogether (skipping the option to view/un-view) but this would also be a fine fix.  I want to hide the SecLvl and Origin sections to make room for more shiny medals! 


Thanks,
TopBottom

Nahteno (New Admin) 9/5/2012 1:43 AM EST : RE: Guild Roster - Hide/Show Ranks
Nahteno
Posts: 133
Posts With Wolves

Hi Mottie,

Sorry to be a Pain but I am not to sure where to start here. I am currently trying to add a guild roster to
my GP for DAOC (dark age of camelot), Kinda new to all this we use to just use a website called gimpchimp which no longer works as Mythic has closed of its feeds about guilds and characters.

How ever i was hoping if there was some way I could just have our own one done that we manually edit.
The roster for gimp chimp does not give enough options/info for daoc just ask for server and class.
I was hoping to add something that would show all our account names and if  click on it it would bring up
a list of our characters. If it is your own account than you can edit it with in the set fields. does this make sense.
not the best at explaining this sorry.
If you look at this link this is the kinda thing i would like to see if I clicked on my account link to show
these kinda details with an edit/delete option next to each character.

Any info on this would be great Thanking

Ryan
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%