...statt der fkt...?
Also für alle hier nochmals ausführlich:
Die ext heisst "MJS_eventpro" und ist für Events mit Frontend-editing. Leider seit Jahren nicht mehr weiterentwickelt worden. Habe sie aber trotzdem soweit sehr gut an meine Bedürfnisse anpassen können.
Im Wesentlichen geht es jetzt noch um die Datei "pi1/class.tx_mjseventpro_pi1.php" welche unter anderem dafür zuständig ist, dass die Kategorien ausgegeben werden. dies findet 3mal statt:
Das 1. Mal ca. Zeile 238 (hier Zeile 3):
// Adds the category selector box:
$markerArray['###CATEGORY_LABEL###'] = $this->pi_getLL("listFieldHeader_cat");
$markerArray['###CATEGORY_SELECT###'] = $this->htmlSelect("tx_mjseventpro_cat", "title", 'cat');
Das 2. Mal ca. Zeile 1045:
/**
* Make the selectorbox with categories.
* $fNmm is the name of the field in the main table.
*/
function htmlSelect($table='', $fieldName='', $fNmm='') {
$validRowsArray = $this->validRows($table, $fieldName, $fNmm);
$selectedValue = $this->piVars[$fNmm];
$opt = array();
$opt[] = '<option value="'.
htmlentities($this->pi_linkTP_keepPIvars_url('', $this->allowCaching))
.'">alle</option>';
// Show selectorbox only, if there are any categories.
if($validRowsArray) {
foreach ($validRowsArray as $uid => $title) {
$opt[] = '<option value="'.
htmlentities($this->pi_linkTP_keepPIvars_url(array("cat" => $uid), $this->allowCaching))
.'"'.
($selectedValue == $uid ? " SELECTED" : "")
.'>'.
htmlentities($title)
.'</option>';
}
return '<select onChange="document.location=this.options[this.selectedIndex].value;">'.implode("", $opt).'</select>';
}
return '';
} // htmlSelect
/**
* Make the selectorbox with categories.
* $fNmm is the name of the field in the main table.
*
* @param string $table
* @param string $fieldName
* @param string $fNmm
* @return string
*/
function htmlSelect4input($table='', $fieldName='', $fNmm='') {
// Der Wert der Variablen $table wird nie benutzt (Zeile 1081)
// Der Wert der Variablen $fieldName wird nie benutzt (Zeile 1081)
$validRowsArray = $this->$fNmm;
$selectedValue = $this->piVars[$fNmm];
$opt = array();
$opt[] = '<option value="">-</option>';
// Show selectorbox only, if there are any categories.
if($validRowsArray) {
foreach ($validRowsArray as $uid => $title) {
$opt[] = '<option value="'.$uid.'"'.($selectedValue == $uid ? " SELECTED" : "").'>'.htmlentities($title).'</option>';
}
return '<select name="tx_mjseventpro_pi1['.$fNmm.']">'.implode("", $opt).'</select>';
}
return '';
} // htmlSelect4input
Das 3. Mal ca. Zeile 1209, hier findet die Ausgabe der Datenbak im FE-Formular statt:
function enterFEevent() {
// get Categories:
$this->cat = $this->validRows("tx_mjseventpro_cat", "title");
Mein Problem:
Überall wird "title" ausgegeben, was ich natürlich nach "uid" ändern kann. Dann habe ich aber nur die "uid" Nummer da stehen.
Ich brauch als Ausgabe den "title", aber sortiert nach "uid".
Und das ist die Entscheidende Frage:
Wie geht das?????
Wer hat einen Ansatz, die Datenbankausgabe zu sortieren?