Page 1 of 1

JoomLeague Modul Alle Spieler in einer Mannschaft

Posted: Sat May 19, 2018 10:04 pm
by Trubadix
How to get the short_name at this place? :help:
Image

Re: JoomLeague Modul Alle Spieler in einer Mannschaft

Posted: Sat Jun 02, 2018 5:58 pm
by desperate
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 :)