Bilder in TYPO3 Extensions
Arbeitet man mit Bildern in einer TYPO3 Extension so kann dieser Beispielcode helfen:
$img = $this->conf["image."];
$img["file"] = "uploads/tx_extensionname/" .
$row["bild"];
$content.=$this->cObj->IMAGE($img);
Bild aus der DB lesen und dem Content beifügen
plugin.tx_extensionname_pi1 {
columns = 1
image {
file.maxW = 120
imageLinkWrap = 1
imageLinkWrap {
enable = 1
bodyTag (
<body bgcolor="#000000" leftmargin="2" topmargin="2">
)
wrap = <a href="javascript:close();"> | </a>
width = 640m
height = 640m
JSwindow = 1
JSwindow.newWindow = 1
JSwindow.expand = 4,4
}
}
}
Im TS Setup der Extension wird das Bild definiert
plugin.tx_extensionname_pi1 {
columns = 1
image {
file.maxW = 125
imageLinkWrap = 1
imageLinkWrap {
typolink {
parameter.cObject = IMG_RESOURCE
parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile
parameter.cObject.file.maxW = 834
parameter.cObject.file.maxH = 660
ATagParams = rel="lightbox"
ATagParams.override = rel="lightbox[sb{field:uid}]"
ATagParams.override.if.isTrue = {$plugin.pmkslimbox.imgtext.navigable}
ATagParams.insertData = 1
}
enable = 1
bodyTag (
<body bgcolor="#000000" leftmargin="2" topmargin="2"
marginwidth="2" marginheight="2">
)
wrap = <a href="javascript:close();"> | </a>
width = 834
height = 660
JSwindow = 1
JSwindow.newWindow = 1
JSwindow.expand = 4,4
}
}
}
...und wenn man das Bild im Lightbox öffnen möchte
War das Ihnen eine Hilfe? ein "LIKE" wäre ein tolles "Dankeschön"