[Typo3-dev] add table to arbitrary group/db type fields (insert records)

Martin Kutschker Martin.T.Kutschker at blackbox.net
Wed Oct 22 14:07:49 CEST 2003


Hi!

For a plugin I wanted to use tt_rating with a custom table. After resolving a few problems (the extension is broken in several respects) I came to the point where I had to make tt_rating/recordlink accept my table. ext_tables.php of tt_rating has unfortunately a direct reference to the TCA of tt_content, which won't accept any extension tables loaded after tt_rating :-(

I solved the problem in my tca.php, but this changed function of t3lib_extmgm is a more general solution.

function addToInsertRecords($table,$content_table="tt_content",$content_field="records") {
global $TCA;
t3lib_div::loadTCA($content_table);
if (is_array($TCA[$content_table]["columns"])) {
if (isset($TCA[$content_table]["columns"][$content_field]["config"]["allowed"]))
$TCA[$content_table]["columns"][$content_field]["config"]["allowed"].=",".$table;
else
$TCA[$content_table]["columns"][$content_field]["config"]["allowed"]=$table;
}
}

Regards,
Masi 





More information about the TYPO3-dev mailing list