[TYPO3-UG Dutch] cImage alt en title, en click enlarge
Jacco van der Post
jacco at id-internetservices.com
Tue Jun 8 08:40:12 CEST 2010
Ben er inmiddels al uit door gebruik te maken van $this->cObj->IMAGE ipv
cImage, en condities voor de popup. Voor de geinteresseerden :
$subPartContent = '';
$images = array();
$alttext = array();
$titletext = array();
# er is eigenlijk meestal maar 1 rij maar goed
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$carousel_title = $row['title'];
$images = explode(',', $row['image']);
$numberOfImages = count($images);
$alttext = explode(chr(10), $row['alttext']);
$titletext = explode(chr(10), $row['titletext']);
for ($row = 0; $row < $numberOfImages; $row++)
{
$file = 'uploads/tx_jpjcarousel/'.$images[$row];
echo $this->conf['pic.file.maxW'];
// thumbnails
$imgTSConfig = Array();
$imgTSConfig['file'] = $file;
$imgTSConfig['altText'] = $alttext[$row];
$imgTSConfig['titleText'] = $titletext[$row];
# uit setup.txt
$imgTSConfig['file.']['maxW'] =
$this->conf['pic.']['file.']['maxW'];
$imgTSConfig['file.']['maxH'] =
$this->conf['pic.']['file.']['maxH'];
if(t3lib_extMgm::isLoaded('rzcolorbox')) {
// indien extensie rzcolorbox geladen is dan config voor
rzcolorbox lightbox
$imgTSConfig['imageLinkWrap'] = 1;
$imgTSConfig['imageLinkWrap.']['enable'] = 1;
$imgTSConfig['imageLinkWrap.']['typolink.']['parameter.']['cObject'] =
IMG_RESOURCE;
$imgTSConfig['imageLinkWrap.']['typolink.']['parameter.']['cObject.']['file.']['import.']['data']
= 'TSFE:lastImageInfo|origFile';
$imgTSConfig['imageLinkWrap.']['typolink.']['parameter.']['cObject.']['file.']['maxW']
= $this->conf['pic.']['file.']['popup_maxW'];
$imgTSConfig['imageLinkWrap.']['typolink.']['parameter.']['cObject.']['file.']['maxH']
= $this->conf['pic.']['file.']['popup_maxH'];
$imgTSConfig['imageLinkWrap.']['typolink.']['parameter.']['override.']['listNum.']['stdWrap.']['data']
= 'register : IMAGE_NUM_CURRENT';
$imgTSConfig['imageLinkWrap.']['typolink.']['ATagParams'] =
'rel="rzcolorbox[cb1]" class="rzcolorbox cboxElement"';
$imgTSConfig['imageLinkWrap.']['typolink.']['title']=
$titletext[$row];;
}
else {
// On Click vergroten standaard
$imgTSConfig['imageLinkWrap'] = 1;
$imgTSConfig['imageLinkWrap.']['enable'] = 1;
$imgTSConfig['imageLinkWrap.']['bodyTag'] = '<BODY
style="background-color:#FFFFFF;">';
$imgTSConfig['imageLinkWrap.']['wrap'] = '<A
href="javascript:close();"> | </A>';
$imgTSConfig['imageLinkWrap.']['title'] = $titletext[$row];
$imgTSConfig['imageLinkWrap.']['JSwindow'] = 1;
$imgTSConfig['imageLinkWrap.']['JSwindow.']['newWindow'] = 1;
$imgTSConfig['imageLinkWrap.']['JSwindow.']['expand'] =
'17,20';
}
// zet imgTSConfig in submarker met IMAGE functie om er een afb van
te maken
$subPartContent .= $this->cObj->substituteMarker($subTemplate,
'###FIELD_IMAGE###', $this->cObj->IMAGE($imgTSConfig));
}
}
More information about the TYPO3-UG-Dutch
mailing list