![]() ![]() |
Sep 22 2008, 06:51 AM
Post
#1
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
MFL has recently added some new javascript variables to the "Pending Trades" Home Page module that has allowed coders to create a Trade Proposal Popup.
The only criteria to get this to work are that you need to have the "Pending Trades" Home Page module somewhere on your home page and you need to have the following script in your footer. Here is the code that must be placed in your footer: (Make sure that your advanced editor is set to "off") CODE <script language="Javascript" type="text/javascript"> <!-- //POPUP SETTINGS either set to true or false var popupTradeProposalsFromMe = true; var popupTradeProposalsToMe = true; var popupTradeAwaitingCommissionerApproval = true; var popupTradeAwaitingCommissionerReview = true; //PERSONALIZE THE MESSAGES (OPTIONAL) var popupTradeMessageToMe = ""; //FREQUENCY; 0=always, 1=once per browser session; 2=once per day; 3=once per week var popupTradeFrequency = 1; //POPUP COLOUR SETTING; use either color names (black) or code (#000000) var popupTradeBGColor = 'black'; var popupTradeBorder = '2px solid red'; //POPUP POSITIONING; //1=left/top; 4=center/top; 6=right/top; //2=left/center; 0=center/center; 7=right/center; //3=left/bottom; 5=center/bottom; 8=right/bottom; var popupTradePositioning = 0; // --> </script> <script language="JavaScript" type="text/javascript" src="http://www.habman.com/mfl/apps/js/tradepopup.js"></script> If you are using my previous trade alert popup (see here) you should remove that one if you are going to use this one. You can see it working on this test site: http://www24.myfantasyleague.com/2008/home/60536 Login as the "Dolphins" password "dolphins" Let me know of any issues. EDITED TO ADD March 9, 2009: I added on option to add a custom message to the popup when a trade has been proposed to a team. For example replacing var popupTradeMessageToMe = ""; with CODE var popupTradeMessageToMe = "<img src='http://www.habman.com/mfl/apps/js/images/tradesign.png' />"; Will will replace the normal trade offer announcement with this image ![]() Thanks go out to "thehohiostate" for creating the image. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Sep 22 2008, 11:20 AM
Post
#2
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 280 Joined: 25-July 07 From: on the road somewhere Member No.: 5370 |
SWEEEEEEEEEEEEEEEEEEEEET !!! i'm off to swap it right now ... you RAWK man
-------------------- |
|
|
|
Sep 22 2008, 11:31 AM
Post
#3
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 280 Joined: 25-July 07 From: on the road somewhere Member No.: 5370 |
that looks GREAT !! ... question , is there a way to move where it pops up ? i'd like to move it down the page , just a lil ... right now it pops up right on the scrolling text and it cuts off the top off the window ... nitpicky i know , but you created somethin really cool , i'd like it to be seen correctly
-------------------- |
|
|
|
Sep 22 2008, 01:35 PM
Post
#4
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
that looks GREAT !! ... question , is there a way to move where it pops up ? i'd like to move it down the page , just a lil ... right now it pops up right on the scrolling text and it cuts off the top off the window ... nitpicky i know , but you created somethin really cool , i'd like it to be seen correctly Okay I have added the ability to position the popup at several different positions on the screen. see the var popupTradePositioning in the code above. Once you add the new var you may have to do a CTRL-F5 to clear your cache. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Sep 22 2008, 02:51 PM
Post
#5
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 170 Joined: 15-August 08 From: Baltimore Member No.: 6812 2009 MFL: 20271 2010 MFL: 40665 , 23392 |
that looks GREAT !! ... question , is there a way to move where it pops up ? i'd like to move it down the page , just a lil ... right now it pops up right on the scrolling text and it cuts off the top off the window ... nitpicky i know , but you created somethin really cool , i'd like it to be seen correctly Okay I have added the ability to position the popup at several different positions on the screen. see the var popupTradePositioning in the code above. Once you add the new var you may have to do a CTRL-F5 to clear your cache. Thanks Habman.. love this new pop up script.. Already using it.. -------------------- Damien Clark
rosterdoc.com |
|
|
|
Sep 22 2008, 06:14 PM
Post
#6
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 184 Joined: 24-June 08 From: Cincinnati Member No.: 6502 2009 MFL: 47245 |
Great code...just out of curiosity, will this pop up every time you visit the site? Or just when there's a new offer?
Thanks. |
|
|
|
Sep 22 2008, 06:31 PM
Post
#7
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
Great code...just out of curiosity, will this pop up every time you visit the site? Or just when there's a new offer? Thanks. The popup will occur based on two conditions: 1) as long as an owner has an outstanding trade proposal and 2) The pop frequency you have chosen. Use the var popupTradeFrequency to set the frequency. A setting of 0 will popup the app on each home page visit. A setting of 1 will popup the app once per browser session. A setting of 2 will popup the app once per day. A setting of 3 will popup the app once per week. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Sep 22 2008, 07:41 PM
Post
#8
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 179 Joined: 27-April 08 From: PA Member No.: 6387 |
Habman, thanks a lot it looks great. Is there a way you could do that with Unread Private Messages?
|
|
|
|
Sep 22 2008, 07:44 PM
Post
#9
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
Habman, thanks a lot it looks great. Is there a way you could do that with Unread Private Messages? I will e-mail Kevin at MFL and see if a variable can be added to that Home Page Module so something similar can be done. -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Sep 22 2008, 08:09 PM
Post
#10
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 179 Joined: 27-April 08 From: PA Member No.: 6387 |
Habman, thanks a lot it looks great. Is there a way you could do that with Unread Private Messages? I will e-mail Kevin at MFL and see if a variable can be added to that Home Page Module so something similar can be done. Thanks a lot! |
|
|
|
Sep 23 2008, 05:27 PM
Post
#11
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 100 Joined: 17-September 04 Member No.: 1805 |
Habman the pop up is not working on my site. The site is 16956. When I login either as commish or someone I know has a trade - I get no pop up at all. I checked my browser to make sure it was not set to block pop ups. Is there something I am doing wrong. As always thanks for your help and your code, you make myfantasyleague more enjoyable - while I am at it can you write a script to block the ad's - lol
|
|
|
|
Sep 23 2008, 05:40 PM
Post
#12
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 100 Joined: 17-September 04 Member No.: 1805 |
Habman the pop up is not working on my site. The site is 16956. When I login either as commish or someone I know has a trade - I get no pop up at all. I checked my browser to make sure it was not set to block pop ups. Is there something I am doing wrong. As always thanks for your help and your code, you make myfantasyleague more enjoyable - while I am at it can you write a script to block the ad's - lol Sorry - It would help if I read the thread completely. Problem solved.thanks again. |
|
|
|
Sep 24 2008, 01:19 AM
Post
#13
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 1948 Joined: 29-August 05 From: Leamington ON, Canada Member No.: 3058 2009 MFL: 31589 , 24836 |
Habman, thanks a lot it looks great. Is there a way you could do that with Unread Private Messages? I will e-mail Kevin at MFL and see if a variable can be added to that Home Page Module so something similar can be done. Thanks a lot! Check out this thread http://www.sidelineleagues.com/forums/inde...showtopic=23212 -------------------- My MFL scripts . . . . . . . . http://www.habman.com/mfl/
|
|
|
|
Sep 26 2008, 08:30 PM
Post
#14
|
|
![]() Veteran ![]() ![]() ![]() Group: Members Posts: 43 Joined: 17-August 08 Member No.: 6829 2009 MFL: 14269 2010 MFL: 45331 |
This may be a stupid question but how exactly do I add this app. to my page. I have the pending trades module on my home page but don't quite understand how to insert the code and making it a footer. Thanks.
|
|
|
|
Sep 26 2008, 11:10 PM
Post
#15
|
|
|
Veteran ![]() ![]() ![]() Group: Members Posts: 220 Joined: 22-February 04 From: North St. Paul, MN Member No.: 17 2009 MFL: 18033 2010 MFL: 24400 |
This may be a stupid question but how exactly do I add this app. to my page. I have the pending trades module on my home page but don't quite understand how to insert the code and making it a footer. Thanks. log in as Commissioner. Go to for commissioners > Setup Under Home Page Message Setup section (near the bottom of the page) click one of the home page messages numbers, copy and paste the code in the the text box. Give it a name that "makes sense" in the optional message label (I call mine footer, so I know that one is my footer, but you can use anything) to set it as a footer there are 2 check boxes below the text box check the box for: Message Should Appear: In Footer Of All League Pages Click update Message you will have to lists, available modules on the left and your installed modules on the right. Find the module you just saved on the left, click add to list. click save home page setup. you should be set {edited per Habmans comments, Thank you Habman} -------------------- You are in contravention of the New Paradigm.
Return to your own sector...........or be destroyed. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 3rd September 2010 - 11:51 PM |