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

"Kasper Skårhøj" kasper at typo3.com
Fri Oct 24 11:57:30 CEST 2003


Added



God bless

- kasper

*********** REPLY SEPARATOR  ***********

On 22-10-2003 at 14:07 Martin Kutschker wrote:

>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 
>
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev



God bless

- kasper


- kasper
-------------------- o ---------------------
>>>    In God I trust - others pay cash!     <<<
Check www.typo3.com







More information about the TYPO3-dev mailing list