Hallo Steffen,
Danke für den Tip!
So funktioniert es:
PHP-Code:
$data = array(
'tt_news' => array(
uniqid('NEW') => array(
'pid' => $row['pageid'],
'tstamp' => $row['tstamp'],
'crdate' => $row['crdate'],
'datetime' => $date,
'cruser_id' => $row['feuser_id'],
'title' => $row['title'],
'short' => $row['abstract'],
'bodytext' => $row['text'],
'author' => $row['username'],
'author_email' => $row['email'],
'links' => $linklist,
'hidden' => 0,
'deleted' => 0,
'fe_group' => 1,
'category' =>$row['newscat_id'],
'tx_ratings_enable' => 1
)
)
);
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->start($data, null);
$tce->process_datamap();
Was ich nicht schnalle ist, dass die Tabellenzeile "category" in tt_news doch eigentlich die Anzahl der Kategorien auflistet.
Ich muss die categorie ('category' =>$row['newscat_id'],) benutzen damit er in der tt_news_cat_mm die richtige uid_foreign einträgt.