Jump to content


Photo

News Icon Add-On


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

#1 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 11 August 2011 - 06:31 AM

Something that I have been playing around with the last couple of days that might have some interest and is ready for testing.

This combination of scripts will add a news icon by players names that will quickly identify those players with recent news and when the icon is clicked it will popup a window with news for that player.


You can easily pick and choose which tables you want the icon added to.


Here is my test site: http://www8.myfantas...2011/home/68477

On this test site I set it up to add icons to both the Top Owns Table and the Draft Tracker Table but not to the Top Starters Table and not to the Average Auction Values Table.




To test out this script here is what you need to do.

In a home page message that is checked off as your HEADER add the following:

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


In a home page message that is checked off as your FOOTER add the following (advanced editor off):

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

//Setup the tables where you want news icon added
var habNewsIconTable = new Object();

habNewsIconTable['top_owns'] = true;
habNewsIconTable['top_starters'] = false;
habNewsIconTable['draft_tracker'] = true;
habNewsIconTable['average_auction_values'] = false;

//Optional var for sites using fixed width to
//compensate for horizontal positioning of popup.
//Remove entirely if your site is not fixed width.
//Otherwise set to fixed width value.
var newsIconPageBodyWidth = 1024;

//vertical tweaking for popup
var newsIconPopupYOffset = -200;

//adjust width and height of popup
var newsIconWidth = 550;
var newsIconHeight = 400;

//adjust background and font color of drag handle for popup
var newsIconHandleBgColor = '#CA0000';
var newsIconHandleFontColor = 'white';

//center the popup
var newsIconCenter = false;

//-->
</script>

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



This might still be buggy since I have done limited testing. Any feedback appreciated.


EDITED TO ADD August 13

To help with positioning I have added two vars. One for horizontal positioning on "fixed width" sites. And one for vertical positioning


EDITED TO ADD August 13

Added ability to change size (height and width) of popup as well control the drag handle colours.


EDITED TO ADD August 28

Added ability to center the popup on the page rather than positioning it next to the item clicked.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#2 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,311 posts

Posted 11 August 2011 - 06:48 AM

LOVE IT !!

Thanks Hab , another great addition , will do some testing on a few heavily used sites now


Quick question, can you add this to an options table ? I could see good use on the rosters table #options_07
FREE Player Cuts Collection
http://www.nitrograf...nfl-playercuts/

#3 Bishopmish

Bishopmish

    Veteran

  • Members
  • PipPipPip
  • 124 posts

Posted 11 August 2011 - 07:28 AM

LOVE IT !!

Thanks Hab , another great addition , will do some testing on a few heavily used sites now


Quick question, can you add this to an options table ? I could see good use on the rosters table #options_07


Ditto. Testing as well. Thanks, Hab.
One step at a time...

#4 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,311 posts

Posted 11 August 2011 - 07:29 AM

issues on options_07 and options_08

also when using custom table for top performers , shows additional news icon below tables
FREE Player Cuts Collection
http://www.nitrograf...nfl-playercuts/

#5 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 11 August 2011 - 07:57 AM

issues on options_07 and options_08

also when using custom table for top performers , shows additional news icon below tables


Thanks for bringing this to my attention.

The issues with options_07 and options_08 should now be corrected. (Do a CTRL-F5)

Not sure if the top performers cleaned up with the update. Let me know.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#6 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,351 posts

Posted 11 August 2011 - 08:50 AM

You amaze me!!

Can't tell - no stats available in your Test League, but will this also show up in a Top Performers/Players Stats Report?

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


#7 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 11 August 2011 - 09:13 AM

You amaze me!!

Can't tell - no stats available in your Test League, but will this also show up in a Top Performers/Players Stats Report?




It seems to work on the Top Performers/Player Stats Report.


you will need to add
habNewsIconTable['options_08'] = true;



See it working on my 2011 league: http://football8.myf...ns?L=42732&O=08
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#8 Thunder56

Thunder56

    Veteran

  • Members
  • PipPipPip
  • 435 posts

Posted 11 August 2011 - 10:16 AM

Great stuff, Habman! They should make this a standard MFL feature!
BEERGUTS & GLORY FFL: My Drinking Team Has A Football Problem!

#9 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,311 posts

Posted 11 August 2011 - 10:50 AM

Thanks Hab , options_08 works fine now , but options_07 has news icon under every table

http://football9.myf...ns?L=65757&O=07

same as Top Performers
FREE Player Cuts Collection
http://www.nitrograf...nfl-playercuts/

#10 Bishopmish

Bishopmish

    Veteran

  • Members
  • PipPipPip
  • 124 posts

Posted 11 August 2011 - 11:10 AM

Thanks Hab , options_08 works fine now , but options_07 has news icon under every table

http://football9.myf...ns?L=65757&O=07

same as Top Performers


Ditto. Noticed same thing.
One step at a time...

#11 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,605 posts

Posted 11 August 2011 - 11:41 AM


Thanks Hab , options_08 works fine now , but options_07 has news icon under every table

http://football9.myf...ns?L=65757&O=07

same as Top Performers


Ditto. Noticed same thing.



Okay do a CTRL-F5 to clear your cache and this should correct itself.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#12 lurkmaster

lurkmaster

    Veteran

  • Members
  • PipPipPip
  • 100 posts

Posted 11 August 2011 - 11:44 AM

Awesome addition! Hopefully stuff like this becomes standard.

#13 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,311 posts

Posted 11 August 2011 - 11:49 AM

Okay do a CTRL-F5 to clear your cache and this should correct itself.



Perfect now !

Will check some other options and modules to see if i can find anything else
FREE Player Cuts Collection
http://www.nitrograf...nfl-playercuts/

#14 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,311 posts

Posted 11 August 2011 - 12:03 PM

Hab,


Any use of
margin:0 auto;

in the .pagebody , which is used on all fixed width sites , the pop up window is offset about 320px to the right and not holding the absolute position

any fix for this without having to set a negative margin in the css ?
FREE Player Cuts Collection
http://www.nitrograf...nfl-playercuts/

#15 jaypopsu

jaypopsu

    Veteran

  • Members
  • PipPipPip
  • 661 posts

Posted 11 August 2011 - 12:06 PM

Hab,


Any use of

margin:0 auto;

in the .pagebody , which is used on all fixed width sites , the pop up window is offset about 320px to the right and not holding the absolute position

any fix for this without having to set a negative margin in the css ?



Also should add some z-index action as if you click on Chris Johnson: http://football9.myf...ns?L=65757&O=08

The open window hides behind the footer.

Oh, and you should know not to pollute threads......... obviously spent too much time polluting thread here, instead of working with PS. :P
Got Championship Anticiperection? | milfleague.com