Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : LotRO > Calendar Event Signups
Mottie (SuperAdmin) 10/31/2009 4:54 PM EST : Calendar Event Signups (LOTRO)
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Calendar Event Signups - LOTRO 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).

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)
 After
 (new sort)
 

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.min.js"></script>
<script type="text/javascript">
$(function(){
    var rosterPage = [];

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

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

    var options = {
        game         : 'lotro', // name of game
        addSort      : true,
        initialSort  : [[2,0]],
        addIcons     : true,
        iconWidth    : 24,
        iconHeight   : 24,
        isUnknown    : '?',
// if unknown, this is added to the spot
        missingToons : {
            'Fred'   : [ 'Hunter', 62 ],
            'George' : [ 'Guardian', 64 ],
            'Marsha' : [ 'Warden', 65 ]
        },
        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', 65 ],
              'George' : [ 'Guardian', 64 ],
              'Marsha' : [ 'Warden', 65 ]
          }


    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:

    .cmember { } /* member column styling */
    .cstatus { } /* status column styling */
    .crole { }   /* role column styling */
    .cclass { }  /* character class (icon wrapper) */
    .loClass { } /* class text (includes parenthesis) */
    .clevel { }  /* character level text */
    .ctime { }   /* signed up column styling */
    .cadmin { }  /* admin column styling */

*NOTE* If you have a different game that you would like to do this on, please message me...

Edit (11/1/2009): Updated script to fix possible problems with roster page URL
Edit (11/3/2009): Since this script adds two columns to the signups, the header was getting messed up, so added one line to fix the header.
Edit (11/19/2009): Fixed the script to only match the exact name of the person.
Edit (5/5/2010): Updated code to add signup table sorting
Edit (7/12/2010): Updated header sort code due to a change in class formatting.
Edit (3/14/2011): Updated header sort code again due to a change in class formatting.
Edit (5/28/2011): Updated due to Character and GPUser columns being combined.
Edit (6/23/2011): Updated code to remove "Allied Guild Signups" from the table.
Edit (6/24/2011): Something changed, updated and added ability to load ally guild rosters.
Edit (6/25/2011): Got tired of editing the post... move the code into an external script. Edit (3/9/2012): Updated event-signups.js & tablesorter code.. now in GuildFiles instead of axiomfiles.com.
Edit (3/13/2012): Removed "hideRole" and "hideSignedUp" options; use css now.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 3/14/2011 9:20 AM EST : RE: Calendar Event Signups (LOTRO)
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Updated code with header sort.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 5/28/2011 10:49 AM EST : RE: Calendar Event Signups (LOTRO)
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Updated
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 6/25/2011 10:59 AM EST : RE: Calendar Event Signups (LOTRO)
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Updated again... moved the code to an external script to make it easier for me to update 
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%