[TYPO3] New Extension: PMK SlimBox (LightBox clone)
Matthias Stuebner
news at contratec.de
Tue Apr 10 12:43:29 CEST 2007
On Tue, 10 Apr 2007 09:06:12 +0200, Peter Klein wrote:
>> Can I use it with images in my extension too, as I can with the lightbox?
>
> Sure.
The extension works great (Thanx) and that sound fine too, but could you
give one more hint on the following please?
Actually I render an image in my extension as follows:
function scaleImage($imgPath) {
$paramArray = $this->conf['videoImageProc.'];
$paramArray['file'] = $imgPath;
return $this->cObj->IMAGE($paramArray);
}
and that allows to configure it using TypoScript, using your TS code (see
below). But it doesn't behave as expected, doesn't even react on clicks.
Thanx in advance
### TS code ###
videoImageProc = IMAGE
videoImageProc.file.width = 200
videoImageProc {
imageLinkWrap >
imageLinkWrap = 1
imageLinkWrap {
enable.field = image_zoom
enable.ifEmpty.typolink.parameter.field = image_link
enable.ifEmpty.typolink.parameter.listNum.stdWrap.data = register :
IMAGE_NUM_CURRENT
enable.ifEmpty.typolink.returnLast = url
# Add new typolink wrapping code
typolink {
target = {$styles.content.links.target}
extTarget = {$styles.content.links.extTarget}
parameter.cObject = IMG_RESOURCE
parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile
parameter.cObject.file.maxW = {$styles.content.imgtext.slimbox.maxW}
parameter.cObject.file.maxH = {$styles.content.imgtext.slimbox.maxH}
# Except if the linkfield is not empty
parameter.override.field = image_link
parameter.override.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT
parameter.override.if.isTrue.field = image_link
# Add the "rel" attribute needed to activate the lightbox effect.
ATagParams = rel="lightbox"
ATagParams.override = rel="lightbox[sb{field:uid}]"
ATagParams.override.if.isTrue = $styles.content.imgtext.slimbox.navigable}
ATagParams.insertData = 1
ATagParams.if.isTrue.field = image_zoom
}
}
}
--
br Matthias
More information about the TYPO3-english
mailing list