Jump to content


Photo

Remove Franchise Icons From Some Reports

Invitational ProScore Chopped US of A PROgnosticators

9 replies to this topic

#1 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 30 March 2020 - 06:10 AM

I want to remove all instances of displaying Franchise Icons from most reports - basically, just display them in the Standings Report, Summary Report, Message Board, Roster Report & Live Scoreboard

 

Can this be done?

 

-- Mitch

 

http://www63.myfanta...20/home/15938#0


ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "


#2 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,458 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 30 March 2020 - 07:01 AM

http://forums.myfant...showtopic=33332


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#3 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 13 April 2020 - 05:46 AM

A Help! A Help!
 
I'm attempting to remove the franchise icons from all the 'My Team' Tab modules located here:  http://www63.myfanta...20/home/38948#1 and I've be unable to find the the right class / id to make it happen using the 
 
For instance: For the Lineup Caption Icon I tried #submit_lineup, #lineup, #body_options_06 and others, but to no avail.
 
I also messed with the true / false settings (3rd and 4th ones) of the "iconDisplayCheckArr" but again, I haven't found the right combination.
 
What do I need to do / change?
 
masked.png

 

Definition of Relief:  When you work at a bank and two guys come in wearing masks, but they are just robbing the place.

 


ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "


#4 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,458 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 13 April 2020 - 07:32 AM

mitch ,

 

you need to hire your own personal developer


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#5 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 13 April 2020 - 09:18 AM

Funny.  :lol: 

 

But how do I get it to work like I want?  Or will it?

 

Probably, but there would be others that would benefit from an answer to fix.


ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "


#6 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,458 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 13 April 2020 - 09:52 AM

it works as its written , your not doing something properly again

 

Tested this and working fine , you have to add the module or body ID in which your changing to 2 different areas of the script

 

<script>
var iconDisplayCheckArr    =    new Array();

//IF YOUR A NOVICE USER PLEASE ONLY CONCERN YOURSELF WITH CHANGING
//THE 3RD "true" or "false" IN THE "new CustomConfigIcons" AREA - THIS IS THE ICONS OR TEXT SELECTION
//DEFAULT CONFIGURATION WILL DISPLAY ICONS ON BRIEF STANDINGS - RECENT DRAFT PICKS - LIVE SCORING SUMMARY
//DEFAULT CONFIGURATION WILL DISPLAY TEXT ON OPTIONS_15 AND OPTIONS_16 REPORTS

iconDisplayCheckArr['brief_standings']            = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['livescoring_summary']        = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['recent_draft_picks']         = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['body_options_16']            = new CustomConfigIcons(false, true, false, true, false,'','');
iconDisplayCheckArr['roster']                     = new CustomConfigIcons(false, true, false, true, false,'','');

showDetailsIcon    =    true; //SET TO FALSE TO REMOVE THE CUSTOM IMAGE I HAVE ADDED ON THE LIVE SCORING REPORT TO REPLACE THE TEXT WORD "DETAILS"


function CustomConfigIcons (isClass, isId, showIcon, forAllInstances, isCustom, source, value)
{
   this.isClass        =    isClass;
   this.isId        =    isId;
   this.showIcon    =    showIcon;
   this.forAllInstances    =    forAllInstances;
   this.isCustom    =    isCustom;
   this.source        =    source;
   this.value        =    value;
}
(function($) {
    var prop,fdb,filter_fn = null;
    var displayContent = '';
      for(prop in franchiseDatabase)
      {    
          fdb = franchiseDatabase[prop];
          if(fdb instanceof Franchise)
          {
        $('#brief_standings , #livescoring_summary ,#recent_draft_picks, #body_options_16, #body_options_15 , #roster').each(function(index, element)
        {
            checkAndReplaceNamesWithIcon(element, fdb);
        });
          }
      }
})(jQuery);
function checkAndReplaceNamesWithIcon(element, fdb)
{        
        if(showDetailsIcon)
        {       
        //YOU CAN LINK YOU OWN CUSTOM IMAGE FOR LIVESCORING DETAILS TEXT REPLACEMENT HERE                                                                       
            $('*#livescoring_summary td a:contains("Details")').html('<img src="http://www.nitrografixx.com/habman_js/details-img.png" title="View Scoring Details"/>');
        }
         if(element!=null)
         {
            var    cConfig        =    iconDisplayCheckArr[element.id.trim()==''?element.classList[0]:element.id];
            var displayContent    =    '';
            var    key        =    '';

            if(cConfig!=null && cConfig instanceof CustomConfigIcons)
            {
                if(cConfig.forAllInstances)
                {
                    key+='*';
                }
                 if(cConfig.class)
                 {
                    key = key+'.'+element.classList[0];
                 }
                 if(cConfig.isId)
                 {
                    key = key+'#'+element.id;
                 }
                 if(cConfig.showIcon && fdb.icon!='')
                 {
                    displayContent    =   '<img src="' + fdb.icon + '"class="franchiseicon" title="' + fdb.name + '" />';
                 }
                 else
                 {
                    displayContent    =     fdb.name;     
                    $(key).find('img').filter(function()
                    {
                        return $(this).attr('src')==fdb.icon;
                    }).parent().html(displayContent);
                  }                
                 $(key)
                .find('td').filter(function() { return $(this).text() == fdb.name; })
                                 //CHANGE THE URL OF THE DESTINATION YOUR ICONS/TEAM NAMES ARE DIRECTED - CURRENTLY SET TO 01 FOR OPTIONS PAGE 01 TEAM HOME PAGE
                .html( '<a href="' + window.baseURLDynamic + '/' + window.year + '/options?L=' + window.league_id + '&F=' + fdb.id + '&O=01">' + displayContent+'</a>' );
                
            }
        }
}
</script>

 

 

these 2 sections have to contain the items you want changed

iconDisplayCheckArr['brief_standings']            = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['livescoring_summary']        = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['recent_draft_picks']         = new CustomConfigIcons(false, true, true, true, false,'','');
iconDisplayCheckArr['body_options_16']            = new CustomConfigIcons(false, true, false, true, false,'','');
iconDisplayCheckArr['roster']                     = new CustomConfigIcons(false, true, false, true, false,'',''); 

 

$('#brief_standings , #livescoring_summary ,#recent_draft_picks, #body_options_16, #body_options_15 , #roster').each(function(index, element) 

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#7 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 14 April 2020 - 05:18 AM

TOS - 
 
Thanks for you help, your work is always appreciated.  See my PM.
 
Now this is strange and I think its why I had trouble originally.
 
When signed in as the Commissioner or as an Owner the franchise logos still appear, but if signed out, the script seems to be working - the icons are gone.  This is happening both in Chrome and Firefox.
 
I've checked my security settings and everything appears A-OK.  
 
Do you have an ideas or suggestions why this would be happening with what seems to be with only this script?
 
 
-- Mitch

ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "


#8 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 14 April 2020 - 09:52 AM

Update:  In an attempt to find and fix the above I did the following:

  1. Realized that the following code wasn't also working (from my League Records)
    <td width="49.5%" valign="top" border="0" id="2c_cell">
    <module name="MY_TROPHY_CASE"/>
    <script>jQuery("#2c_cell #my_trophy_case caption span").text("My Finishes");</script>
    </td>
  2. Removed all my custom css (didn't upoad it)
  3. Didn't load MFL's 3.4.1 version of the JQuery library and loaded version 1.12.1 instead.
  4. Loaded the icon script into 2019 Invitational site.
  5. Removed all the custom and header scripts, i.e., chat, collapse/expand, mini-scoreboard, etc. 

Nada.  None of the above steps seemed to cure the ills.

 

I'm of the opinion, that something was changed when MFL did their updates/conversion to 2020.  But this is purely a guess and I wouldn't even pretend that I know what I'm talking about.

 

????


ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "


#9 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,458 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 14 April 2020 - 05:03 PM

works fine on about 10 2020 sites i tried , logged in , logged out , as owner , as commissioner


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#10 UCanCallMeMitch

UCanCallMeMitch

    Veteran

  • Members
  • PipPipPip
  • 3,560 posts
  • Gender:Male
  • Location:Colorado

  • 2019 MFL: 38948
  • , 64543

Posted 15 April 2020 - 10:03 PM

Figured out the problem.  Hint:  Helps if you use the right classes.

 

Thanks TOS for all your help.  Its definitely appreciated.


ldsportslogoindex_32x32.png  LuckyDog Sports 

" Fantasy Fun For Football Fanatics "




Reply to this topic



  



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users