Jump to content


Photo

Monday Night Report Home Page Module


This topic has been archived. This means that you cannot reply to this topic.
93 replies to this topic

#1 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 24 September 2007 - 04:33 PM

onei0087 gave me an idea last week to work on a Monday Night application.

Well I think I've got it working.

Basically what it does it reports on each matchup for Monday night in a table format.

It will automatically display itself on Mondays and hide itself on other days.




Here is the code:

<script language="JavaScript" type="text/javascript">
<!--
// FYI: Last updated August 29, 2008

// Start Monday Report manually
   var mondayReportClickToStart = false;

//If you wish to use icons from previous iframe apps
   var useOldMondayIconMethod = false; 

//Icon URL including base name and extension
   var mondayReportIconURL = ''; 
   var mondayReportIconExt = 'gif'; 

//Use league icons as default images  
   var mondayReportDefaultIcon = false; 

//Use league logos as default images  
   var mondayReportDefaultLogo = false; 

//Set number of scoring decimals
  var mondayReportDecimals = 0;

// Main Title for report
   var mondayReportTitle = "Monday Night Report";
// Title for games that are completed
   var mondayReportTitle1 = "In the Books";
// Title for games where team has won but still has players playing
   var mondayReportTitle2 = "Rubbing it In";
// Title for games that are still undecided
   var mondayReportTitle3 = "Ain't Over Yet";

//This will bypass the Monday check and always display the report
  var mondayReportAlwaysOn = false;

//Franchise Name or Nickname display
  var hideMondayTeamName = false; 
  var useMondayNickNames = false; 

//Set up your Nick names here if you choose to use them
   var franchiseNickNames = new Object();  
   franchiseNickNames['0001'] = 'NICK 1';  
   franchiseNickNames['0002'] = 'NICK 2';  
   franchiseNickNames['0003'] = 'NICK 3';  
   franchiseNickNames['0004'] = 'NICK 4 ';
//		 .
//		 .
//		etc. 


//-->
</script>

<style type='text/css'>

#inTheBooks, #rubbingItIn, #aintOverYet  {
  width: 100%;
}

#home #inTheBooks caption , #home #rubbingItIn caption, #home #aintOverYet caption {
  width: 100%;
}

.mondayTeam {
  text-align: center;
}

.mondayScore {
  text-align: center;
}

.mondayWinner {
  font-weight: bold;
}

.mondayLoser {
  font-style: italic;
}

.mondayTied {
}

.mondayAtSymbol {
  text-align: center;
}

.mondayYTP { /* Yet to play */
  text-align: center;
}

.mondayIcon {
  height:; /* Use #px for fixed width i.e. 100px */
  width:;  
}

.mondayNightClick {
}

</style>

<script language="JavaScript" type="text/javascript" src="http://www.habman.com/mfl/apps/js/habman_common.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.habman.com/mfl/apps/js/mondaynight.js"></script>


Just copy and paste it into a home page message (with the advanced editor turned OFF).
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#2 Brute Squad

Brute Squad

    Veteran

  • Members
  • PipPipPip
  • 1,788 posts

Posted 24 September 2007 - 05:55 PM

Very cool.

I do this same report manually for my main league. I also include statements like "Team A needs XX points from player(s) to beat Team B", or "Team A needs player(s) to OUTSCORE player(s) by XX points to beat Team B". Occasionally I include the involved players's averages to show how likely it is that Team A or Team B will win. And sometimes I even categorize the outcomes as "Likely", "Unlikely", "Extremely Unlikely", etc.

But again, very cool...thanks for coding it!
www.jorgalink.com

#3 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,647 posts

Posted 24 September 2007 - 08:07 PM

Pretty slick. I've got in on my home page now. There is some alignment issues but looks good overall. Hopefully you'll see this before the game is over so you can check on that.

I'd make the inner tables 100% width of the outer table so that it fills it.
Same with the height.


 


#4 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,647 posts

Posted 24 September 2007 - 08:12 PM

Also it's showing players on the bench, not just started players. Wasn't sure if that were the intent but thought I'd mention it. I'd personally like to see starters only.


 


#5 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,647 posts

Posted 24 September 2007 - 08:16 PM

Sorry, one more thing I noticed. There is a matchup that is over but it's still showing up under it "ain't over yet" section. It's the last matchup. I think it's because there is one bench player tonight on the one team, but curiously that bench player doesn't show up in the module unlike the others. I'm guessing the bench players only show up if a starter is also present.

So I'd suggest the script look and see if there are any starters left, if not then call the game as over.


 


#6 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,647 posts

Posted 24 September 2007 - 08:25 PM

An owner noticed that the players are being reported on the wrong teams.

I've taken a screen shot and I can detail the teams tomorrow at some point if needed. No transactions happen in my league until Thursday so you can inspect rosters as needed.

Posted Image


 


#7 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 24 September 2007 - 08:43 PM

Hi bonscott

I notice you took the script off your home page. The script is supposed to show only starters.

If you could put it back up so I could take a look that would be great.

Thanks.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#8 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,647 posts

Posted 24 September 2007 - 09:38 PM

Ok, it's back up.

Looks like it's just showing starters now and on the correct teams.

That last matchup on the bottom was over yesterday however. One team has a bench player going tonight but that's it, no starters.


 


#9 roughrider

roughrider

    Veteran

  • Members
  • PipPipPip
  • 79 posts

Posted 25 September 2007 - 11:20 AM

is there a way to change a code to see box after monday just to view? thx

Monday Night Report is not showing up is it because its after monday?

#10 onei0087

onei0087

    Veteran

  • Members
  • PipPipPip
  • 823 posts

Posted 25 September 2007 - 03:09 PM

Thanks Habman its great to see my ideas that I can crank out in PHP get a Habman treatment so the rest of the leagues can use them.
Used to be useful.

#11 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 26 September 2007 - 06:40 AM

is there a way to change a code to see box after monday just to view? thx

Monday Night Report is not showing up is it because its after monday?



Yes the monday night report by default only shows up on monday.

I added a var to bypass this check so you can view the app on other days however only the "In the Books" table will be displayed since all the games are over.

Re-copy then entire code then set var mondayReportAlwaysOn to = true;



I have also had vars so that you can re-name the tables if you like.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#12 imager

imager

    Veteran

  • Members
  • PipPipPip
  • 78 posts

Posted 26 September 2007 - 07:34 AM

Habman,

I add this under a new tab the only thing is one game still shows up under "Rubbing it In" today...


William
NFL-FFA.com

'Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that.'

--Bill Shankly

#13 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 26 September 2007 - 07:39 AM

I know that bonscott had some issues with the code on Monday with the tables displaying players on the wrong team or players that were not "starters"

The issue may or may not have been a conflict with one of my other apps on his site. It did work for all three of my leagues where I have my latest updates for my codes (see here)


I am leaving for Vegas this weekend and won't be back until Tuesday so if there are any issues with this app report them here and I will try to resolve them when I get back.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#14 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 26 September 2007 - 07:44 AM

Habman,

I add this under a new tab the only thing is one game still shows up under "Rubbing it In" today...


William



That particular game has 3 seconds remaining according to your XML live scoring document (see here). This happens from time to time with the XML documents and it's not a big deal so DO NOT submit a ticket to MFL support about this.

I will write a work around to get this cleaned up.

I'll let you know when it's ready.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#15 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 26 September 2007 - 08:07 AM


Habman,

I add this under a new tab the only thing is one game still shows up under "Rubbing it In" today...


William



That particular game has 3 seconds remaining according to your XML live scoring document (see here). This happens from time to time with the XML documents and it's not a big deal so DO NOT submit a ticket to MFL support about this.

I will write a work around to get this cleaned up.

I'll let you know when it's ready.



Okay this has been corrected.

Do a CTRL-F5 to clear your cache.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/