Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : WoW > Calendar Event Signups
Mottie (SuperAdmin) 1/5/2011 11:27 AM EST : Calendar Event Signups
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Calendar Event Signups - WoW version

GuildPortal admin site link to original post

This script modifies your calendar event signups so that it includes the class (text or icon, taken straight from the roster page) and character level to make it easier for raid planners to better determine their needs. I've included before and after screenshots below (with text or icons). Thanks to The Killer Carebears for using the signups so I had something to work with and post... if you want your name removed from the image I will do so upon request.

As you can see, people who are not listed in the guild roster will have an unknown class and level (displayed as a question mark).

 Before
After (icons)
 After (text)

The Code

Add the following code to a Free Form Text/HTML widget while the editor is in "RAW" mode (upper right corner)
<!--
************************************
Calendar Event Signups
-= Add character Level & Class =-
************************************ -->

<style type="text/css">
th.header {
 color: #fff;
 background: #4444EE url(http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/sort-white.gif) left center no-repeat;
 cursor: pointer;
 font-weight: bold;
 text-align: center;
 padding-left: 10px;
 border-right: 1px solid #000;
}
th.headerSortUp { background: #400000 url(http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/asc-white.gif) left center no-repeat; }
th.headerSortDown { background: #804000 url(http://i201.photobucket.com/albums/aa236/Mottie1/testsite/icons/desc-white.gif) left center no-repeat; }
.hide {display:none;}
</style>
<script type="text/javascript" src="http://www.guildportal.com/GuildFiles/258012/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="http://www.guildportal.com/GuildFiles/258012/event-signups.js"></script>
<script type="text/javascript">
$(function(){
    var rosterPage = [];

    rosterPage.push('http://guildportal.com/... myGuildRosterPage');

    // remove "//" from start if you want to add
an ally guild
    // rosterPage.push('http://guildportal.com/... myAllyGuildRosterPage');

    var options = {
        game         : 'wow', // name of game
        addSort      : true,
        initialSort  : [[2,0]],
        addIcons     : true,
        hideRole     : true,
        hideSignedUp : false,
        iconWidth    : 24,
        iconHeight   : 24,
        isUnknown    : '?',
// if unknown, this is added to the spot
        missingToons : {
            'Fred'   : [ 'Hunter', 85 ],
            'George' : [ 'Warlock', 84 ],
            'Marsha' : [ 'Warrior', 85 ]
        },
        roster       : rosterPage // don't change this
    };
    $.eventsignups(options);
});
</script>
Customizing
  • You must add a "rosterPage" that points to your guild site's roster page (replace the URL in orange). You can add additional (no limit) roster pages of alliance guilds to include their information.
    rosterPage.push('http://guildportal.com/... myGuildRosterPage');
  • To add a table sort, set the "addSort" to true, then adjust the "initialSort" as desired.
    addSort      : true,
    initialSort  : [[2,0]]
    The sort order is set inside of the square brackets as follows: [ column, direction ] where "column" starts counting from the left at zero and direction of "0" is an ascending sort (a to z) while "1" is a descending sort (z to a). You can add more columns to sort by including it inside the outer square bracket, like this:
    [ [2,0], [4,0] ]

    Column: 0 = GP User, 1 = Class, 2 = Status, 3 = Level, 4 = Role, 5* = Signed Up (this column becomes 4 if the Role column is hidden)

  • Choose to include icons in the signup by setting the "addIcons" variable to true. If false, it will display the class as text.

    var addIcons = true;

  • Set "hideRole" or "hideSignedUp" to false to hide either, or both, of these columns.

  • If using icons, you can set their height and width with the "iconWidth" and "iconHeight" variables.
    iconWidth  : 24;
    iconHeight :
    24;
  • Set "isUnknown" to whatever you want it to display if the character isn't found in the roster. It is "?" by default.

  • Add characters not found in any roster to the "missingToons" variable as follows: "Name" : [ "Class" : level ]

          missingToons : {
              'Fred'   : [ 'Hunter', 85 ],
              'George' : [ 'Warlock', 84 ],
              'Marsha' : [ 'Warrior', 85 ]
          }


    Make sure that each line ends with a comma (except the last one, or IE will break)

  • It really shouldn't be necessary to use the CSS classes I added, but if you want to adjust the background color or size of those columns or text, you can add the following classes to your stylesheet:

    .cclass {  }  /* character class (icon wrapper) */
    .loClass { } /* class text (includes parenthesis) */
    .clvl { }       /* character level text */
Edit (11/19/2009): Fixed the script to only match the exact name of the person.
Edit (4/20/2010): Updated to work with the WoW Auto Roster.
Edit (6/1/2010): Added a version that works with WoW XML/XSL Roster.
Edit (6/6/2011): Updated to work with new wow roster
Edit (6/28/2011): Updated - moved code to an external file.
Edit (3/9/2012): Updated to work with status dropdowns
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Lakshmii (Applicant) 6/28/2011 7:05 AM EST : RE: Calendar Event Signups
Lakshmii
Posts: 5066

0
Like

0
Dislike

Hi

This is quite useful!


But, first, it seems to initially load the page up with the original display and then it changes to the new display...is this jst cos my browser isnt "used" to it yet? Or something thats a bit buggy?

Second, the class column isnt actually showing any icons (or info at all - its just blank) even though i did change the roster URL to our own roster page.

Lastly, the user name and character name columns dont seem to be working properly - Its just displaying as

GP User
Lakshmii (as Sheira)

rather than having them in 2 seperate columns.

Not sure what i have missed.

Thanks!


Oh, the web address is http://soulcrusaders.guildportal.com
TopBottom

Mottie (SuperAdmin) 6/28/2011 10:01 AM EST : RE: Calendar Event Signups
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Lakshmii!

Sorry! I finally got around to updating the code... I moved most of it into an external file, so just copy and replace what you have with the above. I've also added a way to add characters not listed in the roster or add people from ally guilds.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Lakshmii (Applicant) 6/28/2011 12:04 PM EST : RE: Calendar Event Signups
Lakshmii
Posts: 5066

0
Like

0
Dislike

great, thanks! the icons are now displaying properly

But the user and character columns are still merged - or rather, there is only a user column with "as (character name)" added to it. This bit is still rather messy

Im not sure if some other script on the site might be interfering with this new setup or if i have missed something?

...I just noticed that the "role" column has disappeared too

http://soulcrusaders.guildportal.com

...lol sorry to be a pain, but i can't figure out how to hide the "admin" column either. I couldnt quite understand the customising bit relating to the columns!
TopBottom

Mottie (SuperAdmin) 6/28/2011 4:46 PM EST : RE: Calendar Event Signups
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Lakshmii!

You know that the merging of the user and character column was done by GP and not me right? I guess I could try to split them... o.O

The role is missing because you probably kept the default settings:
hideRole     : true,
just set that to false and you should be fine 

and as for the admin column, you know only you can see that right? I don't have a way to hide it, but I can add it if you want.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Lakshmii (Applicant) 6/29/2011 2:20 AM EST : RE: Calendar Event Signups
Lakshmii
Posts: 5066

0
Like

0
Dislike

DOH about the hiderole set to true I evend ouble checked this... just didnt quite click on the "HIDE" part 

Yes, I assumed GP had merged the two, but also took it for granted that the pics in your post were still relevant. I didnt even think to check the date tbh!

Ah well, that will have to do then, dont worry about adding more code I just liked how neat it is in the pics you posted

I didn't realise only I can see the admin column. Thats ok then

Thanks a lot for the help as usual
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%