Zum Inhalt springen

Vistenkarten - System

Erstellt am 28. November 2005 · 23 Antworten · letzte Antwort am 1. Dezember 2005 · Seite 2 von 2

Tags: Frage

Sohn der Sonne ·
just2b schrieb
Sohn der Sonne schrieb

Hat geklappt. 🙂

Hänge jetzt daran neue Felder hinzuzufügen.

tca.php erweitern, locallang entsprechend erweitern, gegebenfalls flexforms erweitern, .sql erweitern, fertig

Die tca.php bildet genau 6 Haupt-Arrays:

$TCA["tx_cwtcommunity_message"]
$TCA["tx_cwtcommunity_buddylist"]
$TCA["tx_cwtcommunity_buddylist_approval"]
$TCA["tx_cwtcommunity_guestbook"]
$TCA["tx_cwtcommunity_guestbook_data"]
$TCA["tx_cwtcommunity_icons"]

Und ich wüsste nicht welches davon ich editieren sollte.

Ziel soll es ja sein neue Profilfelder zu bekommen, die man dann editieren kann. Hauptziel dabei: Ein weiters Bild und eine Datei (*.ppt).

Die locallang muss angepasst werden, damit die neuen Felder Namen haben, klar.

Felxforms ... ich schau mir mal an was das ist, vom Namen her denke ich das sind die Eingabe-Forms?

.sql erweitern: Ich denke damit meinst du die Datenbank, das ist geschehen (Felder einfügen). 🙂

Sohn der Sonne ·

Also, ich hab das neue Feld unter Edit Profile.

Aber leider nutzt er nicht mein Datenbankfeld, sondern das normale Imagefeld.

Meine Änderungen:

Pfad: /cwt_community

Datei 1: locallang_tca.php

Berreich: Array 'de'

Änderung:

	//Edit me
		'cwt_community.pi_flexform.sheet_general' => 'Hauptseite',
		'cwt_community.pi_flexform.sheet_general_code' => 'Wählen Sie Ihre Ansicht:',
		'cwt_community.pi_flexform.sheet_general_code.I.0' => 'Willkommen',
		'cwt_community.pi_flexform.sheet_general_code.I.1' => 'Nachrichten',
		'cwt_community.pi_flexform.sheet_general_code.I.2' => 'Gästebuch',
		'cwt_community.pi_flexform.sheet_general_code.I.3' => 'Nutzerprofil',
		'cwt_community.pi_flexform.sheet_general_code.I.4' => 'Nutzerprofil editieren',
		'cwt_community.pi_flexform.sheet_general_code.I.5' => 'Benutzerliste',
		'cwt_community.pi_flexform.sheet_general_code.I.6' => 'Freunde',
	//Ende Edit

Pfad: /cwt_community/p1

Datei 1: class.tx_cwtcommunity_pi1.php

Berreich 1: elseif ($CODE == "PROFILE_EDIT")

Änderung:

	//Edit me
		$items['tx_cwtcommunityuser_ppt']['label'] = htmlspecialchars("PowerPoint Datei:");
		$items['tx_cwtcommunityuser_ppt']['helptext'] =  htmlspecialchars($this->pi_getLL('CWT_PROFILE_EDIT_IMAGE_HELPTEXT'));
		$items['tx_cwtcommunityuser_ppt']['error_msg'] = htmlspecialchars($this->pi_getLL('CWT_PROFILE_EDIT_IMAGE_ERRMSG'));
	//Ende Edit

Bereich 2: Create Form object

Änderung:

	//Edit me
		$content.= $form->getElement("tx_cwtcommunityuser_ppt"); 
	//Ende edit

Berreich 3: Create Marker Array

Änderung:

	//Edit me
		$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:

	//Edit me
		$pathToImage = "uploads/tx_cwtcommunityuser/".$user['tx_cwtcommunityuser_ppt'];
		$lConf = $this->conf['imagePopup.'];
		$lConf['alttext']= "";
	//Ende Edit



Berreich 5: GetViewProfile: Create Marker Array

Änderung:

	//Edit me
		$markerArray["###PPT###"] = $cObj -> cImage($pathToImage, $lConf);
	//Ende Edit

Berreich 6: function doGetUserlist($letter), im Else:

Änderung:

	// Fetch users
	//Edit me
		$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");
	//Ende Edit

	//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 Auskommmentiert


Datei 2: locallang.php

Berreich: Array 'de'

Änderung: 

	//Edit me
	//PPT
		'CWT_PROFILE_EDIT_PPT_LABEL' => 'PowerPoint Datei:',
		'CWT_PROFILE_EDIT_PPT_HELPTEXT' => 'Diese Datei wird im Profil gespeichert.',
	//Edit Ende

Pfad: cwt_community_user

Datei: ext_tables.php

Berreich: Array tempColumns

Änderung:

	//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:

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.

Datei: ext_tables.sql

Berreich: CREATE TABLE fe_users

Änderung:

tx_cwtcommunityuser_ppt blob NOT NULL,