JoomLeague Modul Alle Spieler in einer Mannschaft

Moderator: And_One

User avatar
Trubadix
.
Posts: 339
Joined: Fri Oct 24, 2008 4:35 pm
Joomleague version: 2.0.x
Location: 31542
Contact:

JoomLeague Modul Alle Spieler in einer Mannschaft

Postby Trubadix » Sat May 19, 2018 10:04 pm

How to get the short_name at this place? :help:
Image
Life-System : Joomla 2.5.28 auf Domainfactory, Joomleague 2.0.x
http://www.shootingleague.shg24.com/
Test-System: Joomla 3.6.x auf Strato, Joomleague 3.0.x
http://ligatest.ksv-nesselblatt.de/

desperate
.
Posts: 96
Joined: Sat May 01, 2010 5:53 pm

Re: JoomLeague Modul Alle Spieler in einer Mannschaft

Postby desperate » Sat Jun 02, 2018 5:58 pm

Look for ...administrator/components/com_joomleague/models/ajax.php and change in function get ProjectTeamOptions from name to short_name (2x) like this:

Code: Select all

function getProjectTeamOptions($project_id, $division_id=0, $required = false)
   {
      $query = "   SELECT CASE WHEN CHAR_LENGTH(t.alias) THEN CONCAT_WS(':', t.id, t.alias) ELSE t.id END AS value,
               t.short_name AS text
               FROM #__joomleague_project_team AS pt
               JOIN #__joomleague_team t ON t.id = pt.team_id
               JOIN #__joomleague_project p ON p.id = pt.project_id
               WHERE pt.project_id = " . $this->_db->Quote($project_id);
      if($division_id>0) {
         $query .= " AND pt.division_id = " . $this->_db->Quote($division_id);
      }
      $query .= " ORDER BY t.short_name";
      $this->_db->setQuery($query);
      return $this->addGlobalSelectElement($this->_db->loadObjectList(), $required);
   }



Or depending on your version JoomLeague

Code: Select all

function getProjectTeamOptions($project_id, $required = false)
   {
      $this->_db->setQuery(   "   SELECT CASE WHEN CHAR_LENGTH(t.alias) THEN CONCAT_WS(':', t.id, t.alias) ELSE tt.id END AS value,
                           t.short_name AS text
                           FROM #__joomleague_project_team tt
                           JOIN #__joomleague_team t ON t.id = tt.team_id
                           JOIN #__joomleague_project p ON p.id = tt.project_id
                           WHERE tt.project_id = " . $this->_db->Quote($project_id) . "
                           ORDER BY t.short_name" );
      return $this->addGlobalSelectElement($this->_db->loadObjectList(), $required);
   }


And enjoy :)


Return to “team_players”

Who is online

Users browsing this forum: No registered users and 0 guests