NHL.com player ID field

Your suggestions are always welcome. / Vos suggestions sont toujours bienvenues.
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

NHL.com player ID field

Post by opeth771 »

Hi Simon,

I think it would be interesting to add a NHL.com player ID field. This would make it easier for us to grab the player's picture from their website for player profile custom pages.

I run a NHL rating league, and this would be very useful instead of having to save all images for every players and create ID's.

Thanks :)
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: NHL.com player ID field

Post by Foo »

I have this info stored in a database, I can share in a CSV file or something no problem.
Image
Image
Image
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

Re: NHL.com player ID field

Post by opeth771 »

Foo wrote:I have this info stored in a database, I can share in a CSV file or something no problem.
This would be great, although for future players I will have the same problem. Also, since the field is not in the SQLITE export, I would have to have a second database with only the players id?

Not sure how to do this.
Thanks
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: NHL.com player ID field

Post by Foo »

yes you will have to import the CSV in a mysql table
Image
Image
Image
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

Re: NHL.com player ID field

Post by opeth771 »

And it becomes a second task to maintain a second file... Would be easier with a field in the STHS :D
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14756
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: NHL.com player ID field

Post by SimonT »

If I create a ‘NHLID’ field in the STHS and I create a manual command to import the Player ID Field to the ‘NHLID’ field, will that be enough? Of course, I’ll add that field in the SQLite Database also?
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: NHL.com player ID field

Post by Foo »

Please Simon, now that the V3 is out, add all the new columns in SQLite at the end of each tables. If not all the php codes will have to be work over each time.

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

Re: NHL.com player ID field

Post by SimonT »

Foo wrote:Please Simon, now that the V3 is out, add all the new columns in SQLite at the end of each tables. If not all the php codes will have to be work over each time.

thanks.
I don't understand your comment? Do you query the table based on their position in the table? This is very bad programmation, used the name.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: NHL.com player ID field

Post by Foo »

$resultsschedule = $sqldb->query("SELECT ScheduleNextDay, ProScheduleTotalDay, FarmScheduleTotalDay FROM LeagueGeneral");
while ($rowschedule = $resultsschedule->fetchArray()) {
$Totaldays = (string)$rowschedule[1];
$TotaldaysF = (string)$rowschedule[2];
$NextDay = (string)$rowschedule[0];
}

How to do it then?
Image
Image
Image
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

Re: NHL.com player ID field

Post by opeth771 »

SimonT wrote:If I create a ‘NHLID’ field in the STHS and I create a manual command to import the Player ID Field to the ‘NHLID’ field, will that be enough? Of course, I’ll add that field in the SQLite Database also?
Pas certain de comprendre? En gros, j'ai juste besoin d'un champ dans la page des joueurs qui me laisse ajouter le NHLID. Évidemment, la colonne NHLID va devoir se retrouver dans la SQLITE. Comme ça, je pourrai appeler les joueurs par leurs vrais ID LNH et aller "grabber" les photos, etc.

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

Re: NHL.com player ID field

Post by SimonT »

Code: Select all

$resultsschedule = $sqldb->query("SELECT ScheduleNextDay, ProScheduleTotalDay, FarmScheduleTotalDay FROM LeagueGeneral");
while ($rowschedule = $resultsschedule->fetchArray()) {
$Totaldays = (string)$rowschedule[[color=#FF0000]'ProScheduleTotalDay'[/color]];
$TotaldaysF = (string)$rowschedule[[color=#FF0000]'FarmScheduleTotalDay'[/color]];
$NextDay = (string)$rowschedule[[color=#FF0000]'ScheduleNextDay'[/color]];
}
Regarde ici pour plus d'example: https://github.com/SimonT-STHS/STHS-PHP-Code/
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14756
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: NHL.com player ID field

Post by SimonT »

Hi.

With the new NHL website, is this information still relevant? I noticed NHL.com Player ID change or at least, you can't create a direct link only based on the NHL Player ID? Or I’m totally wrong?
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: NHL.com player ID field

Post by Foo »

I think at first it was for the player pictures... if yes it is still working with players id

https://nhl.bamcontent.com/images/heads ... 471675.jpg
Image
Image
Image
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14756
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: NHL.com player ID field

Post by SimonT »

I add this features for 3.0.4.

P.S. You can get update to NHL ID Filed by using this script : http://sths.simont.info/Forum/viewtopic ... 26&t=12059
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

Re: NHL.com player ID field

Post by opeth771 »

Thanks a bunch Simon, this is awesome!
Post Reply