Jump to content


theeohiostate

Member Since 20 Nov 2006
Offline Last Active Private

Topics I've Started

Commissioners Ability script updated

15 February 2020 - 07:21 PM

Habman has Updated this to work for 2020

 

Reference thread - http://forums.myfant...showtopic=35603

 

 

PLACE THE FOLLOWING IN A HEADER MESSAGE - BE SURE TO SET VAR FOR "SetHPMability" for where you install the script file commissioner.js
<script>

var SetHPMability = 18; // Set HPM# of where you you installed commissioner abilities script

jQuery('.myfantasyleague_ menuMobile ul li:contains("For Commissioners") a:contains("Setup")').parent().before('<li><a class="no-sub" href="' + baseURLDynamic + '/' + year + '/home/' + league_id + '?MODULE=MESSAGE' + SetHPMability + '">Custom Abilities</a></li>');
jQuery('.myfantasyleague_menu ul li:contains("For Commissioners") a:contains("Setup")').parent().before('<li><a class="no-sub" href="' + baseURLDynamic + '/' + year + '/home/' + league_id + '?MODULE=MESSAGE' + SetHPMability + '">Custom Abilities</a></li>');
jQuery('head').append('form[action="csetup"],div[id^="csetup_"] .weekly-navbar,div[id^="csetup_"] .weekly-navbar-mobile,div[id^="csetup_"] .reportnavigation{visibility:hidden}');
</script> 

 

 
 
PLACE THE FOLLOWING IN A HOMEPAGE MESSAGE
<h3>FOR COMMISSIONERS > CUSTOM ABILITIES</h3>
<div id="commishContainer" style="text-align:center"></div>


<script src="//www.nitrografixx.com/MFL-Abilities/commissioner.js"></script> 

 


Report Issues

04 February 2020 - 02:51 PM

Might as well get this thread going

 

with MFL updates looming , might have some scripts break , so regardless of the script , make a post here if you happen to notice anything no working properly and we will take a look and get it fixed.


MFL Live Scoring - REDUX

14 November 2019 - 10:07 AM

Habman and myself decided to update the MFL default live scoring page and use the existing hmtl and data it provides , while giving it a little makeover and a few updates.

 

Demo - H2H League - https://www63.myfant...ajax_ls?L=43570

Demo - All Play - http://www51.myfanta...ajax_ls?L=79291

 

 

1. Be sure to have a copy of jQuery library and font awesome in your header message. If already using other scripts created , you may already have this. But double check....

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> 

 

 

2. Place this in your header message

<script>
//THIS NEEDS TO BE PLACED IN HEADER AND IS USED TO GO BACK IN HISTORY FOR MFL'S LIVE SCORING
if(document.getElementById("body_ajax_ls")) {
	var ls_liveScoringWeekCheck = parseInt(location.href.substr( location.href.indexOf("W2=")+3 , 2 ));
	if(ls_liveScoringWeekCheck>0&&ls_liveScoringWeekCheck<liveScoringWeek) {
		liveScoringWeek = parseInt(location.href.substr( location.href.indexOf("W2=")+3 , 2 ));
	}
}
</script>

 

 

3. Place the following in a footer message (THERE ARE 2 SCRIPTS IN THIS SECTION ONLY INSTALL THE ONE THAT DESCRIBES YOUR LEAGUE - H2H or ALL PLAY)

<script>
var ls_scoreboardName = "LEAGUE SCOREBOARD";   //enter text to name your scoreboard
var showTeamName = false;                      //set to true to display franchise names in scoreboard header
var showTeamIcon = true;                       //set to true to display franchise icons in scoreboard header
var ls_includeProjections = true;              //set to true to display projections next to player scores
var ls_includeInjuryStatus = true;             //set to true to display injury status as per the norm
var ls_excludeIR = true;                       //set to true to remove players on fantasy IR
var ls_excludeTaxi = true;                     //set to true to remove players on taxi squad
var ls_popup_abbrev_name_icon = 2;             // -1=disable; 0=abbrev; 1=name; 2=icon
var ls_orig_proj_when_final = true;            //set true to change pace to projection when games go final
var ls_popup_status = true;                    //set true to add status of player to popup
var ls_box_abbrev_name_icon = 2;               //0=abbrev; 1=name; 2=icon; 3=icon+abbrev; 4=icon+name
var ls_hide_bye_teams = false;                 //set to true to hide boxscore matchup teams on bye weeks
</script>

<!-- MFL LIVE SCORING SCRIPT H2H LEAGUES --> 
<script src="//nitrografixx.com/MFL-Scoreboard/mfl_ls_scoring.js?v=v=1.0.6"></script> 

<!-- MFL LIVE SCORING SCRIPT ALL PLAY LEAGUES --> 
<script src="//nitrografixx.com/MFL-Scoreboard/mfl_ls_scoring_allplay.js?v=1.0.6"></script>  

 

 

4. Here are links to the CSS file used to format and color it , copy and paste it in your main css file. Make color edits if needed. Find color changes in section that is labeled   "/* MFL SCORING COLOR CHANGES */"

 

H2H Dark version - css file

H2H Light version - css file

 

ALL PLAY Light version - css file

 

NOTE: Please keep js file linked to my server - there will be some minor updates soon. I will post if any css needs updated

If js file is update , i will post here. Then please increase the version number in the end of the js file url to 2,3,4,5 and so on......v=1


CSS for mobile Transactions page , module and previously processed waiver

25 October 2019 - 10:37 AM

Following CSS will make the Transaction page/module , Draft Picks Page and Previously Processed Waivers pages all mobile friendly.

Those page are pretty jacked up and cramped on mobile , so this will make things much more fluid to read.

 

Demo - view on mobile

waivers -  https://www63.myfant...ns?L=43570&O=03

draft results - https://www63.myfant...ns?L=43570&O=17

 

 

last segment of css has optional coloring for some bg and border , you may or may not want / need to use the coloring . All other css should pretty well conform to your site , provided you dont have any existing css that is overriding what i have.

 

@media (max-width:650px){
/*  NO NEED TO EDIT - format css for transactions module , transactions page and previous processed waivers page  */
 #body_options_03 table.report .rank,#transactions .rank,#body_options_17 table.report .rank+.rank
   {display:none!important}
 #body_options_03 table.report table, #body_options_03 table.report tbody, #body_options_03 table.report th, #body_options_03 table.report td, #body_options_03 table.report tr,
 #transactions table, #transactions tbody, #transactions th, #transactions td, #transactions tr,#body_processed_waivers table.report table, #body_processed_waivers table.report tbody, 
 #body_processed_waivers table.report th, #body_processed_waivers table.report td, #body_processed_waivers table.report tr,
 #body_options_17 table.report table, #body_options_17 table.report tbody, #body_options_17 table.report th, #body_options_17 table.report td, #body_options_17 table.report tr,
 #body_options_133 table.report table, #body_options_133 table.report tbody, #body_options_133 table.report th, #body_options_133 table.report td, #body_options_133 table.report tr
   {display:block}
 #body_options_03 table.report th,#transactions th,#body_processed_waivers table.report th,#body_options_17 table.report th
   {position:absolute;top:-9999px;left:-9999px}
 #body_options_03 table.report td,#transactions td,#body_processed_waivers table.report td,#body_options_17 table.report td
   {position:relative;text-align:left!important}
 #body_options_03 table.report td:before,#transactions td:before,#body_processed_waivers table.report td:before,#body_options_17 table.report td:before
   {position:absolute;left:6px;padding-right:5px;white-space:nowrap}
 #body_processed_waivers table.report td:nth-of-type(6)
   {display:block;min-height:36px}
 #body_options_03 table.report td,#transactions td,#body_processed_waivers table.report td,#body_options_17 table.report td
   {padding-left:110px!important;padding:5px 0;width:100%!important}
 #body_processed_waivers table.report td
   {padding-left:150px!important}
 #body_options_17 table.report td textarea
   {width:100%}

 /*  Set heights to scroll on mobiles  */
 #body_options_17 div.mobile-wrap,#body_processed_waivers div.mobile-wrap,#body_options_03 div.mobile-wrap
   {max-height:350px}

 /*  NO NEED TO EDIT - name for each td on transactions page and module  */
 #body_options_03 table.report td:nth-of-type(2):before,#transactions td:nth-of-type(2):before
   {content: "Franchise"}
 #body_options_03 table.report td:nth-of-type(3):before,#transactions td:nth-of-type(3):before
   {content:"Type"}
 #body_options_03 table.report td:nth-of-type(4):before,#transactions td:nth-of-type(4):before
   {content:"Transaction"}
 #body_options_03 table.report td:nth-of-type(5):before,#transactions td:nth-of-type(5):before
   {content:"Date"}

 /*  NO NEED TO EDIT - name for each td on previous processed waivers page  */
 #body_processed_waivers table.report td:nth-of-type(1):before
   {content: "Round/Group"}
 #body_processed_waivers table.report td:nth-of-type(2):before
   {content: "Franchise"}
 #body_processed_waivers table.report td:nth-of-type(3):before
   {content: "Player(s) Added"}
 #body_processed_waivers table.report td:nth-of-type(4):before
   {content:"Player(s)"}
 #body_processed_waivers table.report td:nth-of-type(5):before
   {content:"Original Request"}
 #body_processed_waivers table.report td:nth-of-type(6):before
   {content:"Reason Not Granted"}

 /*  NO NEED TO EDIT - name for each td on draft results page and module  */
 #body_options_17 table.report td:nth-of-type(1):before
   {content: "Pick"}
 #body_options_17 table.report td:nth-of-type(3):before
   {content:"Franchise"}
 #body_options_17 table.report td:nth-of-type(4):before
   {content:"Selection"}
 #body_options_17 table.report td:nth-of-type(5):before
   {content:"Date/Time"}
 #body_options_17 table.report td:nth-of-type(6):before
   {content:"Points"}
 #body_options_17 table.report td:nth-of-type(7):before
   {content:"Comments"}

 /*  NO NEED TO EDIT - name for each td on draft results page and module  */
 #body_options_17 div.mobile-wrap:last-of-type table.report td:nth-of-type(1):before
   {content: "Franchise"}
 #body_options_17 div.mobile-wrap:last-of-type table.report td:nth-of-type(2):before
   {content:"Total Wait Time"}
 #body_options_17 div.mobile-wrap:last-of-type table.report td:nth-of-type(3):before
   {content:"Avg. Wait Time"}
 #body_options_17 div.mobile-wrap:last-of-type table.report td:nth-of-type(4):before
   {content:"# Of Picks"}

 /*  OPTIONAL CSS FOR COLOR - EDIT HERE - MAY NOT NEED THESE AT ALL AND CAN DELETE  */
 #body_options_03 table.report tr:nth-child(even),#transactions tr:nth-child(even),#body_processed_waivers table.report tr:nth-child(even),#body_options_17 table.report tr:nth-child(even),#body_options_133 table.report tr:nth-child(even),#trade_bait tr:nth-child(even)
   {background: rgba(0, 0, 0, .2)!important}
 #body_options_03 table.report tr,#transactions tr,#body_processed_waivers table.report tr,#body_options_17 table.report tr
   {border-bottom:8px solid #151515}
 #body_options_03 table.report td,#transactions td,#body_processed_waivers table.report td,#body_options_17 table.report td
   {border-bottom:1px solid #111}
}

Responsive Calendar

19 October 2019 - 10:18 PM

Anyone interested , i have made the MFL Monthly Calendar , mobile friendly

 

Demo - https://www63.myfant...s?L=43570&O=123

Demo 2 - https://www60.myfant...s?L=37577&O=123

 

 

 

Be sure to have a copy of jQuery library and Font Awesome library in header message

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="//use.fontawesome.com/6ccd97559b.js"></script>

 

 

Place following script in footer message 

// Monthly Calendar
jQuery('head').append('<style>.cal-event-desc li:before{content:\"\\f005\";font-family:FontAwesome;display:inline-block;width:16px}.cal-wrap{display:none}#calendar{width:100%;display:grid;grid-template-columns:repeat(7,1fr)}#calendar tr,#calendar tbody{grid-column:1 / -1;display:grid;grid-template-columns:repeat(7,1fr);width:100%}#calendar caption{grid-column:1 / -1;margin-bottom:60px}#calendar td,#calendar th{box-sizing:border-box}#calendar .weekdays th{text-align:center;text-transform:uppercase}#calendar td{display:flex;flex-direction:column}#calendar .day{position:relative}#calendar .month_header{position:relative;font-size:20pt}#calendar .month_header th{position:absolute;left:0;right:0;font-size:24pt;top:-52px;line-height:40px}#calendar .month_header th a{position:absolute;text-decoration:none;font-size:0;color:transparent}#calendar .month_header th a[title="Previous Month"]{left:20px}#calendar .month_header th a[title="Next Month"]{right:20px}#calendar .month_header th a[title="Next Month"]:before,#calendar .month_header th a[title="Previous Month"]:before{font-family:FontAwesome;position:absolute;top:0;font-size:30px;cursor:pointer}#calendar .month_header th a[title="Next Month"]:before{content:\"\\f054\";right:-10px}#calendar .month_header th a[title="Previous Month"]:before{content:\"\\f053\";left:-10px}#calendar .date{text-align:center;margin-bottom:5px;width:30px;height:30px;line-height:30px;border-radius:50%;flex:0 0 auto;align-self:flex-end;font-weight:700}#calendar .date a{position:absolute;left:2px;top:2px}.cal-event{flex:0 0 auto;font-size:13px;border-radius:4px;padding:4px 0px;text-decoration:none;margin:2px 0}.cal-event-desc{padding:5px}#calendar td{border-style:solid;border-left-width:1px;border-bottom-width:1px;border-top:0;border-right-width:0}@media(max-width: 768px){.cal-wrap{display:block}.scoll-div{height:350px}#calendar .weekdays,#calendar .other-month{display:none}#calendar,#calendar tr,#calendar tbody{grid-template-columns:1fr}#calendar tr{grid-column:1 / 2}#calendar .date{align-self:flex-start}#calendar .date a{right:2px;left:auto}#calendar td.first-td{border-style:solid;border-top-width:1px}#calendar td{border-right-width:1px}}</style>');
jQuery('#monthly_calendar').attr('id','calendar');
jQuery('#calendar').parent('div').addClass('scoll-div');
jQuery('#calendar .day_of_week_header').attr('class', 'weekdays');
jQuery('#calendar .weekdays th').attr('scope','col');
jQuery('#calendar tr.oddtablerow,#calendar tr.eventablerow').removeClass('eventablerow').addClass('dayrows oddtablerow');
if ( $('#calendar .dayrows td').hasClass('today') ) { 
    $('#calendar .dayrows td').addClass('other-month'); 
}else{
    $('#calendar .dayrows td').attr('class', 'other-month');
}
jQuery('#calendar .dayrows td.other-month:has("div.calendarday")').removeClass('other-month').addClass('day');
jQuery('#calendar td.day:first').addClass('first-td');
jQuery('#calendar td.day').removeAttr('valign');
jQuery('#calendar div.calendarday').addClass('date');
jQuery('#calendar .day ul li').wrap('<div class="cal-event"><div class="cal-event-desc"></div></div>');
jQuery('#calendar .day .cal-event').unwrap();
jQuery('#calendar .day .cal-event-desc li').css('list-style', 'none');

jQuery('#calendar .date').html(function (i, html) {
    return html.replace(/&nbsp;/g, '');
});
jQuery('#calendar .month_header th:last-of-type').remove();
jQuery('#calendar .month_header th').html(function(i, currHtml) {
  return currHtml
    .replace('Jan', 'JANUARY')
    .replace('Feb', 'FEBRUARY')
    .replace('Mar', 'MARCH')
    .replace('Apr', 'APRIL')
    .replace('May', 'MAY')
    .replace('Jun', 'JUNE')
    .replace('Jul', 'JULY')
    .replace('Aug', 'AUGUST')
    .replace('Sep', 'SEPTEMBER')
    .replace('Oct', 'OCTOBER')
    .replace('Nov', 'NOVEMBER')
    .replace('Dec', 'DECEMBER');
});
jQuery('#calendar .day:not(:has(div.cal-event))').each(function(index) {
        $(this).append('<div class="cal-event"><div class="cal-event-desc" style="font-style:italic"><li style="list-style:none">No Events Today</li></div></div>');
});
jQuery('.calendarday.date a').html('<i class="fa fa-plus-square" aria-hidden="true"></i>');
jQuery('#body_options_123 h3').remove();
// Monthly Calendar Todays Event Table Calendar
jQuery.get(baseURLDynamic + "/" + year + "/options?L=" + league_id + "&O=123", function (data) {
		jQuery('#monthly_events ul li').wrap('<div class="cal-event"><div class="cal-event-desc"></div></div>');
		jQuery('<div class="mobile-wrap cal-wrap"><table class="report" id="monthly_events" align="center" cellspacing="1"><caption><span>Todays Calendar Events</span></caption><tbody><tr class="oddtablerow"><td class="cal_append"></td></tr></tbody></table></div>').insertBefore(jQuery('#calendar').closest('div.mobile-wrap') );
		jQuery(data).find('#monthly_calendar td.today ul').appendTo('#monthly_events td.cal_append');
		jQuery('#monthly_events ul li').wrap('<div class="cal-event"><div class="cal-event-desc"></div></div>');
		jQuery('#monthly_events .cal-event').unwrap();
		jQuery('#monthly_events .cal-event-desc li').css('list-style', 'none');
		jQuery("#monthly_events .cal_append:empty").append('<div class="cal-event"><div class="cal-event-desc" ><li style="list-style:none">No Events Today</li></div></div>');
		jQuery('#calendar,#monthly_calendar').css('visibility', 'visible');
		jQuery('.cal-event li a[title|="Delete This Calendar Event"]').parent('li').addClass('remove_char');
		jQuery('.remove_char').each(function (index, value){
			var char_rep = $(this),
			result= char_rep.html().replace(/\(|\)/g, '');
			char_rep.html(result);
		});
	jQuery('.cal-event-desc .remove_char a').html('<i style="color:#da3636" class="fa fa-times-circle" aria-hidden="true"></i>');
});

 

 

Here is css needed to style it - ADD THIS TO YOUR UPLOADED CSS SHEET

/*******************************************/
/*        CUSTOM MONTHLY CALENDAR          */
/*******************************************/
#calendar,#monthly_calendar{visibility:hidden}
#calendar .today,#calendar .today:last-of-type{border:3px dotted #da3636} /* Border to todays date - color it accent color of site */
#calendar th{border:1px solid #111;border-right:0}
#calendar th:last-of-type{border-right:1px solid #111}
#calendar td{border-color:#111}
#calendar td:last-of-type{border-right:1px solid #111}
#calendar .date{background:#000}
/* Previous and Next month arrows */
#calendar .month_header th a[title="Next Month"]:before,#calendar .month_header th a[title="Previous Month"]:before{text-shadow: 0 0 5px rgba(0,0,0,.5);color: #333}
#calendar .month_header th a[title="Previous Month"]:hover:before,#calendar .month_header th a[title="Next Month"]:hover:before{color:#ccc}
.cal-event{background:rgba(0,0,0,.2);border:1px solid #111}
/* Mobile */
@media(max-width: 768px) {
#calendar td.first-td{border-top-color:#111}
}