Missing Player Pictures

If you need help building your website, this is the place to hang out. If you're an HTML, PHP, Perl or web database geek, check it out. / Si vous avez besoin d'aide pour construire votre site web, c'est le forum à regarder! Si vous êtes un expert en HTML, PHP, Perl ou en base de données, c'est le forum pour vous!
Post Reply
t00nces
The Accomplished One / L'Accompli
Posts: 60
Joined: Sat Oct 27, 2012 8:41 pm

Missing Player Pictures

Post by t00nces »

Greetings,

We're using the latest version of the sim and outputting files to the SQLite DB. Bruno Roy shared his website code with us and one of the nice things is the NHLID that Simon has included in the sim. However, if a player doesn't have an NHLID, their picture doesn't show (of course). Is there a table in the DB that can be edited to point to another location to get a picture or a way to post custom pictures for specific players?

Regards,

t.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

You can't edit table in the DB because it erase and recreate every day. You can import NHLID using the Bonus option. And you can find in the NHLID here

Here:
http://sths.simont.info/Download_En.php

Select:
Rating Files 2018: All rating files available submit to me in 2018.

In this path, open Showtime Ratings Pack -> NHLID.csv
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
t00nces
The Accomplished One / L'Accompli
Posts: 60
Joined: Sat Oct 27, 2012 8:41 pm

Re: Missing Player Pictures

Post by t00nces »

Are you taking feature requests? If so, it would be great if there was a feature that allowed you to use custom pictures and bios for certain players. For example, in our league the GM's are allowed to create a player for themselves. Sometimes, prospects and some European players don't have an NHL ID so it would be useful to be able to host your own DB of that info for those specific players.

Is that something that can reasonably be done or is it too much work for a niche feature?

Regards,

t.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

Hi.

The NHL ID is only used for the picture at the moment. If you want to host some the picture yourself, I can take this feature request. Some of my customer paid me for special request at the condition I can offer it to everyone at the same time.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
gingerkk
New in Town / Le Ptit Nouveau
Posts: 9
Joined: Sun Aug 27, 2023 12:57 pm

Re: Missing Player Pictures

Post by gingerkk »

Is there a reason that some of the player pictures aren't shown but instead just their name appears where the picture should be? This happens with players too, that have their NHL ID in the sim and that have their picture on their NHL page.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

gingerkk wrote: Mon Jan 29, 2024 4:18 pm Is there a reason that some of the player pictures aren't shown but instead just their name appears where the picture should be? This happens with players too, that have their NHL ID in the sim and that have their picture on their NHL page.
Do you have an screenshot of this behavior? The only reason I see is "lazy loading" in the web browser.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
gingerkk
New in Town / Le Ptit Nouveau
Posts: 9
Joined: Sun Aug 27, 2023 12:57 pm

Re: Missing Player Pictures

Post by gingerkk »

One example would be Mitchell Chaffee:

https://slnf.sths.ca/PlayerReport.php?Player=2333

We have his NHL ID in the sim, and there is a picture of him on his NHL site:

https://www.nhl.com/lightning/player/mi ... ee-8482070

Players without NHL ID in the Sim look different, there's nothing instead of the name written twice:

https://slnf.sths.ca/PlayerReport.php?Player=745
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

gingerkk wrote: Thu Feb 01, 2024 2:26 pm there's nothing instead of the name written twice:
I don't understand what you mean by name written twice. I don't see this on the website.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
gingerkk
New in Town / Le Ptit Nouveau
Posts: 9
Joined: Sun Aug 27, 2023 12:57 pm

Re: Missing Player Pictures

Post by gingerkk »

This is what I see on all devices. On the right side the name of the player again, instead of the picture.

Image
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

There is no image for Mitchell Chafee on the NHL website in the 168 by 168 mugshot image. So, you see the alternatif text for the image.

And it seems the NHL website change how they handle mugshot now.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
gingerkk
New in Town / Le Ptit Nouveau
Posts: 9
Joined: Sun Aug 27, 2023 12:57 pm

Re: Missing Player Pictures

Post by gingerkk »

Ok, thanks. So I guess there is no way to "circumvent" this somehow via the Sim
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

I need to analyse this change from NHL. But when I look at another rookie (Connor Bedard), the 168 by 168 mugshot exist so I wonder if it's one shot deal for this player.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
gingerkk
New in Town / Le Ptit Nouveau
Posts: 9
Joined: Sun Aug 27, 2023 12:57 pm

Re: Missing Player Pictures

Post by gingerkk »

There are some more, but mostly "lesser known" players like this one here:

https://slnf.sths.ca/PlayerReport.php?Player=282

https://www.nhl.com/flames/player/yan-kuznetsov-8482165
JimToupet
STHS Dynamic Website Contributor
Posts: 363
Joined: Wed Jul 02, 2014 10:55 am

Re: Missing Player Pictures

Post by JimToupet »

Maybe they are in steps for hardening from where does images can be fetch.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14757
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Missing Player Pictures

Post by SimonT »

Actually, the STHS is compatible with NHL change.

I have setup the
Mug Shot Base URL to be "https://assets.nhle.com/mugs/nhl/20232024/"
Mug Shot File Extension to be "png"
A players NHL ID to be "CGY/8482165" and it work.

What is annoying is that the 1) URL will change every year and 2) if the player get trade, his mugshot NHLID might change also. (To confirm)

Let see if this thrend from NHL.com continue or not.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Post Reply