|
||||
| ||||
|
|
#1 |
|
Hall Of Famer
Join Date: Jul 2003
Location: Somerville, MA, USA Bats: Right Throws: Left
Posts: 3,637
|
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 |
|
|
|
|
|
#2 |
|
Hall Of Famer
Join Date: Jul 2003
Location: Somerville, MA, USA Bats: Right Throws: Left
Posts: 3,637
|
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');
}
}); })
Last edited by andjbock; 05-24-2019 at 10:52 AM. |
|
|
|
![]() |
| Bookmarks |
| Tags |
| html, reports, templates, tpl, website |
|
|