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 : Pimp My Site! > Calendar Event Signups
Mottie (MVP) 10/31/2009 5:02 PM EST : Calendar Event Signups (LOTRO)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

LOTRO | Rift | Vanguard | WoW

Calendar Event Signups - LOTRO version

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.
TopBottom

Merenwench (MVP) 11/1/2009 11:22 AM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Merenwench
Posts: 2772
Zomgawsh Poster

Thanks much for the LoTRO luv!!! You are the bestest!!

TopBottom

Mottie (MVP) 11/3/2009 12:38 PM EST : Calendar Event Signups (WoW)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

LOTRO | Vanguard | WoW

Calendar Event Signups - WoW version

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.
TopBottom

Merenwench (MVP) 11/19/2009 5:19 PM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Merenwench
Posts: 2772
Zomgawsh Poster

Having an odd issue with this script now...some member's character levels are showing multiple numbers instead of a two digit number.

TopBottom

Mottie (MVP) 11/19/2009 6:18 PM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Merenwench!

Ok I think I see the problem... the script looks for your name, but it could find another name contained within another name (e.g. "Oddio" and "Oddioz"). Looking for matches is a much quicker method than getting an exact match... let me look at the script and see if I can eliminate the problem without slowing it down too much.
TopBottom

Merenwench (MVP) 11/19/2009 6:27 PM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Merenwench
Posts: 2772
Zomgawsh Poster

K...that makes alot of sense...if you can fix it cool..if not the multiple personality people with same based names, will just have to deal. LOL

TopBottom

Mottie (MVP) 11/19/2009 7:22 PM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Fixed... code above has been updated for both LOTRO and WoW
TopBottom

Merenwench (MVP) 11/20/2009 8:47 AM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Merenwench
Posts: 2772
Zomgawsh Poster

Yep...works great!! Ty much!!!!!

TopBottom

Aranethon - Gilrain (New Admin) 11/28/2009 9:42 AM EST : RE: Calendar Event Signups (LOTRO)
Aranethon - Gilrain
Posts: 64
Posts With Wolves

hi

this looks like a v nice feature to add to my lotro kin site's calendar, but im still abit of a noob and cant figure out exactly where to put the code

could you explain please
TopBottom

Mottie (MVP) 11/28/2009 9:58 AM EST : RE: Calendar Event Signups (LOTRO)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Aranethon!

To add this functionality, add a Free Form Text/HTML type Widget to your calendar page into any zone. Copy (Ctrl-C) the code above then paste (Ctrl-V) the code into the editor while in <> HTML mode. If you want to hide the code box, you can include the script from this post.
TopBottom

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