Jump to content


Photo

Poll Popup


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

#1 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 25 September 2008 - 06:44 AM

MFL has recently added a new javascript variable to the "5 Newest League Polls" Home Page module that has allowed coders to create a "Poll (vote required)" Popup.


The only criteria to get this to work are that you need to have the "5 Newest League Polls" 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:


<script language="Javascript" type="text/javascript">
<!--

//FREQUENCY; 0=always, 1=once per browser session; 2=once per day; 3=once per week
var popupPollFrequency = 1;

//POPUP COLOUR SETTING; use either color names (black) or code (#000000) 
var popupPollBGColor = 'black';   
var popupPollBorder  = '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 popupPollPositioning = 0;
 
// -->
</script>

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

With this code when an owner visits the site and there are active polls in which they have not voted in they will get a poll popup reminding them to vote in the polls.

Great for leagues that have polls created for trades.

Let me know of any issues.



EDITED TO ADD

While logged in as commissioner you will not see a popup. The popup is only for team owners that haven't voted in a poll.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#2 mowgli

mowgli

    Veteran

  • Members
  • PipPipPip
  • 274 posts

Posted 25 September 2008 - 07:43 AM

MFL has recently added a new javascript variable to the "5 Newest League Polls" Home Page module that has allowed coders to create a "Poll (vote required)" Popup.


The only criteria to get this to work are that you need to have the "5 Newest League Polls" 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:


<script language="Javascript" type="text/javascript">
<!--

//FREQUENCY; 0=always, 1=once per browser session; 2=once per day; 3=once per week
var popupPollFrequency = 1;

//POPUP COLOUR SETTING; use either color names (black) or code (#000000) 
var popupPollBGColor = 'black';   
var popupPollBorder  = '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 popupPollPositioning = 0;
 
// -->
</script>

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

With this code when an owner visits the site and there are active polls in which they have not voted in they will get a poll popup reminding them to vote in the polls.

Great for leagues that have polls created for trades.

Let me know of any issues.


Will this work or can it be modified for the Commissioner's Poll (or whatever its called)? I require owners to vote in this poll each week before they submit a lineup. It would be another way for me to avoid listening to someone complain they didn't know they had to vote in the poll each week.

#3 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 25 September 2008 - 07:55 AM

MFL has recently added a new javascript variable to the "5 Newest League Polls" Home Page module that has allowed coders to create a "Poll (vote required)" Popup.


The only criteria to get this to work are that you need to have the "5 Newest League Polls" 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:


<script language="Javascript" type="text/javascript">
<!--

//FREQUENCY; 0=always, 1=once per browser session; 2=once per day; 3=once per week
var popupPollFrequency = 1;

//POPUP COLOUR SETTING; use either color names (black) or code (#000000) 
var popupPollBGColor = 'black';   
var popupPollBorder  = '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 popupPollPositioning = 0;
 
// -->
</script>

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

With this code when an owner visits the site and there are active polls in which they have not voted in they will get a poll popup reminding them to vote in the polls.

Great for leagues that have polls created for trades.

Let me know of any issues.


Will this work or can it be modified for the Commissioner's Poll (or whatever its called)? I require owners to vote in this poll each week before they submit a lineup. It would be another way for me to avoid listening to someone complain they didn't know they had to vote in the poll each week.


I am not familiar with a "commissioner poll" since I don't really use polls in my leagues. I will set up a test league and see if I can see for myself what you are referring to.


BTW I should have mentioned in my initial post that you will not see a popup when logged in as commissioner. The popup is strictly looking at team owners.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#4 commishkeg

commishkeg

    Veteran

  • Members
  • PipPipPip
  • 280 posts

Posted 25 September 2008 - 08:11 AM

i think he's talkin about a "commissioners poll" vs a "league poll" ... i'm guessing , since i haven't installed it that your popup will probably cover both



#5 mowgli

mowgli

    Veteran

  • Members
  • PipPipPip
  • 274 posts

Posted 25 September 2008 - 08:13 AM

i think he's talkin about a "commissioners poll" vs a "league poll" ... i'm guessing , since i haven't installed it that your popup will probably cover both


Yes I was referring to the "Newest Commissioner's Poll" module. You can see this on either of my 2008 pages (its called "Weekly Opinion Poll from the League Office").

#6 commishkeg

commishkeg

    Veteran

  • Members
  • PipPipPip
  • 280 posts

Posted 25 September 2008 - 08:20 AM

ok , i installed it on my site (i am the commish) and yes it does work for commissioner polls



#7 commishkeg

commishkeg

    Veteran

  • Members
  • PipPipPip
  • 280 posts

Posted 25 September 2008 - 08:27 AM

this will save me a ton of aggravation ... it's such a pain in the ass gettin some of my guys to vote in polls or even look at their trades ... (until the trade gets revoked and then they say "well geez i woulda done that" .... GRRRRRRRR ,lol) ... THANX once again HAB !!!



#8 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 25 September 2008 - 08:31 AM

ok , i installed it on my site (i am the commish) and yes it does work for commissioner polls



Actually I just set it up in a test league and there is not a var added to the commissioners polls. It is working for you because you are also displaying the "5 newest league polls" and that is what is creating the popup.

I will send a ticket to mfl and see if they can add a var to the "Commissioner Polls" home page module for leagues that only list the "Commissioner Polls" home page message on their site.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#9 Longonian

Longonian

    Veteran

  • Members
  • PipPipPip
  • 74 posts

Posted 25 September 2008 - 06:37 PM

Put this on my page. Works great!
Thanks Habman.

IGFL

#10 commishkeg

commishkeg

    Veteran

  • Members
  • PipPipPip
  • 280 posts

Posted 27 September 2008 - 11:20 AM

ok , i installed it on my site (i am the commish) and yes it does work for commissioner polls



Actually I just set it up in a test league and there is not a var added to the commissioners polls. It is working for you because you are also displaying the "5 newest league polls" and that is what is creating the popup.

I will send a ticket to mfl and see if they can add a var to the "Commissioner Polls" home page module for leagues that only list the "Commissioner Polls" home page message on their site.



AHA , well then i stand corrected ... but it still works and i still love it , lol



#11 Monkey Boy

Monkey Boy

    Veteran

  • Members
  • PipPipPip
  • 39 posts

Posted 08 October 2008 - 04:44 PM

Just a quick question. I currently have the trade pop-up as my footer. Can I add this code to the same module, or do I need to set a different one up for this and add it to the footer?

Thanks!

#12 joe.commish

joe.commish

    Veteran

  • Members
  • PipPipPip
  • 919 posts

Posted 08 October 2008 - 04:48 PM

Just a quick question. I currently have the trade pop-up as my footer. Can I add this code to the same module, or do I need to set a different one up for this and add it to the footer?

Thanks!


It can go in the same one. I have mine setup that way and multiple scripts work for my league.
Codes, Applications and CSS tweaks -- http://forums.myfant...showtopic=23490

#13 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,369 posts

Posted 08 October 2008 - 06:31 PM

Any luck with MFL with adding a var to Commissioner Poll?

ok , i installed it on my site (i am the commish) and yes it does work for commissioner polls



Actually I just set it up in a test league and there is not a var added to the commissioners polls. It is working for you because you are also displaying the "5 newest league polls" and that is what is creating the popup.

I will send a ticket to mfl and see if they can add a var to the "Commissioner Polls" home page module for leagues that only list the "Commissioner Polls" home page message on their site.


Be Sure To Check Me Out At:   LuckyDog Sports.net


#14 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 08 October 2008 - 07:07 PM

Any luck with MFL with adding a var to Commissioner Poll?

ok , i installed it on my site (i am the commish) and yes it does work for commissioner polls



Actually I just set it up in a test league and there is not a var added to the commissioners polls. It is working for you because you are also displaying the "5 newest league polls" and that is what is creating the popup.

I will send a ticket to mfl and see if they can add a var to the "Commissioner Polls" home page module for leagues that only list the "Commissioner Polls" home page message on their site.

No luck. Only one person really had requested it so they thought adding the var was a case of overkill i.e. not very usable for the MFL community as a whole.

If there is demand for it then send an e-mail to Kevin of MFL and let him know that you would like to see a var added to the commissioners poll. The more people that request it the more chance that it will get added.

I have the script ready to go I just need that var added :o
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#15 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,369 posts

Posted 09 October 2008 - 01:13 PM

Sent Request to Support ;)

Be Sure To Check Me Out At:   LuckyDog Sports.net