OOTP Developments Forums

OOTP Developments Forums (https://forums.ootpdevelopments.com//index.php)
-   OOTP Mods - Logos, Graphics, and HTML (https://forums.ootpdevelopments.com//forumdisplay.php?f=3636)
-   -   Replacing player photos with the default player photo in tpl (league website Q) (https://forums.ootpdevelopments.com//showthread.php?t=283802)

andjbock 12-21-2017 02:01 PM

Replacing player photos with the default player photo in tpl (league website Q)
 
I know this isn't a super popular topic, but does anyone which .tpl has the images for the leaderboard reports?

You can see the broken image links on my league's Red Sox page.

http://poundslash.com/ootp/lgreports.../team_100.html

I was able to figure out the player profile picture, so it always goes to the default photo, but can't find where I can replace the leaderboad photos.

I've checked the following and no luck:

box_leaders.tpl
box_leaders_start.tpl

andjbock 05-13-2019 03:02 PM

Hi self,

If you add the following code to head_bits.tpl (templates folder in your saved league, not the default templates folder) this should then be produced across all html pages.

Replace "http://ootp.biz/lgreports/images/default_player_photo.png" with the location and name of the image you want to globally replace broken image links with.

Use < script ></script> tags around all of the code below.


Code:

$(window).bind('load', function() {
$('img').each(function() {
    if((typeof this.naturalWidth != "undefined" &&
        this.naturalWidth == 0 )
        || this.readyState == 'uninitialized' ) {
        $(this).attr('src', 'http://ootp.biz/lgreports/images/default_player_photo.png');
    }
}); })



All times are GMT -4. The time now is 10:15 AM.

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments