[TYPO3-ttnews] Import of Dam images to news (from Georg Ringer)

Björn Pedersen pedersen at frm2.tum.de
Wed Sep 21 15:56:45 CEST 2011


Am 20.09.2011 07:53, schrieb Georg Ringer:
> Hi Björn,
> 
> Am 20.09.2011 07:30, schrieb Björn Pedersen:
>> The general difference is: with DAM you only store a reference to the
>> DAM table and have to resolve the image with a userfunction provided by
>> DAM. For tt_news the extension dam_ttnews overwrites then
>> imagemarkerfunction of news.
> 
> i know that, but still the importer needs to be adopted.
> 
> Georg

So a bit more info: the field tx_damnews_dam_images/_media contains the
image count
attached to the news item.

in the table tx_dam_mm_ref the entries look like:
uid_local uid_foreign tablenames ident sorting sorting_foreign
1249 	175 	tt_news 	tx_damnews_dam_images	0 	1
1249 	174 	tt_news 	tx_damnews_dam_images	0 	1

wher tablenames and ident are actualy freely chooseable in the call of
the user function.

So the importer probably only has to do the following things:
copy the tx_damnews_image field and adjust uid_foreign in the mm table.
something like:
UPDATE  tx_dam_mm_ref SET uid_foreign=<uid of imported entry> WHERE
uid_foreign=<uid on entry to import> and tablename='tx_damnews_dam_images'.

Or create corresponig new entries. The rest is TS/userfunction stuff.

Björn



More information about the TYPO3-project-tt-news mailing list