Jump to content


Photo

NFL Schedule - MFL Scripts


1 reply to this topic

#1 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 4,394 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 17 December 2020 - 04:35 PM

Please use this thread to post all questions related to the NFL Schedule script.

 

ATTENTION - ANY AND ALL SCRIPTS REQUIRE TO HAVE THIS GLOBAL CACHE SCRIPT PLACED AS THE FIRST ITEM IN YOUR HEADER MESSAGE !!! The script builds a cache for local storage and indexedDB storage in your browser to limit the API call to the MFL Server.

You only need a single copy of this  ,do not add multiple times if using multiple scripts.

<script src="https://www.mflscripts.com/mfl-apps/global/cache.js"></script>

 

See troubleshooting section at very bottom of this post before submitting a question.

 

Before installing any scripts - please review this video tutorial on how to prepare your MyFantasyLeague site for customizations.

 

Access ALL of MFLScripts here.

 

example.jpg

 

 

Most if not all of our custom scripts require the addition of a font awesome library to be loaded into a homepage message that is marked as a "Header"  OR you can import the font awesome stylesheet into your main css file , it must be the very first line in your css file. Its likely if your using any of our scripts you already have a copy loaded, so please disregard and move onto the main script installation section.

 

 

Example 1 - inserting font awesome js file into a header message

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"/> 

 

 

Example 2 - inserting font awesome into your main css file as first line in the stylesheet

@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"; 

 

 

 

 

NFL SCHEDULE SCRIPT INSTALLATION

Pace the following into any homepage message (Do not mark as a header or footer). You can place this within the tab content of your homepage or create a link and link directly to the message. We recommend linking to all scripts so they don't slow down the load time for your league mates accessing the homepage.

 

The NFL Schedule script replaces the dull MFL default NFL Schedule with a version that includes weather and team icons. You can edit the HTML provided to have the schedule shown on load or click a link to activate it.

<!-- NFL SCHEDULE HTML -->
<div id='NFL_Schedule'></div>

<!-- NFL SCHEDULE JS FILE -->
<script src="https://www.mflscripts.com/mfl-apps/schedule/script.js"></script>

 

 

 

 

 

TROUBLESHOOTING TIPS

 

1. Make sure to review the help video to check your league settings are setup so customized scripts can be used.

 

2. Recopy the code above and try again. Be sure your advanced editor is turned off.

 

3. Right click mouse on your page where script displays and click "Inspect Element" . In the browsers new popup window that displays , click on the "Console" tab. Now click on the "Errors" section. Here you will find a list of any errors that have occurred. Many errors our self explanatory and you can address yourself. If your error is showing cross site  CORS has been blocked , then you need to check every CSS, JS and IMAGE file on your site and be sure they all are using https  url and not http. Another error that appears could be "too many requests" , this happens when you refresh your site many times and MFL blocks your IP for 15 minutes for submitting too many API request. If thats the case , just wait 15-20 minutes and try again.

 

4. Check out the MFL Menu > Help section. We have added a new link here called "Manage Cache". By default we are caching the API files for our script in the browsers local storage. If you script isn't updating , you can force an update by clicking "Clear Local Storage". The next link is called "Enable IndexedDB" , this link is only meant to be used for owner that are getting the "Too Many Requests" error because there are using several scripts on several different MFL leagues that use the same serverID. Click this if needed more storage.

 

5. If the above wasn't any help , then post a question and we will do our best to help when the time allows.


All the scripts I post were created by Habman , with some small contributions from myself. The man has done an outstanding job giving the community a variety of options to enhance the site. Thank you sir !!


#2 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 4,394 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 15 January 2022 - 04:42 AM

Variable added for this script , to not run in the NFL offseason.

We are defining the NFL offseason as the day after the Superbowl until the day before the 1st preseason game the following season.

 

I will be adding variables to certain scripts so you can shut them down automatically during the offseason months so they don't run when you visit the site , this may be good for dynasty leagues to get some of the clutter or extra load times down during offseason months

 

Review this post for usage - http://forums.myfant...showtopic=38877

var schedule_offseason_hide = false;	//set to true to hide the NFL Schedule during the offseason

All the scripts I post were created by Habman , with some small contributions from myself. The man has done an outstanding job giving the community a variety of options to enhance the site. Thank you sir !!




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users