Zum Inhalt springen

content wird nicht ausgegeben...

Erstellt am 7. März 2007 · 1 Antwort · letzte Antwort am 7. März 2007

Tags: Frage

Ande ·

Hallo
Also ich habe versucht ein template ein diese Extension einzubinden. Ich weiss das es gefunden wird, aber irgendwie wird content nicht ausgegeben. Nur das "Playerprofile" div wird im Quelltext angezeigt, aber das liegt ja an wrapInBaseClass.
Ich hab hier schon mehrere Threads mit dem selben Problem gefundn, doch die dortigen Lösungen haben mir nicht geholfen.
Bei den Debug-Befehlen bekomme ich jetzt auch nichts mehr angezeigt, also wo liegt das Problem?
Wäre super wenn mir jemand helfen könnte.
Ande

function main($content,$conf){

				$this->conf = $conf;
				$this->pi_setPiVarDefaults();
				$this->pi_loadLL();
                              
                              
$this->templateCode = $this->cObj->fileResource($this->conf['templateFile']);
$content .= $this->displayAll();
return $this->pi_wrapInBaseClass($content);
                               
}

       
function displayAll()      {
	$content = "";
	$template = $this->cObj->getSubpart($this->templateCode,"###TEMPLATE###");

	$markerArray=array();
	$wrappedSubpartArray=array();
	$rows = $this->getItems();
                               
	while( list($c,$row)=each($rows) )      {
		$markerArray["###MARKERONE###"] = $row['first_name'];
		$markerArray["###MARKERTWO###"] = $row['image'];

	$content.=$this->cObj->substituteMarkerArrayCached($template,$markerArray,array(),$wrappedSubpartArray);

	}
                                

#t3lib_div::debug($);

#t3lib_div::debug($);

return $content;               
}


/**
 * function.
 */
function getItems()     {

$this->config["pid_list"] = trim($this->cObj->stdWrap($this->conf["pid_list"],$this->conf["pid_list."]));
$this->config["pid_list"] = $this->config["pid_list"] ? implode(t3lib_div::intExplode(",",$this->config["pid_list"]),",") : $this->cObj->data["pages"];
list($pid) = explode(",",$this->config["pid_list"]);
$this->pid = $pid;

$query = "SELECT * FROM tx_playerprofile_list WHERE pid = (".$pid.")" . $this->cObj->enableFields("tx_playerprofile_list") . " ORDER BY sorting";
$res = mysql(TYPO3_db,$query);

$out = array();
while( $row = mysql_fetch_assoc($res) ) {
$out[]=$row;            }
return $out;
  }
       
}

Im Quelltext wird nur das hier ausgegen.

	<div class="tx-playerprofile-pi1">
		
	</div>
Ande ·

Hallo nochmal
Solange ich mit dem obigen Problem nicht weiterkomme, wollte ich mir mal DB-Funktionen vornehmen.Unzwar:

$config["pid_list"] = trim($this->cObj->stdWrap($this->conf["pid_list"],$this->conf["pid_list."]));
$config["pid_list"] = $config["pid_list"] ? implode(t3lib_div::intExplode(",",$config["pid_list"]),",") : $GLOBALS["TSFE"]->id;
list($pid) = explode(",",$config["pid_list"]);


$query = "SELECT * FROM  tx_playerprofile_list WHERE pid IN (".$pid.") ORDER BY sorting";

$res = mysql(TYPO3_db,$query);

$out=array();

while($row = mysql_fetch_assoc($res)){
$out[]=$row;
}
return $out;
}
}

Laut dem deveval soll dass ja nicht mehr so der stand der Dinge sein.

DEPRECATED - use exec_* functions from this class instead!

Deshalb wollte ich es mit den exec functions probieren, unzwar so:

$config["pid_list"] = trim($this->cObj->stdWrap($this->conf["pid_list"],$this->conf["pid_list."]));
$config["pid_list"] = $config["pid_list"] ? implode(t3lib_div::intExplode(",",$config["pid_list"]),",") : $GLOBALS["TSFE"]->id;
list($pid) = explode(",",$config["pid_list"]);


$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('first_name,image','tx_playerprofile_list','pid IN (".$pid.")',"",'title');

$out=array();

while($row = mysql_fetch_assoc($res)){
$out[]=$row;
}
return $out;
}
}

Müsste doch eigenlich klappen oder? Tut es aber nicht! Weiss hier jemand warum? Na ja jedenfalls bekomm ich das auch nicht hin :o
Ciao Ande