Hi,
ich hab es schon soweit geschaft das ich ein neues Feld sehe.
So schaut es aus:
((siehe Anhang))
Mein Problem ist nun: Er schreibt es nicht richtig in die Datenbank, und liest es ebenso nicht richtig aus.
Wenn ich nur bei Bild etwas hochlade dann schreibt er es automatisch auch in das neue Feld.
Wenn ich nur bei PowerPoint etwas hochlade dann packt er es auch nur in dieses Datenbankfeld (was ja richtig ist.)
Woran könnte es liegen?
==============================================
Ich arbeite mit xammp und habe bisher folgendes geändert:
Datei: class.tx_cwtcommunity_pi1.php
Berreich 1: elseif ($CODE == "PROFILE_EDIT")
Änderung:
PHP-Code:
//Edit DF
$items['tx_cwtcommunityuser_ppt']['label'] = htmlspecialchars("PowerPoint Datei:");
$items['tx_cwtcommunityuser_ppt']['helptext'] = htmlspecialchars($this->pi_getLL('CWT_PROFILE_EDIT_PPT_HELPTEXT'));
$items['tx_cwtcommunityuser_ppt']['error_msg'] = htmlspecialchars($this->pi_getLL('CWT_PROFILE_EDIT_PPT_ERRMSG'));
//Ende Edit
Bereich 2: Create Form object
Änderung:
PHP-Code:
//Edit DF
$content.= $form->getElement("tx_cwtcommunityuser_ppt");
//Ende edit
Berreich 3: Create Marker Array
Änderung:
PHP-Code:
//Edit DF
$pathToImage = "uploads/tx_cwtcommunityuser/".$users[$i]['tx_cwtcommunityuser_ppt'];
$lConf = $this->conf['imagePopup.'];
$lConf['alttext']= "";
$markerArray["###PPT###"] = $cObj -> cImage($pathToImage, $lConf);
//Ende edit
Berreich 4: GetViewProfile
Änderung:
PHP-Code:
//Edit DF
$lConf = $this->conf['imagePopup.'];
$lConf['alttext']= "";
$pathToImage = "uploads/tx_cwtcommunityuser/".$user['tx_cwtcommunityuser_ppt'];
$markerArray["###PPT###"] = $cObj -> cImage($pathToImage, $lConf);
//Ende Edit
Berreich 5: GetViewProfile: Create Marker Array
Änderung:
PHP-Code:
//Edit me
$markerArray["###PPT###"] = $cObj -> cImage($pathToImage, $lConf);
//Ende Edit
Berreich 6: function doGetUserlist($letter:sad:
Änderung:
PHP-Code:
function doGetUserlist($letter)
{
if ($letter == null) {
//Edit DF
$users = $this -> doDatabaseQuery("SELECT * FROM fe_users WHERE pid = ".intval($this->sysfolderList)." AND NOT deleted=1 AND NOT disable=1 ORDER BY username ASC");
//Auskommentiert:
//$users = $this -> doDatabaseQuery("SELECT uid, username, name, city, country, www FROM fe_users WHERE pid = ".intval($this->sysfolderList)." AND NOT deleted=1 AND NOT disable=1 ORDER BY username ASC");
//
//Ende Edit
}
else{
//Edit DF
$users = $this -> doDatabaseQuery("SELECT * FROM fe_users WHERE pid = ".intval($this->sysfolderList)." AND (username LIKE '" . $letter . "%' OR username LIKE '" . strtoupper($letter) . "%') AND NOT deleted=1 AND NOT disable=1 ORDER BY username ASC");
//Auskommentiert
//$users = $this -> doDatabaseQuery("SELECT uid, username, name, city, country, www FROM fe_users WHERE pid = ".intval($this->sysfolderList)." AND (username LIKE '" . $letter . "%' OR username LIKE '" . strtoupper($letter) . "%') AND NOT deleted=1 AND NOT disable=1 ORDER BY username ASC");
//
//Ende Edit
}
// Return
return $users;
}
Datei: ext_tables.php
Berreich: Array tempColumns
Änderung:
PHP-Code:
//Edit me
"tx_cwtcommunityuser_ppt" => Array (
"exclude" => 1,
"label" => "LLL:EXT:cwt_community_user/locallang_db.php:fe_users.tx_cwtcommunityuser_ppt",
"config" => Array (
"type" => "group",
"internal_type" => "file",
"allowed" => $GLOBALS["TYPO3_CONF_VARS"]["GFX"]["imagefile_ext"],
"max_size" => 500,
"uploadfolder" => "uploads/tx_cwtcommunityuser",
"size" => 1,
"minitems" => 0,
"maxitems" => 1,
)
),
//Ende Edit
Berreich: Vorletzte Zeile
Änderung:
PHP-Code:
t3lib_extMgm::addToAllTCAtypes("fe_users","tx_cwtcommunityuser_image;;;;1-1-1,tx_cwtcommunityuser_ppt;;;;1-1-1, tx_cwtcommunityuser_sex");
Bemerkung: "tx_cwtcommunityuser_ppt;;;;1-1-1," wurde hinzugefügt.