minj / foxtrick

FoxTrick is a browser extension for the Hattrick online football manager game, currently available for Firefox, Google Chrome, as well as for Opera.
https://www.foxtrick.org
GNU General Public License v3.0
71 stars 49 forks source link

Add HCStats (Hellenic Community Statistics) #1153

Closed minj closed 9 years ago

minj commented 9 years ago

Original issue 1153 created by thanoulas on 2013-10-19T11:28:09.000Z:

Hi, I'm the developer of HCStats (http://hcstats.hattrick.gr) I have recently re-developed the hcstats statistics application and I was wondering whether you could add them to foxtrick? I remember about 8 or 9 years ago, that the old version was in foxtrick, and foxtrick was rendering some helpful links on the hattrick website to access a team's or league's statistics page directly.

Let me know if this is possible, I can answer any questions or provide assistance for the structure of hcstats if that's needed.

Thanks Thanos

minj commented 9 years ago

Comment #1 originally posted by minj on 2013-10-19T12:06:13.000Z:

We use site's favicon as the link image. You should make one for your site.

Additionally I need urls of pages you want to link to and from where. You can use various tags to create dynamic links: E.g. you can use [leagueid] from the series page (yes, I know league is not series but that's how the original dev made it :P)

Status: Accepted

minj commented 9 years ago

Comment #2 originally posted by minj on 2013-11-11T08:37:53.000Z:

are you still interested?

Status: NeedsFeedback

minj commented 9 years ago

Comment #3 originally posted by thanoulas on 2013-11-11T09:05:02.000Z:

Yeah sorry for the delay, I just didn't have any time to work on it recently, but I should be able to add the favicon within the week.

Sent from my iPhone 5

minj commented 9 years ago

Comment #4 originally posted by minj on 2013-12-08T21:31:34.000Z:

it's been a month ;)

minj commented 9 years ago

Comment #5 originally posted by thanoulas on 2013-12-09T09:45:13.000Z:

Sorry man, just done it. Was really busy with my FM2014 scout tool :) The favicon should be there now,

Thanks

minj commented 9 years ago

Comment #6 originally posted by minj on 2013-12-09T12:11:59.000Z:

ok, so what pages you want the link to be in?

and what are the targets for those links?

minj commented 9 years ago

Comment #7 originally posted by thanoulas on 2013-12-09T14:03:26.000Z:

I currently have pages on HCStats for Teams, LeagueLevelUnits, Players The links for these are in the following format:

Teams: http://hcstats.hattrick.gr/Team/TEAM_ID LeagueLevelUnits: http://hcstats.hattrick.gr/Series/LEAGUELEVELUNIT_ID Players: http://hcstats.hattrick.gr/Player/PLAYER_ID Matches: http://hcstats.hattrick.gr/Match/MATCH_ID

Promotion / Demotion Tables - In Series Tables http://hcstats.hattrick.gr/Promotion/[FROM]/[TO] - Example: http://hcstats.hattrick.gr/Promotion/2/1

Even better, you could put a link next to Teams in 1st, 5th, 6th, 7th and 8th positions to link directly to the promotion tables, targeted on a specific team, by linking like so: http://hcstats.hattrick.gr/Promotion/[FROM]/[TO]#TEAM_ID

I also have more generalised statistics pages like: http://hcstats.hattrick.gr/LeagueRank (Hellas Top 10 Ratings - wide, could go in the Hellas page) http://hcstats.hattrick.gr/LeagueRank/Division-1 (Division 1 Top 10) - Series 1 LeagueLevelUnits http://hcstats.hattrick.gr/LeagueRank/Division-2 (Division 2 Top 10) - Series 2 LeagueLevelUnits http://hcstats.hattrick.gr/LeagueRank/Division-3 (Division 3 Top 10) - Series 3 LeagueLevelUnits http://hcstats.hattrick.gr/LeagueRank/Division-4 (Division 4 Top 10) - Series 4 LeagueLevelUnits http://hcstats.hattrick.gr/LeagueRank/Division-5 (Division 5 Top 10) - Series 5 LeagueLevelUnits http://hcstats.hattrick.gr/LeagueRank/Division-6 (Division 6 Top 10) - Series 6 LeagueLevelUnits

http://hcstats.hattrick.gr/Average (Hellas Top 10 Ratings - wide, could go in the Hellas page) http://hcstats.hattrick.gr/Average/Division-1 (Division 1 Top 10) - Series 1 LeagueLevelUnits http://hcstats.hattrick.gr/Average/Division-2 (Division 2 Top 10) - Series 2 LeagueLevelUnits http://hcstats.hattrick.gr/Average/Division-3 (Division 3 Top 10) - Series 3 LeagueLevelUnits http://hcstats.hattrick.gr/Average/Division-4 (Division 4 Top 10) - Series 4 LeagueLevelUnits http://hcstats.hattrick.gr/Average/Division-5 (Division 5 Top 10) - Series 5 LeagueLevelUnits http://hcstats.hattrick.gr/Average/Division-6 (Division 6 Top 10) - Series 6 LeagueLevelUnits

http://hcstats.hattrick.gr/Detailed/Overall (Overall Ratings for all of Hellas) - All LeagueLevelUnits http://hcstats.hattrick.gr/Detailed/Defence (Defence Ratings for all of Hellas) - All LeagueLevelUnits http://hcstats.hattrick.gr/Detailed/Midfield (Midfield Ratings for all of Hellas) - All LeagueLevelUnits http://hcstats.hattrick.gr/Detailed/Attack (Attack Ratings for all of Hellas) - All LeagueLevelUnits http://hcstats.hattrick.gr/Detailed/Attendance (Attendance for all of Hellas) - All LeagueLevelUnits

If you need any help, or don't understand something I've written, let me know, many thanks again

minj commented 9 years ago

Comment #8 originally posted by minj on 2013-12-09T16:56:26.000Z:

this is for Greece only, right?

We don't have functionality to add links to the the series table and determine which country the league game was played in. Also all the stats links would be an overkill, don't you think? :P

So I'll see about adding a general link for Hellas page, links for team and series in Greece, and player (with Greek nationality) links.

Sounds good?

minj commented 9 years ago

Comment #9 originally posted by thanoulas on 2013-12-09T17:19:20.000Z:

Yes, Greece only for now.

I just gave you all the links I have, you know better :P In this case, because the promotion tables are very popular, can you add them in a link from the team's page instead?

Thanks

minj commented 9 years ago

Comment #10 originally posted by thanoulas on 2013-12-09T17:20:20.000Z:

Oh, forgot, what about matches?

minj commented 9 years ago

Comment #11 originally posted by minj on 2013-12-09T18:07:30.000Z:

like I said we have no filter for matches and you seem to only store greece match

As for promotion, the problem is the link functionality is automated and specifying which link to use is problematic...

As far as I can see you can access them from the series link. Seems a reasonable place to look for them.

Alternatively, you could make us of http://hcstats.hattrick.gr/PromotionByPos/[CurrentDivision]/[Position] as we have tags for them

minj commented 9 years ago

Comment #12 originally posted by thanoulas on 2013-12-09T18:59:53.000Z:

Ok, please add everything you can then, and I'll work on creating the links that work better for you.

minj commented 9 years ago

Comment #13 originally posted by minj on 2013-12-10T09:14:38.000Z:

I added the link. You need to clear foxtrick cache and visit the links section of ft preferences for it to appear. It will appear automatically in next version.

The problem is that players can only be filtered by nationality, not the country they are in. As a result Greek players playing abroad lead to an empty page and foreign players in Greece don't have the link at all.

minj commented 9 years ago

Comment #14 originally posted by minj on 2014-01-04T11:01:47.000Z:

Are you satisfied with the current links?

minj commented 9 years ago

Comment #15 originally posted by thanoulas on 2014-01-04T12:36:34.000Z:

All is good, except matches, where I don't see any links. The format is: Matches: http://hcstats.hattrick.gr/Match/MATCH_ID

minj commented 9 years ago

Comment #16 originally posted by minj on 2014-01-04T13:08:11.000Z:

I repeat. We do not have information which country the match was played in. Since you have no information for all matches in HT, but only for the ones in Greece, I do not think it makes sense to add that link for all matches

minj commented 9 years ago

Comment #17 originally posted by thanoulas on 2014-01-04T13:13:07.000Z:

Oh, sorry I got confused for some reason.. :/ All is good then, I'm working on the new promotion link format now, so I'll let you know when that's ready

Cheers

minj commented 9 years ago

Comment #18 originally posted by minj on 2014-01-07T20:00:06.000Z:

<empty>

Labels: Misc

minj commented 9 years ago

Comment #19 originally posted by thanoulas on 2014-01-17T19:37:43.000Z:

Hello, I've started adding support for more countries, so the links have changed a little (although for the Greek league they still work as they are, until we can change them in Foxtrick)

I've added support for the Cuban league and Cup, and I'll update this issue here as new leagues are fetched.

We have also added a new domain, and the old one will be removed soon, the new one is http://hcstats.com Could you please include the links for the new leagues in the upcoming versions of Foxtrick?

The change in the links is simple, all links need to be prepended with the League Name i.e.: http://hcstats.hattrick.gr/Team/TEAM_ID becomes http://hcstats.com/LEAGUE_NAME/Team/TEAM_ID

Example: OLD: http://hcstats.hattrick.gr/Team/2012522 NEW: http://hcstats.com/Cuba/Team/2012522

Thanks, let me know if that's possible. If using the League name is impossible for you, I can add a method to work with the LeagueID or CountryID instead.

minj commented 9 years ago

Comment #20 originally posted by minj on 2014-01-17T20:51:20.000Z:

We can give you leagueid

minj commented 9 years ago

Comment #21 originally posted by thanoulas on 2014-01-18T02:54:31.000Z:

Thanks, LeagueID has now been implemented

the NEW example above becomes: http://hcstats.com/147/Team/2012522

minj commented 9 years ago

Comment #22 originally posted by minj on 2014-01-18T09:55:22.000Z:

http://hcstats.com/50 does not work as a link to Hellas page

minj commented 9 years ago

Comment #23 originally posted by minj on 2014-01-18T09:57:19.000Z:

Should I use http://hcstats.com/50/LeagueRank ?

minj commented 9 years ago

Comment #24 originally posted by thanoulas on 2014-01-18T11:26:12.000Z:

Yes please, LeagueRank is the default homepage for each league.

minj commented 9 years ago

Comment #25 originally posted by minj on 2014-01-18T11:33:57.000Z:

I fixed the links and added cuba.

Like I mentioned earlier player page has no leagueid so the player links work properly only for greek players in greece etc.

Links module is rather complicated plus using chpp for every player page is impractical so we can't do anything about that.

minj commented 9 years ago

Comment #26 originally posted by thanoulas on 2014-01-18T12:12:08.000Z:

I think you should be able to links the players even without providing a leagueID, at least for players that exist in my database. I could also be able to setup a standard redirect by getting the player's team's leagueid

minj commented 9 years ago

Comment #27 originally posted by minj on 2014-01-18T12:15:22.000Z:

yes, the link works fine without leagueid, but I cannot make a link for foreign players in greece and greek players abroad lead to an empty page. The last one will not be a problem if you plan to gather data of the whole HT universe.

2014/1/18, foxtrick@googlecode.com foxtrick@googlecode.com:

minj commented 9 years ago

Comment #28 originally posted by thanoulas on 2014-01-18T12:17:25.000Z:

This is the plan eventually, but I agree, we should better wait until I get all data first rather than showing an empty page or some error. I guess the same goes for matches, right?

minj commented 9 years ago

Comment #29 originally posted by minj on 2014-01-18T12:18:23.000Z:

Yes

2014/1/18, foxtrick@googlecode.com foxtrick@googlecode.com:

minj commented 9 years ago

Comment #30 originally posted by thanoulas on 2014-01-21T23:45:05.000Z:

I'll be updating this post with available leagues as they get added to HCStats, so I'm not spamming everyone:

  1. Hellas
  2. Cuba
  3. Cameroon
  4. Palestine
minj commented 9 years ago

Comment #31 originally posted by thanoulas on 2014-01-22T01:03:08.000Z:

I'll be updating this post with available leagues as they get added to HCStats, so I'm not spamming everyone:

  1. Hellas
  2. Cuba
  3. Cameroon
  4. Palestine
  5. O'zbekiston (Uzbekistan)
minj commented 9 years ago

Comment #32 originally posted by thanoulas on 2014-01-22T22:47:28.000Z:

I'll be updating this post with available leagues as they get added to HCStats, so I'm not spamming everyone:

  1. Hellas
  2. Cuba
  3. Cameroon
  4. Palestine
  5. O'zbekiston (Uzbekistan)
  6. Dhivehi Raajje (Maldives)
  7. Uganda
  8. Tanzania
  9. Dawlat Qatar (Qatar)
  10. Suriyah (Syria)
minj commented 9 years ago

Comment #33 originally posted by thanoulas on 2014-01-23T20:31:02.000Z:

I'll be updating this post with available leagues as they get added to HCStats, so I'm not spamming everyone:

  1. Hellas
  2. Cuba
  3. Cameroon
  4. Palestine
  5. O'zbekiston (Uzbekistan)
  6. Dhivehi Raajje (Maldives)
  7. Uganda
  8. Tanzania
  9. Dawlat Qatar (Qatar)
  10. Suriyah (Syria)
  11. Brunei
  12. Cambodia
  13. Ghana
  14. Benin
minj commented 9 years ago

Comment #34 originally posted by thanoulas on 2014-01-24T18:45:54.000Z:

I'll be updating this post with available leagues as they get added to HCStats, so I'm not spamming everyone:

  1. Hellas
  2. Cuba
  3. Cameroon
  4. Palestine
  5. O'zbekiston (Uzbekistan)
  6. Dhivehi Raajje (Maldives)
  7. Uganda
  8. Tanzania
  9. Dawlat Qatar (Qatar)
  10. Suriyah (Syria)
  11. Brunei
  12. Cambodia
  13. Ghana
  14. Benin 15.Mozambique
  15. Oman
  16. Yemen
  17. Bangladesh
  18. Montenegro
  19. Angola

Could you please add these countries as a first batch? I've fetched everything for these up to the current round. I'll post again when the next 20 in the list finish processing (will take a while)

Thanks

minj commented 9 years ago

Comment #35 originally posted by minj on 2014-01-25T11:46:28.000Z:

If you plan to import everything during the next week I'll just add your portal as a global one. Because now I need to look up all league ids for these countries ;)

minj commented 9 years ago

Comment #36 originally posted by thanoulas on 2014-01-25T15:21:43.000Z:

It'd be great but I don't think I can fetch everything in a week :) Is this what you need for your source code?

"countryidranges": [ [ 50, 50 ], [ 127, 127 ], [ 128, 128 ], [ 129, 129 ], [ 130, 130 ], [ 131, 131 ], [ 132, 132 ], [ 133, 133 ], [ 134, 134 ], [ 135, 135 ], [ 136, 136 ], [ 137, 137 ], [ 138, 138 ], [ 139, 139 ], [ 140, 140 ], [ 141, 141 ], [ 142, 142 ], [ 143, 143 ], [ 144, 144 ], [ 145, 145 ], [ 146, 146 ], [ 147, 147 ] ], "nationalityranges": [ [ 50, 50 ], [ 127, 127 ], [ 128, 128 ], [ 129, 129 ], [ 130, 130 ], [ 131, 131 ], [ 132, 132 ], [ 133, 133 ], [ 134, 134 ], [ 135, 135 ], [ 136, 136 ], [ 137, 137 ], [ 138, 138 ], [ 139, 139 ], [ 140, 140 ], [ 141, 141 ], [ 142, 142 ], [ 143, 143 ], [ 144, 144 ], [ 145, 145 ], [ 146, 146 ], [ 147, 147 ] ],

minj commented 9 years ago

Comment #37 originally posted by thanoulas on 2014-01-25T15:23:58.000Z:

Ohh! And 148, forgot about that one!

minj commented 9 years ago

Comment #38 originally posted by minj on 2014-01-25T16:43:01.000Z:

nice that you took consequitive ids, how thoughtful of you :)

it's as easy as [127,148] :P

minj commented 9 years ago

Comment #39 originally posted by thanoulas on 2014-01-25T20:23:48.000Z:

Lol, yeah, that too :P

minj commented 9 years ago

Comment #40 originally posted by thanoulas on 2014-01-31T23:12:24.000Z:

Hello, can we please extend it to [117,148] ? Thanks

minj commented 9 years ago

Comment #41 originally posted by thanoulas on 2014-02-08T12:24:25.000Z:

Hi again, this week's leagues list:

[104, 107], [110, 113], [117,148]

Thanks

minj commented 9 years ago

Comment #42 originally posted by minj on 2014-02-10T17:00:29.000Z:

done

minj commented 9 years ago

Comment #43 originally posted by thanoulas on 2014-02-21T09:44:43.000Z:

Cheers, can you change the name of the tooltip to "HCStats" from "Hellenic Hattrick Community Statistics", as the scanner now supports 44 countries!

Also, this is this week's list

[100, 107], // This is the change from 104 to 100 [110, 113], [117,148]

Sorry for the slow progress, but it's been a painstaking job fetching data from Hattrick, and as I'm venturing into countries that have more league levels, I keep finding new problems. I've already went from one server to four. :)

minj commented 9 years ago

Comment #44 originally posted by thanoulas on 2014-03-01T18:35:20.000Z:

Hello,

the Leagues range is now: [93, 107], // This is the change from 104 to 100 [110, 113], [117,148]

Thanks

minj commented 9 years ago

Comment #45 originally posted by minj on 2014-06-14T22:14:16.000Z:

any progress? we should close this if you are done adding countries

minj commented 9 years ago

Comment #46 originally posted by minj on 2014-07-06T13:34:03.000Z:

<empty>

Status: Fixed