Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Roster > Changing the Default Roster
Nahteno (Applicant) 9/11/2012 10:54 PM EST : Changing the Default Roster
Nahteno
Posts: 133

0
Like

0
Dislike

Good Morning Mottie, I have been trying to make a customize roster for my DAOC site looks harder than i thought, I have noticed you have customized alot of apps/widgets .

So was hoping if I could customize the daoc roster one at all. It gives me 7 different options Character Name, GP user, Class, level, Master Level, Master Level Path, Race.
GP user is just account, Class and Race get selected from drop down box, but Level , Race, Master Level, Master Level path are all edit box's So can enter any details.
I was hoping to be able to change the field names EG. Level to Level / Realm Rank and Class to Realm/Class . Master level to Master level / Path and than change
Master Level Path to Server name or something as an example. Do you think this is possible.

Im kinda new to all this but any help or adivce you could give me would be great.
here is my site

http://www.guildportal.com/Guild.aspx?GuildID=44224&TabID=3971340

thanks again I have enjoyed reading alot of your info for ideas etc.

Thanking you

Ryan





TopBottom

Mottie (SuperAdmin) 9/12/2012 6:18 AM EST : RE: Changing the Default Roster
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi Nahteno!

Yes, it would be possible, but you asked to change "Class" to "Realm/Class" which while I can provide code to change the header, I don't think I can modify the data in the selector. You can add this code to your custom scripts (Control Panel > Custom HTML & Script > Custom JS/JQuery > Additional Functions). Only change the column names in blue. The one thing this script can't do is change the names in the popup or separate windows (Profile, Update your characters or Edit).
$(function(){
    var columnNames = {
        "Character Name"    : "Name",
        "GP User"           : "GP Name",
        "Class"             : "Realm / Class",
        "Level"             : "Level / Realm Rank",
        "Master Level"      : "Master Level / Path",
        "Master Level Path" : "Server Name",
        "Race"              : "Race"
    }

    // Don't change anything below
    ,roster = $('.gpWidget-rosterlrg'),h1,h2;
    if (roster.length) {
        h1 = roster.find('table.StyledList th');
        h2 = roster.find('table[id*=_tblInputs] > tbody > tr');
        for (v in columnNames) {
            if (columnNames.hasOwnProperty(v)) {
                h1.filter(':containsExact(' + v + ')').html(columnNames[v]);
                h2.find('td:containsExact(' + v + ')').html(columnNames[v]);
            }
        }
    }
});
$.extend( $.expr[":"], {
    containsExact: $.expr.createPseudo ?
        $.expr.createPseudo(function(text) {
            return function(elem) {
                return $.trim(elem.innerHTML.toLowerCase()) === text.toLowerCase();
            };
        }) :
        // support: jQuery <1.8
        function(elem, i, match) {
            return $.trim(elem.innerHTML.toLowerCase()) === match[3].toLowerCase();
        }
});
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Nahteno (Applicant) 9/12/2012 7:46 PM EST : RE: Changing the Default Roster
Nahteno
Posts: 133

0
Like

0
Dislike

Thank you so much that helps out heaps thanks for your quick reply.

I dont want to mess around to much but is it possible to change the order of the columns , make  acount (gp account) first colum etc.  als with the preset fields can you add names to that or modif them for the class and race one.
If not thats cool as I am pretty happy with what you have enabled me to do .

Thanks again

nahteno
TopBottom

Mottie (SuperAdmin) 9/16/2012 4:37 PM EST : RE: Changing the Default Roster
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi Nahteno!

Yeah it would be possible to change the column order, but honestly it's kind of a pain with the all of the stuff that needs to be done. You know you can click on any of those table headers to sort the table by that column?
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Nahteno (Applicant) 9/16/2012 7:34 PM EST : RE: Changing the Default Roster
Nahteno
Posts: 133

0
Like

0
Dislike

Yer all is good thanks again for your help Its working well and guild members are starting to enter their info again cheers.
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%