Jump to content


Photo

All My Leagues - MFL Scripts


17 replies to this topic

#1 theeohiostate

theeohiostate

    Veteran

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

Posted 28 September 2021 - 08:53 PM

Please use this thread to post all questions related to the MFL Live - All My Leagues 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 IF you do not already have it installed

<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"; 

 

 

 

 

 

MFL LIVE - ALL MY LEAGUES SCRIPT INSTALLATION

Read the installation steps below.  The following script creates a new report that will display all the H2H matchup live scores for all your MFL Leagues. The script will NOT display at all if you only play in 1 MFL League , however any of your league mates who do , will benefit if this is installed so they get a snap shot of all their leagues without having to go to each site.  There is a setting wheel next to the caption text you can show and hide any leagues you dont want to see , in the same popup to show/hide leagues , by each league is a drop down arrow you can select to display "Icons , Logos , Names or Abbreviations" for each league.

 

 

1. Place this in any homepage message - then use the MFL tabs setup to add to your home page tabs , or you can create a link and link directly to the message.

 

<!-- MFL LIVE - ALL MY LEAGUES HTML  -->
<div class="all_leages_wrapper" style="display:none"></div>

<!-- MFL LIVE - ALL MY LEAGUES SCRIPT  -->
<script src="https://www.mflscripts.com/mfl-apps/mflLive/script.js"></script>

 

 

 

 

 

2. Here is some CSS for the report , you can add the Dark or Light color to your css file or include in the same homepage message you installed the html/script file above.....edit the coloring as you see fit if you want a better match to your custom css... NOTE ! If using our custom template and you still have our css files linked to my server , the following styles are already included and you do not need to add them.

 

The report was designed to be displayed in one of you homepage tabs in a column no wider the 30-500px wide , if you want to display on a full width column or on a page to itself you can see this post for additional css where you can have the matchup tables display in rows and not always vertically

 

DARK COLORED SKINS

<style>
/* DARK CSS COLORING  */
.as_scores{color:var(--accent,#ff4200)}
.as_pace_box{color:lime}
.as_spacer_bottom{border-bottom:4px solid #111!important}
.all_scores_matchup input{background:#222!important;color:#999;border:1px solid #444!important}
.all_scores_matchup input:hover{background:#999!important;color:#111;border:1px solid #444!important}
.all_scores_matchup td[class*="as_winner"]{color:lime}
td.mflLive_details_pace_ahead{color:lime}
#popup-ignoreLeagues-table td.label-input input:checked+label:before,
#popup-ignoreLeagues-table span.label-input input:checked+label:before{color:lime}
#popup-ignoreLeagues-table td.label-input input+label:before,
#popup-ignoreLeagues-table span.label-input input+label:before{color:red}
td.mflLive_details_pace_behind {color:red}
#popup-ignoreLeagues-caption{color:var(--accent,#ff4200)}
#popup-ignoreLeagues-container{background:var(--site-bg-image,#111)!important}
</style>

 

 

 

LIGHT COLORED SKINS

<style>
/* LIGHT CSS COLORING */
.as_scores{color:var(--accent,#ff4200)}
.as_pace_box{color:green}
.as_spacer_bottom{border-bottom:4px solid #aaa!important}
.all_scores_matchup input{background:#fff!important;color:#777;border:1px solid #aaa!important}
.all_scores_matchup input:hover{background:#eee!important;color:#444;border:1px solid #888!important}
.all_scores_matchup td[class*="as_winner"]{color:green}
td.mflLive_details_pace_ahead{color:green}
#popup-ignoreLeagues-table td.label-input input:checked+label:before,
#popup-ignoreLeagues-table span.label-input input:checked+label:before{color:green}
#popup-ignoreLeagues-table td.label-input input+label:before,
#popup-ignoreLeagues-table span.label-input input+label:before{color:red}
td.mflLive_details_pace_behind {color:red}
#popup-ignoreLeagues-caption{color:var(--accent,#b82601)}
#popup-ignoreLeagues-container{background:var(--mobile-wrap-bg,#fff)!important}
</style>

 

 

 

 

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.

 

6. The Live Scoring page is ONLY visible during the NFL regular and post season. MFL does not provide stats or matchups during the offseason so the scoring page is not active. Week 1 of each season starts 24 hours prior to kickoff of the first game of the season. Until then the scoreboard is inactive.


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 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,904 posts
  • Gender:Male
  • Location:Leamington ON, Canada

  • 2021 MFL: 55681
  • , 18835

Posted 28 September 2021 - 09:47 PM

The cool part about this script is that you don't even have to be a member of the league and it will show all "your" matchups across all your MFL leagues so long as your are logged into MFL.

 

For example if you are logged into MFL and are in more than one league you should see all your matchups by visiting any league that has the script installed.   Check out my league and look just under chat on the left hand side.

 

https://www68.myfant...21/home/29385#0



#3 Screaming Eagle

Screaming Eagle

    Veteran

  • Members
  • PipPipPip
  • 396 posts
  • Gender:Male

  • 2021 MFL: 36134

Posted 28 September 2021 - 09:55 PM

The cool part about this script is that you don't even have to be a member of the league and it will show all "your" matchups across all your MFL leagues so long as your are logged into MFL.
 
For example if you are logged into MFL and are in more than one league you should see all your matchups by visiting any league that has the script installed.   Check out my league and look just under chat on the left hand side.
 
https://www68.myfant...21/home/29385#0


I can't wait to see this. Right now, it has a pop-up for the standings display option. Clicking off of that is a pop-up with a caption "league manager" and table header "check mark, Id, name" Is that because I'm only in one league?

#4 theeohiostate

theeohiostate

    Veteran

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

Posted 28 September 2021 - 09:59 PM

should not show at all if your in 1 league


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 !!


#5 Screaming Eagle

Screaming Eagle

    Veteran

  • Members
  • PipPipPip
  • 396 posts
  • Gender:Male

  • 2021 MFL: 36134

Posted 28 September 2021 - 10:32 PM


i need the login credentials of anyone that will share , that only has 1 MFL League , if you can pm me the details , appreciate it , so i can make sure all working for users with only 1 league , the report should not show up


I would if I could remember mine. On habmans link, it shows me the caption, settings icon, and module collapse icon. No table headers or rows. Clicking the settings icon displays the pop-up as mentioned before.

#6 theeohiostate

theeohiostate

    Veteran

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

Posted 28 September 2021 - 11:00 PM


i need the login credentials of anyone that will share , that only has 1 MFL League , if you can pm me the details , appreciate it , so i can make sure all working for users with only 1 league , the report should not show up


I would if I could remember mine. On habmans link, it shows me the caption, settings icon, and module collapse icon. No table headers or rows. Clicking the settings icon displays the pop-up as mentioned before.

 

 

Is this on mobile perhaps ?

 

Your logged in to your user account on MFL , you only have 1 single league at all your linked to , and you see the table ?


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 !!


#7 Screaming Eagle

Screaming Eagle

    Veteran

  • Members
  • PipPipPip
  • 396 posts
  • Gender:Male

  • 2021 MFL: 36134

Posted 28 September 2021 - 11:09 PM



i need the login credentials of anyone that will share , that only has 1 MFL League , if you can pm me the details , appreciate it , so i can make sure all working for users with only 1 league , the report should not show up


I would if I could remember mine. On habmans link, it shows me the caption, settings icon, and module collapse icon. No table headers or rows. Clicking the settings icon displays the pop-up as mentioned before.
 
 
Is this on mobile perhaps ?
 
Your logged in to your user account on MFL , you only have 1 single league at all your linked to , and you see the table ?

Correct. But only the table caption. No rows.
Viewport size:
800 × 1112 and
1280 × 632

#8 Screaming Eagle

Screaming Eagle

    Veteran

  • Members
  • PipPipPip
  • 396 posts
  • Gender:Male

  • 2021 MFL: 36134

Posted 28 September 2021 - 11:20 PM

Ok, after putting the code you provided on my own league, it does not display anything on my own site. The homepage module on habmans link shows a table caption though.

#9 UFFLCommish

UFFLCommish

    Veteran

  • Members
  • PipPipPip
  • 530 posts
  • Gender:Male
  • Location:TN

Posted 29 September 2021 - 11:25 AM

I don't have any HPMs available. Is it possible to add this script to the IR Alert script?



#10 theeohiostate

theeohiostate

    Veteran

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

Posted 29 September 2021 - 01:57 PM

You can put wherever you want

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 !!


#11 UFFLCommish

UFFLCommish

    Veteran

  • Members
  • PipPipPip
  • 530 posts
  • Gender:Male
  • Location:TN

Posted 29 September 2021 - 04:08 PM

Thanks. Looks great.



#12 theeohiostate

theeohiostate

    Veteran

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

Posted 30 September 2021 - 07:09 AM

You can now click on each franchise name/icon in each matchup box and get the teams roster with projections

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 !!


#13 theeohiostate

theeohiostate

    Veteran

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

Posted 30 September 2021 - 08:32 AM

We intended this report to be displayed on your home page tabs in a column no wider then 300-500px , however if you have a lot of leagues or wish to have this displayed on its own tab or page or any full width columns , you can add this css to make the tables show side by side

 

Add this css

#All_Scores_Table caption {
  margin-bottom:0px
}

td.as_spacer_bottom {
  border:0!important
}

table.all_scores_matchup_name {
  margin-top:0px
}

#All_Scores_Table {
  text-align:center
}

.all_scores_tablewrap {
  vertical-align:top;
  max-width:260px;
  display:inline-table;
  margin:10px;
  margin-top:0;
  border:1px solid #ccc;
  padding:2px
}

#body_options_247 .all_scores_tablewrap.border_none {
  border:0;
  padding:0;
  margin:0;
  width:0 
}

/* set the max-width to 2 times what you set the .all_scores_tablewrap at - example above set to 260px so set this to 520px */
@media only screen and (max-width: 520px) {
  .all_scores_tablewrap{
    margin-left:0;
    margin-right:0
  }
}

 

 

Example image

example2.jpg


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 !!


#14 kanof

kanof

    Member

  • Members
  • PipPip
  • 20 posts

Posted 03 October 2021 - 04:23 PM

Thanks, this is great.  Any way to work this into the scoreboard so I can have live scoring up and have this at the top? Maybe as an option on the mini scoreboard?



#15 theeohiostate

theeohiostate

    Veteran

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

Posted 03 October 2021 - 05:18 PM

No

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



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users