players statistics and some other questions

you will find here.
User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

players statistics and some other questions

Postby zeta65 » Wed Aug 15, 2007 9:01 pm

I would mantain on my site also the number of matches for each player. At the moment is this possible in joomleague?
will this feature be added in next version? (if not I will try to do it myself  ^-^)
why in the backend you could set up the startup team but you can't show it in the frontend (well this is what happens to me), is this a bug or not?
Why you can add a comment to the events, but you can't see it in the frontend?
Which is the forum where we can read the discussion between the developpers to understand what is going on in the next versions (and avoid to bother with question like mines  :-[)?

thanks a lot for this project

ciao
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
savi
.
Posts: 810
Joined: Sat Feb 03, 2007 1:40 pm

Re: players statistics and some other questions

Postby savi » Wed Aug 15, 2007 9:55 pm

also the number of matches for each player.


as now you can add the event (played matches) and add this event to every player (not the best solution i know and i wouldn´t do that)

will this feature be added in next version?

Almost everything what you can think of will be added in a further version but nobody can tell you when this will happen ;-)

why in the backend you could set up the startup team but you can't show it in the frontend

i don´t know it yet but i think i can remember that i have seen the startup team somwhere in the frontend

Why you can add a comment to the events, but you can't see it in the frontend?

you can add an comment to an event which you can see in the Frontend. But only the Short one. I don`t know what the big comment is for.
You only see it in th Frontend if you eneable "show match details" in Game configuration.
then you shpuld see a loupe in the Results overview...
try it out if you havent already ;-)
if you understand german you can read every post to know what will happen next.
the best chace to see wahts going on for non german people is here
http://joomlacode.org/gf/project/joomle ... er_id=6236
but you cant say when what will happen.

Just keep on asking ;-)
Joomleague installiert unter der Seite:   www.hcgraz.at (Joomleague über iframe eingebunden)
- Joomleague-Version:  1.5a
frisch installiert auf joomla 1.5x
- eingesetzte Browser:  Opera 10/ Firefox

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Wed Aug 15, 2007 11:05 pm

savi wrote:
also the number of matches for each player.


as now you can add the event (played matches) and add this event to every player (not the best solution i know and i wouldn´t do that)


Yes, I thought about this solution, I don't like it.


will this feature be added in next version?

Almost everything what you can think of will be added in a further version but nobody can tell you when this will happen ;-)

I understand this, but the season will start in September...
I have an idea: take the players in the startup team [ they are recorded in the table match], create the event substitution, and make a "simple" sum of the two. But I will waste my time (I'm not so able in programming as in talking...) if this feature will be added soon and not since 1 year by the developers team (that surely will do a better job)

why in the backend you could set up the startup team but you can't show it in the frontend

i don´t know it yet but i think i can remember that i have seen the startup team somewhere in the frontend

If you remember where and in which way let me know please.

Why you can add a comment to the events, but you can't see it in the frontend?

you can add an comment to an event which you can see in the Frontend. But only the Short one. I don`t know what the big comment is for.
You only see it in the Frontend if you enable "show match details" in Game configuration.
then you shpuld see a loupe in the Results overview...
try it out if you havent already ;-)

Yes, I was wondering about the big comment, I thought it was to describe the goal action or similar.

if you understand german you can read every post to know what will happen next.
the best chace to see wahts going on for non german people is here
http://joomlacode.org/gf/project/joomle ... er_id=6236
but you cant say when what will happen.

Sorry, only two years of german aren't enough to understand it..... :whistling:

thanks
ciao
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
savi
.
Posts: 810
Joined: Sat Feb 03, 2007 1:40 pm

Re: players statistics and some other questions

Postby savi » Wed Aug 15, 2007 11:23 pm

i don´t know it yet but i think i can remember that i have seen the startup team somewhere in the frontend
If you remember where and in which way let me know please.


i will do my best to find that out ,-)

I understand this, but the season will start in September...


ok but this is for sure not the most important feature you can do the job also without this feature and i`m rather sure this will come soon ;-)

Sorry, only two years of german aren't enough to understand it.....

no problem i`ll do my best in english ;-)
Joomleague installiert unter der Seite:   www.hcgraz.at (Joomleague über iframe eingebunden)
- Joomleague-Version:  1.5a
frisch installiert auf joomla 1.5x
- eingesetzte Browser:  Opera 10/ Firefox

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Thu Aug 16, 2007 2:46 pm

savi wrote:
i don´t know it yet but i think i can remember that i have seen the startup team somewhere in the frontend

found.
Thanks
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Fri Aug 17, 2007 8:09 am

I found a solution (not elegant nor tested enought) about mantaining the played matches number for each player.
I used the roster field in match report: I insert there also the players that entered during the game (obviously I changed also the labels )
after that I modified two files that I attach


the case "showPlayers" in joomleague.php

(The code isn't clean, but I don't know which is the right way to search a string inside anoter string in SQL, I also used the events array, with the 0 key, because I'have seen that "normal" events start from 1)
anyway, if you don't change the labels, you could use this change I have made to keep the statistics about the numeber of time that a player was in the roster.

// zeta65
$playernum= "'%".$row->player_id."%'";

$miaquery = sprintf("SELECT count(match_id)
        FROM #__joomleague_matches
        WHERE project_id = %s
AND homeroster LIKE %s
OR  awayroster Like %s",$joomleague->id,$playernum,$playernum);
      $database->setQuery($miaquery);
      $miototals = $database->loadResult();


$events[$row->player_id][0]=$miototals;


// zeta65

than I modified also the show_players.tpl.php file to show in last column my values.

I know that my solution isn't a perfect solution, but it works for me, just waiting the good job that the developers team surely will do.

ciao
Last edited by zeta65 on Sun Sep 23, 2007 4:46 pm, edited 1 time in total.
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Fri Aug 17, 2007 9:44 am

found first (surely not last  :whistling:) bug in my code:
it works only if your players id is between 10 and 99 (or 1 and 9).
I must change the way of searching for the id in the roster field.

If someone can help me in this.... :'(

ciao
Last edited by zeta65 on Fri Aug 17, 2007 10:08 am, edited 1 time in total.
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

alan4573
.
Posts: 33
Joined: Sun Aug 12, 2007 11:28 pm

Re: players statistics and some other questions

Postby alan4573 » Fri Aug 17, 2007 2:48 pm

Superb Hack.  :biggrin:

Now if someone can just figure out how to solve the players id problem..... :-\

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Fri Aug 17, 2007 6:12 pm

alan4573 wrote:Superb Hack.  :biggrin:

Now if someone can just figure out how to solve the players id problem..... :-\


solved...I believe  :rolleyes:

here my change in joomleage.php

// zeta65

$matchesplayed= 0;

$miaquery= sprintf("SELECT homeroster,awayroster
FROM #__joomleague_matches
WHERE project_id = %s
", $joomleague->id);

$database->setQuery($miaquery);
$myrows =$database->loadObjectList();
foreach($myrows AS $myrow) {
$homesquad=explode(";", trim($myrow->homeroster));
foreach ($homesquad AS $player1) {
if ( $row_>player_id == $player1) {
$matchesplayed=$matchesplayed+1;

}
}

$awaysquad=explode(";", trim($myrow->awayroster));
foreach ($awaysquad AS $player2) {
if ( $row->player_id == $player2) {
$matchesplayed=$matchesplayed+1;

}
}
}

$events[$row->player_id][0]=$matchesplayed;

// zeta65

I attach the changed files.
But I'm also thinking to solve the question in another way...just someone can tell me if the 0.90a version will have this feature (I don't want to waste my time programming things that already are done by the developers)?
Last edited by zeta65 on Sun Sep 23, 2007 4:47 pm, edited 1 time in total.
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Sat Aug 18, 2007 4:21 pm

I have changed my code (just adding a line) so now it works in this way:

You can keep using the roster field as it was thinked for (just initial players), and this is good for future versions of joomleague, infact in this way, my database is coherent with the intentions of the official developers team.

But if you add an event for the players which enter during the match you can mantain the statistics about the played games by each player.

To do this, after creating the event I told, put the id event in this line:

$events[$row->player_id][0]=$matchesplayed+$events[$row->player_id][5];

In my case the event id was 5

It would be possible select the id from the template, but to do this there should be a place in the database where to save it and obviously I don't want to touch it to mantain the full compatibility with the official version.

Now I miss some good icons for:
exit (in)
enter (out)
played matches number

any suggestion?

I will also modify the show_player.tpl.php
to show this statistics also there.

Note:
Probably at this point it should be better if this thread would be moved in the section source code & Co by the moderators.

Ciao
marco

[gelöscht durch Administrator]
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

raffael
.
Posts: 51
Joined: Thu Aug 16, 2007 12:25 am

Re: players statistics and some other questions

Postby raffael » Sat Aug 18, 2007 6:36 pm

Hi, could You tell me how does it work? :>

Do I have to add this event in match report to every player that played in that game or it is counted automatically somehow?

thanks in advance.  :cool:

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Sat Aug 18, 2007 8:09 pm

raffael wrote:Hi, could You tell me how does it work? :>

Do I have to add this event in match report to every player that played in that game or it is counted automatically somehow?

thanks in advance.  :cool:

No, the event is only for the player entering when the match is already started.

Obviously joomleague couldn't figure which player entered during the game, so:
you have to select the players which are in the roster (and this feature exist in joomleague 0.90),

than you have to create an event (how you name this isn't important, moreover I don't know in english how do you translate "entering during a match" in one word). Take note of the pid of this new event.

Put this id  in a line as I wrote in my last post.

At this point as you supposed, every time one player enters you have to put this event in match report. That's all.

I'm thinking to add also another statistic: minutes played by each player (not difficult at this point).
Finally, if you create also an event "exiting during a match", you can have in your statistics: exiting, entering, matches played.


(about the icon I'm waiting an help.... for now I use the row :whistling:)
ciao
marco
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Tue Aug 28, 2007 12:09 am

.
Last edited by zeta65 on Tue Oct 16, 2007 4:32 pm, edited 1 time in total.
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

User avatar
savi
.
Posts: 810
Joined: Sat Feb 03, 2007 1:40 pm

Re: players statistics and some other questions

Postby savi » Tue Aug 28, 2007 8:01 am

Hi

this looks rather nice and will be a useful feature in further versions. Thx
Lets see what will happen in the next releases...
Joomleague installiert unter der Seite:   www.hcgraz.at (Joomleague über iframe eingebunden)
- Joomleague-Version:  1.5a
frisch installiert auf joomla 1.5x
- eingesetzte Browser:  Opera 10/ Firefox

fistersn
.
Posts: 39
Joined: Wed Aug 15, 2007 5:11 pm
Contact:

Re: players statistics and some other questions

Postby fistersn » Mon Oct 08, 2007 12:54 am

Does anyone know if this automatic match played hack works for the 0.91 version?
Joomleague 0.93b
Joomla 1.0.15 at Homepage: http://sulkesligaen.no
TEST SYSTEM
Joomla 1.5.14
JoomLeague 1.5.03a at Homepage: http://erlend.sulkesligaen.no

User avatar
Puppy
.
Posts: 311
Joined: Wed Aug 01, 2007 9:14 am
Location: Utrecht
Contact:

Re: players statistics and some other questions

Postby Puppy » Mon Oct 08, 2007 10:08 am

yes
Last edited by Puppy on Mon Oct 08, 2007 12:54 pm, edited 1 time in total.
Joomla 1.5.12
Joomleague 0.93

fistersn
.
Posts: 39
Joined: Wed Aug 15, 2007 5:11 pm
Contact:

Re: players statistics and some other questions

Postby fistersn » Mon Oct 08, 2007 12:29 pm

I am not that good in english, but with yup does you mean yes?

I am a bit afraid to destroy all my work, you see...
Joomleague 0.93b
Joomla 1.0.15 at Homepage: http://sulkesligaen.no
TEST SYSTEM
Joomla 1.5.14
JoomLeague 1.5.03a at Homepage: http://erlend.sulkesligaen.no

fistersn
.
Posts: 39
Joined: Wed Aug 15, 2007 5:11 pm
Contact:

Re: players statistics and some other questions

Postby fistersn » Mon Oct 08, 2007 2:05 pm

Oki. Thanks. Where do I exactely insert this code in the 0.91 joomlaleage.php file?
And how does it works?
Joomleague 0.93b
Joomla 1.0.15 at Homepage: http://sulkesligaen.no
TEST SYSTEM
Joomla 1.5.14
JoomLeague 1.5.03a at Homepage: http://erlend.sulkesligaen.no

fistersn
.
Posts: 39
Joined: Wed Aug 15, 2007 5:11 pm
Contact:

Re: players statistics and some other questions

Postby fistersn » Tue Oct 16, 2007 2:55 pm

How did you modify the show_player.tpl file?
Joomleague 0.93b
Joomla 1.0.15 at Homepage: http://sulkesligaen.no
TEST SYSTEM
Joomla 1.5.14
JoomLeague 1.5.03a at Homepage: http://erlend.sulkesligaen.no

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Tue Oct 16, 2007 4:31 pm

fistersn wrote:How did you modify the show_player.tpl file?

There is a package that you can download and following the instructions all is done.
Search  on the italian forum FINITO!! (first post)
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

fistersn
.
Posts: 39
Joined: Wed Aug 15, 2007 5:11 pm
Contact:

Re: players statistics and some other questions

Postby fistersn » Tue Oct 16, 2007 5:46 pm

Thanks alot, Now it works. Only one quistion to, is it possible to show the presenze on the event list?
Joomleague 0.93b
Joomla 1.0.15 at Homepage: http://sulkesligaen.no
TEST SYSTEM
Joomla 1.5.14
JoomLeague 1.5.03a at Homepage: http://erlend.sulkesligaen.no

User avatar
zeta65
.
Posts: 965
Joined: Fri Aug 10, 2007 4:40 pm
Location: Italia
Contact:

Re: players statistics and some other questions

Postby zeta65 » Tue Oct 16, 2007 9:11 pm

fistersn wrote:Thanks alot, Now it works. Only one quistion to, is it possible to show the presenze on the event list?

^-^  First of all you must understand that the event presenze (matches played)....doesn't exist!!
I mean that in the code this event is filled using the starting roster and the "in" event.  Anyway you must change the code, but in this moment I have no idea where you must do it, cause I don't use it. As probably  you have seen, I use that event only in showplayer and showplayers template
website: www.uscosio.org
joomla vers.: Joomla 1.5.x
joomleague vers.:Joomleague 1.5 (latest git build)

agronotizie
.
Posts: 237
Joined: Sun Aug 05, 2007 12:29 am
Contact:

Re: players statistics and some other questions

Postby agronotizie » Wed Oct 17, 2007 4:25 pm

Hi all,

I hope that the hack of zeta65 will be included in the core of joomleague.
I miei siti con joomleague

http://www.aversacalcio.it joomleague 0.91

http://www.aversanormanna.info joomleague 0.90

User avatar
prevalje
.
Posts: 45
Joined: Sat Aug 30, 2008 11:31 pm

Re: players statistics and some other questions

Postby prevalje » Tue Feb 15, 2011 10:16 pm

the download file link in topic FINITO doesnt work anymore...is it possible to download it from anywhere else?


Return to “Tips, Tricks, SourceCodeChanges”

Who is online

Users browsing this forum: No registered users and 0 guests