0.91: How to show all players of a league instead of a team

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

0.91: How to show all players of a league instead of a team

Postby cbs48 » Fri Nov 23, 2007 10:37 pm

Hi,

I like to show all of the players in a project and not just all players of a team. I used the mod_team_players to do this.

The only thing that won't work is the name of the team they play in. I like to show the short name after the name. What has to be done to display this. At the moment it shows the team_id but when I change this to short_name it is blank.

I attached the modified files.

Thanks in advance
Last edited by cbs48 on Mon Nov 26, 2007 11:36 am, edited 1 time in total.
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

User avatar
julienV
Joomleague Core Developer
Joomleague Core Developer
Posts: 2016
Joined: Tue Jun 19, 2007 9:27 am
Location: France
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby julienV » Sat Nov 24, 2007 12:22 am

that's because you need to pull the name of the team from the appropriate table.

modify the request like this (untested):

Code: Select all

$query = sprintf("SELECT p.*, pt.id AS playertoolid, pt.*, pp.name as position , t.short_name as team_short_name
                    FROM #__joomleague_players p, #__joomleague_playertool pt, #__joomleague_positions pp
                    LEFT JOIN #__joomleague_teams t ON t.id = pt.team_id
                   WHERE p.id = pt.player_id AND
                         pt.project_id = %s AND
                     pp.id = pt.position_id
                ORDER BY pp.ordering, pt.position_id
                 ", $project->id);


then you can use $row->team_short_name
You can hire me, I'm a Joomla professional freelance developer.
Please contact me at jlv@jlv-solutions.com
NO PM, please use email !

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Sat Nov 24, 2007 12:40 am

Thanx That did the trick
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

tomaerts
.
Posts: 45
Joined: Thu Jun 28, 2007 2:51 pm
Location: Tegelen

Re: 0.91: How to show all players of a league instead of a team

Postby tomaerts » Mon Nov 26, 2007 9:53 am

I would like too see how this looks in your website, can you share a link?

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Mon Nov 26, 2007 11:35 am

Tom,

this is how it looks: www.coachbart.nl

It is the content item All Star Bowl.

This is my testserver with 1.012, on my live site 1.013 it only shows the header. The same for the original mod_team_players module.

Maybee you can test it.

Another example with joomla 1.0.12: http://www.wc-flagjuniors2007.com/index.php

[gelöscht durch Administrator]
Last edited by cbs48 on Tue Nov 27, 2007 10:32 am, edited 1 time in total.
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Mon Nov 26, 2007 11:45 am

The reason why I would like to see all the players of a league is that I hope this can be the first step to write a poll systemm to it.

At the end of the season there is a all star game. Both teams are selected from the players that played in the league for that season.

The players can be elected by voting, and the player with the most votes is selected. At the moment we do that in the forum with a poll system but because JL has the most actual information it would be nice if we can use the roster as input for the players.

If we can add a selection button to this module and we can set some rules for voting (example: only registered users, single vote, multiple votes etc) this coauld be a great add on for seting up a MVP / Allstar  list.
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Tue Nov 27, 2007 4:26 pm

cbs48 wrote:
This is my testserver with 1.012, on my live site 1.013 it only shows the header. The same for the original mod_team_players module.



any Ideas how this is possible?
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Wed Feb 20, 2008 11:24 pm

Wil someone test attached module for me?

It worked but suddenly I only see the name of the project and the players are gone.

Please send me feedback

[gelöscht durch Administrator]
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)

User avatar
comraden
Joomleague Core Developer
Joomleague Core Developer
Posts: 1291
Joined: Thu Aug 16, 2007 2:27 pm
Location: Poland, Lublin
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby comraden » Thu Feb 21, 2008 12:23 am

ok, I tested this module. Here my results:
Production server (Joomla 1.11, joomleague 0.91, Debian) : mod_joomleague_random_player - OK
mod_joomleague_league_players - only name of the project

localhost (Joomla 1.11, joomleague 0.91, Kubuntu) :
mod_joomleague_random_player - only name of the project (sic!)
mod_joomleague_league_players - only name of the project

Is this module for 0.91 or 0.92?

Files (joomla, joomleague) and database in localhost are the exact copy of production server.
Last edited by comraden on Thu Feb 21, 2008 12:34 am, edited 1 time in total.
http://llk.pl::jl_1.6 | jl_2.x | jl_3.x testing/production enviroment
samiec alfa koncernu 'Cham_Burak_Prostak' || proved: the most annoying person on the forum

User avatar
cbs48
.
Posts: 249
Joined: Mon Apr 23, 2007 9:26 am
Location: Almere, the Netherlands
Contact:

Re: 0.91: How to show all players of a league instead of a team

Postby cbs48 » Thu Feb 21, 2008 8:18 am

It was for 0.91 but it should wordk for 0.92.

Oke thanx then there is something wrong with the module Thanx.

The strange thing about it that I got the same result with the original module team_players.
http://www.afbnscore.nl
Using Joomla 1.0.14 and Joomleague 0.92 svn 926
http://www.coachbart.nl
Using Joomla 1.0.13 and Joomleague 0.92 (test purpose only with data of afbnscore)


Return to “mod_joomleague_team_players”

Who is online

Users browsing this forum: No registered users and 2 guests

cron