![]() ![]() |
Aug 30 2007, 05:04 PM
Post
#1
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
I have reworked the marquee (horizontal scroller) code entirely in javascript.
What are the benefits of this: - No iframes - Less bandwidth usage for my site - Quicker loading and uses less of MFL's resources - Easier to implement for the end user - Two row display (header row & scrolling row) or one row display - Reloading bugs in old iframe scroller have been corrected The first few lines of the code have variables that you can change. A little further down is a CSS section where you can add some customization if you want. Just copy and paste the code into a home page message (turn off your advanced editor) Here is the code for those interested: Last modified: September 9, 2008 CODE <script language="JavaScript" type="text/javascript"> <!-- //FYI: Script update as of September 9, 2008 //Start marquee manually var marqueeClickToStart = false; //SET THE #OF NEWS ITEMS TO DISPLAY 0=all; -1=none; var marqueeNews = 5; //SET THE #OF WEEKLY YARDAGE LEADERS TO DISPLAY 0=all; -1=none; var marqueeLiveLeaders = 10; //SET THE MODULES WOULD LIKE TO DISPLAY (true or false); var marqueeScoreboardModule = false; var marqueeWeeklyLeadersModule = true; var marqueeSeasonLeadersModule = true; var marqueeDraftResultsModule = false; //Marquee Dimensions width either % or px; height only px var marqueeWidth="100%" var marqueeHeight="14px" //Seconds to pause on new message var pauseTimeOnNewMessage = 4; //Marquee speed (larger is faster 1-10) var marqueeSpeed=2 //Separate Header and Body (false for 1-line display) var separateMarqueeHeader = true; //Display marquee on home page only (useful only if marquee is in header) var marqueeHomeOnly = true; //OTHER SETTINGS //Personal Message #1 (appears as first message scrolled) var marqueeTitle1 = ""; var marqueeMessage1 = ""; var marqueeTitle1a = ""; var marqueeMessage1a = ""; var marqueeTitle1b = ""; var marqueeMessage1b = ""; var marqueeTitle1c = ""; var marqueeMessage1c = ""; //Personal Message #2 (appears as last message scrolled) var marqueeTitle2 = ""; var marqueeMessage2 = ""; var marqueeTitle2a = ""; var marqueeMessage2a = ""; //Set the home field advantage here var homeFieldAdvantage = 0; //Set the number of decimal places var marqueeDecimals = 0; //Hide ties when displaying (W-L-T) var hideTiesInRecord = false; //Hide point spreads for upcoming games var hideMarqueeSpread = false; //# of top players to display var marqueeWeeklyTopPlayers = 5; var marqueeSeasonTopPlayers = 5; //Top Player Settings (use setting 0,1,2,3,4 or 5 for marqueeTopPlayerMode) // 0: show all players starters/nonstarters/rostered/free agents // 1: show rostered players/FA's in separate scroll // 2: show only rostered players whether started or benched // 3: show only free agent players // 4: show only rostered players but separate starters and bench // 5: show rostered players/FA's in seperate scroll; separate starters/bench var marqueeTopWeeklyMode = 5; var marqueeTopSeasonMode = 1; //Draft Display Settings (use setting 0,1,2,3 or 4 for marqueeDraftFilter) // 0: show all; // 1: show upto and including last pick // 2: show upto and including last pick + next pick // 3: show upto and including last pick + next 2 picks // 4: show only rounds indicated by start and end variables var marqueeDraftFilter = 0; var marqueeDraftStart = 1; var marqueeDraftEnd = 1; //--> </script> <style type='text/css'> #marqueeheader { background-color: #CBCCBA; color: #323321; font-style: italic; font-weight: bold; } #marqueebody, #marqueebody a:link, #marqueebody a:visited, #marqueebody a:active { background-color: #323321; font-weight: bold; color: #C9C693; text-decoration: none; } #marqueebody a:hover { color: red; } #marqueetable { border: 1px solid black; border-bottom: 0px; } </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/marquee.js"></script> September 9th: Player News Added: To control the items to display or hide it all together add this bit of code CODE //SET THE #OF NEWS ITEMS TO DISPLAY 0=all; -1=none; var marqueeNews = 5; September 30th: Live Weekly Yardage Leaders added: To control the items to display or hide it all together add this bit of code CODE //SET THE #OF WEEKLY YARDAGE LEADERS TO DISPLAY 0=all; -1=none; var marqueeLiveLeaders = 10; November 10th: Added ability to automatically set the days of the week for the Click to Start option. Replace: CODE var marqueeClickToStart = false; with CODE var marqueeClickToStart = new Array(false,false,true,true,true,true,true); In the above example the marquee will display normally on Sunday & Monday and use the "Click to Start" for the other days. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Aug 30 2007, 05:21 PM
Post
#2
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
Any FAQ's will be answered here.
-------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Aug 30 2007, 07:26 PM
Post
#3
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 610 Joined: 2-January 07 Member No.: 5066 2009 MFL: 10716 2010 MFL: 54823 |
you must hate me by now... LOL
posted it and nothing appears... all i did was change the colors, nothing else -------------------- Visit Nitro Grafixx....
http;//nitrografixx.com |
|
|
|
Aug 30 2007, 08:45 PM
Post
#4
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 100 Joined: 17-September 04 Member No.: 1805 |
Habman - Same thing as the post above - nothing happened - is there a place to enter - league id, server id, year, etc.. Once again YOU ARE THE MAN
|
|
|
|
Aug 30 2007, 08:52 PM
Post
#5
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
you must hate me by now... LOL posted it and nothing appears... all i did was change the colors, nothing else LOL. No it's good to get this kind of feedback. It helps me work out any glitches. I sent you a PM for you to try something which will allow me to find the error more easily. Let me know when you have it done. Thanks Habman - Same thing as the post above - nothing happened - is there a place to enter - league id, server id, year, etc.. Once again YOU ARE THE MAN Can I get your league id. I would like to see if the error you are getting is the same as Game Time. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Aug 30 2007, 10:01 PM
Post
#6
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 148 Joined: 25-April 07 Member No.: 5144 |
you must hate me by now... LOL posted it and nothing appears... all i did was change the colors, nothing else LOL. No it's good to get this kind of feedback. It helps me work out any glitches. I sent you a PM for you to try something which will allow me to find the error more easily. Let me know when you have it done. Thanks Habman - Same thing as the post above - nothing happened - is there a place to enter - league id, server id, year, etc.. Once again YOU ARE THE MAN Can I get your league id. I would like to see if the error you are getting is the same as Game Time. Habman, I'm getting the same thing. I changed a few more things than color. All i get is the box with no data. Thanks |
|
|
|
Aug 30 2007, 10:32 PM
Post
#7
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
The errors reported should be corrected.
Please do a CTRL-F5 to clear your cache. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Aug 30 2007, 10:34 PM
Post
#8
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 148 Joined: 25-April 07 Member No.: 5144 |
|
|
|
|
Aug 31 2007, 12:31 PM
Post
#9
|
|
![]() Member ![]() ![]() Group: Members Posts: 24 Joined: 15-August 07 From: West Des Moines IA Member No.: 5486 |
stupid question maybe sorry, but when you say homepage module, your speaking about a home page message? correct
|
|
|
|
Aug 31 2007, 12:44 PM
Post
#10
|
|
![]() Member ![]() ![]() Group: Members Posts: 24 Joined: 15-August 07 From: West Des Moines IA Member No.: 5486 |
stupid question maybe sorry, but when you say homepage module, your speaking about a home page message? correct
|
|
|
|
Aug 31 2007, 01:00 PM
Post
#11
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 113 Joined: 9-June 04 Member No.: 520 |
yes.
it took me a long time to figure that out last season |
|
|
|
Aug 31 2007, 01:20 PM
Post
#12
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
stupid question maybe sorry, but when you say homepage module, your speaking about a home page message? correct yes. it took me a long time to figure that out last season Oops never realized that I was writing down module rather than message. Home page message is correct. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Aug 31 2007, 01:32 PM
Post
#13
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 124 Joined: 12-September 05 From: Mississippi Member No.: 3406 |
Great work as always, Habman. One request please: any way we could get more "personal messages"...say 4 or 5?
Not sure if it's feasible, but it would be really cool if the top line flashed like it was a breaking news bulletin. Thanks for all you do! -------------------- World Fantasy Football League
worldfantasysports.net |
|
|
|
Aug 31 2007, 01:42 PM
Post
#14
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 610 Joined: 2-January 07 Member No.: 5066 2009 MFL: 10716 2010 MFL: 54823 |
is it supposed to stop after it goes thorugh or continue and just restart? Mine stops after the draft...
-------------------- Visit Nitro Grafixx....
http;//nitrografixx.com |
|
|
|
Aug 31 2007, 01:54 PM
Post
#15
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
is it supposed to stop after it goes thorugh or continue and just restart? Mine stops after the draft... No it is supposed to restart. I checked your site out before and there was a long delay after the draft but it did restart eventually (30 seconds or so). It think the is due to the fact that you are displaying your entire draft which is quite long and it is causeing the script to lose track of it's positioning. I will see if I can get a fix. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 3rd September 2010 - 11:51 PM |