How to veiw the players who haven't been assigned to team?

bastoe
Newbie
Posts: 8
Joined: Fri Nov 16, 2007 5:42 am
Contact:

How to veiw the players who haven't been assigned to team?

Postby bastoe » Mon Dec 24, 2007 3:26 am

I was able to get the player and league player mods working, but need to find a way to list the players who are still not assigned. In the team player mod I think the easiest way is to edit this query, but I have been unable to get it to perform...any thoughts?

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, firstname


The page that lists these is here: http://ctfzone.net/ctf/index.php?option=com_joomleague&Itemid=37

The left menu has the league players mod as the "assigned" league players grouped by position - (which really would be better grouped by teams if yall want to help with that as well please please!!!!) *the league players mod only works in the left position, top most ordering*

The middle section has the heading "free players" which shows blank for all my sad attempts at adding something like

Code: Select all

AND pt.team_id != 'NULL'
to the where part.

bastoe
Newbie
Posts: 8
Joined: Fri Nov 16, 2007 5:42 am
Contact:

Re: How to veiw the players who haven't been assigned to team?

Postby bastoe » Sat Dec 29, 2007 9:22 pm

Happy holidays to everyone, please see this when you get back :)

bastoe
Newbie
Posts: 8
Joined: Fri Nov 16, 2007 5:42 am
Contact:

Re: How to veiw the players who haven't been assigned to team?

Postby bastoe » Wed Jan 02, 2008 6:28 pm

bump , please Julienv

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

Re: How to veiw the players who haven't been assigned to team?

Postby julienV » Wed Jan 02, 2008 8:54 pm

i'm not using this module myself, and never looked at it. i'll try to check, but i don't have a lot of time these days (cannot help from work any more...).
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
julienV
Joomleague Core Developer
Joomleague Core Developer
Posts: 2016
Joined: Tue Jun 19, 2007 9:27 am
Location: France
Contact:

Re: How to veiw the players who haven't been assigned to team?

Postby julienV » Thu Jan 03, 2008 12:14 am

maybe try this:

Code: Select all

"SELECT p.*, pt.id AS playertoolid, pt.*, pp.name as position , t.short_name as team_short_name
                FROM #__joomleague_players p
                LEFT JOIN #__joomleague_playertool pt ON (p.id = pt.player_id AND pt.project_id = $project->id)
                LEFT JOIN #__joomleague_positions pp ON pp.id = pt.position_id
                LEFT JOIN #__joomleague_teams t ON t.id = pt.team_id                    
                ORDER BY pp.ordering, pt.position_id, firstname"
You can hire me, I'm a Joomla professional freelance developer.
Please contact me at jlv@jlv-solutions.com
NO PM, please use email !

bastoe
Newbie
Posts: 8
Joined: Fri Nov 16, 2007 5:42 am
Contact:

Re: How to veiw the players who haven't been assigned to team?

Postby bastoe » Fri Jan 11, 2008 3:57 am

Well it does grab the unused players and lists them paragraph style, then it puts the assigned players underneath in position calapses:

http://ctfzone.net/ctf/index.php?option ... &Itemid=37

That is ok, but the link to the players profile is broken.

The other question was to see if the League players mod could group by team and not by position?

Thx for the help!!!!

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

Re: How to veiw the players who haven't been assigned to team?

Postby julienV » Fri Jan 11, 2008 9:33 am

yeah, sorry, to be displayed, players have to be part of a team. there is no workaround for that at the moment.

for the grouping, change the "order by" to "ORDER BY pt.team_id, lastname", and the way the structure is walked (instead of doing a "foreach positions as...", do a "foreach team_id as...")
You can hire me, I'm a Joomla professional freelance developer.
Please contact me at jlv@jlv-solutions.com
NO PM, please use email !


Return to “mod_joomleague_team_players”

Who is online

Users browsing this forum: No registered users and 2 guests

cron