[TYPO3-ttnews] Problem with generating images to new marker "preview_image" using itemMarkerArrayFunc

Frank Mey - NEW.EGO mey_mailings at newego.de
Mon May 23 14:30:36 CEST 2011


Hat sich erledigt- war/ist bug in der Extension fl_image_realurl 2.0.8 , und
zwar systemweit...

> -----Original Message-----
> From: typo3-project-tt-news-bounces at lists.typo3.org [mailto:typo3-
> project-tt-news-bounces at lists.typo3.org] On Behalf Of Frank Mey -
> NEW.EGO
> Sent: Monday, May 23, 2011 1:07 PM
> To: typo3-project-tt-news at lists.typo3.org
> Subject: [TYPO3-ttnews] Problem with generating images to new marker
> "preview_image" using itemMarkerArrayFunc
> 
> Hi list,
> 
> 
> 
> I am using the itemMarkerArrayFunc – hook in tt_news 3.x to get pictures
> from a custom added DB field into the list-view oft t_news.
> 
> 
> 
> My userFunc looks like this:
> 
> 
> 
> function user_displayPreviewImage( $markerArray, $conf ) {
> 
> 
> 
> 
> 
>       $row = $conf ['parentObj']->local_cObj->data; // get the data array
of the
> current news record
> 
> 
> 
> 
> 
>       if ($conf ['parentObj']->config['code'] == 'LIST') {
> 
> 
> 
> 
> 
>             if ($row ['tx_nettnewsext_previewimage'] != '') {
> 
>                   $img = array ();
> 
>                   $img ['file'] = 'uploads/tx_ttnews/' . $row
> ['tx_nettnewsext_previewimage'];
> 
>                   $img ['file.']['format'] = 'jpg';
> 
>                   $img ['file.']['quality'] = '75';
> 
> 
> 
>                   if (($conf ['code'] = 'LIST3') || ($conf ['code'] =
> 'LIST2')) {
> 
>                         $img ['file.'] ['width'] = '291c';
> 
>                         $img ['file.'] ['height'] = '144c';
> 
> 
> 
>                   } else { // Bildausschnitt für C-Teaser
> 
>                         $img ['file.'] ['width'] = '186c';
> 
>                         $img ['file.'] ['height'] = '106c';
> 
>                   }
> 
> 
> 
>                   $markerArray ['###PREVIEW_IMAGE###'] = $conf
['parentObj']-
> >local_cObj->IMAGE ( $img );
> 
> 
> 
>             } else {
> 
> 
> 
>                   $markerArray ['###PREVIEW_IMAGE###'] = '';
> 
> 
> 
>             }
> 
>       }
> 
> 
> 
>       return $markerArray;
> 
> 
> 
> }
> 
> 
> 
> Sadly, the returned IMG-Tag looks i.e. like this: “<img src="22."
> width="291" height="144" border="0" alt="">” .
> 
> It seems like the function cImage in the TYPO3 Core, which is called from
the
> 
->cObj->IMAGE render() function gets the
> 
> Right conf[‘file’] data but seems to loose the filename and filepath
> somehow.
> 
> 
> 
> How can this path issue be solved ? The DB field only holds the file name
and
> is correctly configured via the TCA.
> 
> Can I pass a output path to the cImage function directly ?
> 
> 
> 
> Thx for info and help J
> 
> Frank Mey
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> TYPO3-project-tt-news mailing list
> TYPO3-project-tt-news at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-tt-news



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