[Typo3] problem with array of image

ElRicko quota at videotron.ca
Wed Apr 13 16:41:07 CEST 2005


It's work, only last thing

How I change the URL?

<img src="typo3temp/pics/fafb7ed308.jpg" width="200" height="141"
border="0" alt="" title="" /><img src="typo3temp/pics/c2832e4172.jpg"
width="200" height="146" border="0" alt="" title="" />

My code:

$imgTSConfig = $this->conf['photosCObject.'];
$imgTSConfig['file'] =
'uploads/tx_userimmobilier/'.$this->internal["currentRow"][$fN];
$arrayUrl = array();
$arrayUrl = t3lib_div::trimExplode(',',
$this->internal["currentRow"][$fN], 1);
for($cpt=0;$cpt < count($arrayUrl); $cpt++)
{
	$imgTSConfig['file'] =
'uploads/tx_userimmobilier/'.$arrayUrl[$cpt];
	$content =  $content.$this->cObj->IMAGE($imgTSConfig);
}
debug($content); 
return $content;



-----Message d'origine-----
De : typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] De la part de Kraft
Bernhard
Envoyé : 13 avril, 2005 09:43
À : typo3-english at lists.netfielders.de
Objet : Re: [Typo3] problem with array of image

ElRicko wrote:
> My field photos is a IMAGE  and if I put 1 IMAGE no problem, if I put
> two IMAGE $this->cObj->IMAGE($imgTSConfig) not work

It is not the job of the cObj->IMAGE method to split up the image ....

just use
$array = t3lib_div::trimExplode(',', $imageList, 1);
to split the field into it's parts ...

and then use a foreach loop to iterate over the array and use
cObj->IMAGE
on each single pic


greets,
Bernhard
-- 
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list