The official extension repository only consists of freely available extensions. In the future only security reviewed extensions will be displayed. More information about reviews and disclaimer. New documentation is rendered once a day.

The following extension versions depend on this extension:
| Filename | Size | View | Date | Download |
|---|---|---|---|---|
| ChangeLog | 646 | View | 09.12.2007 | Download |
| bak.php | 29 K | View | 09.12.2007 | Download |
| class.ux_tslib_content.php | 31 K | View | 09.12.2007 | Download |
| ext_conf_template.txt | 3.4 K | View | 09.12.2007 | Download |
| ext_icon.gif | 556 | View | 09.12.2007 | Download |
| ext_localconf.php | 199 | View | 09.12.2007 | Download |
| ext_tables.php | 2.5 K | View | 09.12.2007 | Download |
| ext_tables.sql | 280 | View | 09.12.2007 | Download |
| locallang_db.xml | 2.2 K | View | 09.12.2007 | Download |
| doc/manual.sxw | 662 K | 09.12.2007 | Download | |
| doc/wizard_form.dat | 1.1 K | 09.12.2007 | Download | |
| doc/wizard_form.html | 5.6 K | 09.12.2007 | Download | |
| lightbox/css/lightbox.css | 2.8 K | View | 09.12.2007 | Download |
| lightbox/images/blank.gif | 43 | View | 09.12.2007 | Download |
| lightbox/images/close.gif | 222 | View | 09.12.2007 | Download |
| lightbox/images/close_2.gif | 1.4 K | View | 09.12.2007 | Download |
| lightbox/images/closelabel.gif | 1.0 K | View | 09.12.2007 | Download |
| lightbox/images/loading.gif | 2.7 K | View | 09.12.2007 | Download |
| lightbox/images/next.gif | 305 | View | 09.12.2007 | Download |
| lightbox/images/nextlabel.gif | 354 | View | 09.12.2007 | Download |
| lightbox/images/prev.gif | 307 | View | 09.12.2007 | Download |
| lightbox/images/prevlabel.gif | 371 | View | 09.12.2007 | Download |
| lightbox/images/print.gif | 168 | View | 09.12.2007 | Download |
| lightbox/images/save.gif | 156 | View | 09.12.2007 | Download |
| lightbox/js/effects.js | 31 K | 09.12.2007 | Download | |
| lightbox/js/lightbox.js | 22 K | 09.12.2007 | Download | |
| lightbox/js/prototype.js | 46 K | 09.12.2007 | Download | |
| lightbox/js/scriptaculous.js | 2.1 K | 09.12.2007 | Download | |
| res/print.php | 1.2 K | View | 09.12.2007 | Download |
| static/ImageLightbox_v2/constants.txt | 11 | View | 09.12.2007 | Download |
| static/ImageLightbox_v2/setup.txt | 847 | View | 09.12.2007 | Download |
<?php
/***************************************************************
* Copyright notice
*
* (c) 2005 Julian Kleinhans (typo3@kj187.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Imagelightbox v2
* @author Julian Kleinhans <typo3@kj187.de>
*/
class ux_tslib_cObj extends tslib_cObj {
// kj_imagelightbox2 - global var singleCaption
var $singleCaption = 0;
/**
* Returns a <img> tag with the image file defined by $file and processed according to the properties in the TypoScript array.
* Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript. This function is called by "$this->cImage($conf['file'],$conf);" from IMAGE().
*
* @param string File TypoScript resource
* @param array TypoScript configuration properties
* @return string <img> tag, (possibly wrapped in links and other HTML) if any image found.
* @access private
* @see IMAGE()
*/
function cImage($file,$conf) {
$info = $this->getImgResource($file,$conf['file.']);
$GLOBALS['TSFE']->lastImageInfo=$info;
if (is_array($info)) {
$info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);
$GLOBALS['TSFE']->imagesOnPage[]=$info[3]; // This array is used to collect the image-refs on the page...
if (!strlen($conf['altText']) && !is_array($conf['altText.'])) { // Backwards compatible:
$conf['altText'] = $conf['alttext'];
$conf['altText.'] = $conf['alttext.'];
}
$altParam = $this->getAltParam($conf);
/**
* kj_imagelightbox2 - begin
*/
if($conf['imageLightbox2'] OR ($this->data['tx_kjimagelightbox2_imagelightbox2']==1 AND $this->data['image_zoom'] == 0 AND $this->data['image_link'] == '')){
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['kj_imagelightbox2']);
// dynamic CSS
$bgColor = ($extConf['bgColor'] != '') ? $extConf['bgColor'] : 'black';
$styleCloseButton = ($extConf['styleCloseButton'] != '') ? $extConf['styleCloseButton'] : '';
$cscCaption = ($extConf['cscCaption'] != '') ? $extConf['cscCaption'] : '';
$prevLinkImage = ($extConf['prevLinkImage'] != '') ? $extConf['prevLinkImage'] : '../images/prevlabel.gif';
$nextLinkImage = ($extConf['nextLinkImage'] != '') ? $extConf['nextLinkImage'] : '../images/nextlabel.gif';
$showNextPrevLinkImageAlways = ($extConf['showNextPrevLinkImageAlways'] == 1) ? 1 : 0 ;
$presModeStyleActNumber = ($extConf['presModeStyleActNumber'] == '') ? 'color:#000000; font-weight:bold; text-decoration:none; width:100%;' : $extConf['presModeStyleActNumber'] ;
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_dynCss'] = '
<style type="text/css">
/*<![CDATA[*/
#overlay {
background-color: '.$bgColor.';
}
#imageData #bottomNavClose {
'.$styleCloseButton.'
}
.csc-textpic-caption {
'.$cscCaption.'
}
#prevLink, #nextLink {
'.($showNextPrevLinkImageAlways == 0 ? 'background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */' : '').'
}
#prevLink {
'.($showNextPrevLinkImageAlways == 1 ? 'background: url('.$prevLinkImage.') left 15% no-repeat;' : '').'
}
#nextLink {
'.($showNextPrevLinkImageAlways == 1 ? 'background: url('.$nextLinkImage.') right 15% no-repeat;' : '').'
}
#prevLink:hover, #prevLink:visited:hover {
background: url('.$prevLinkImage.') left 15% no-repeat;
}
#nextLink:hover, #nextLink:visited:hover {
background: url('.$nextLinkImage.') right 15% no-repeat;
}
.presentationmodeAct a:link {
'.$presModeStyleActNumber.'
}
/*]]>*/
</style>
';
// dynamic JavaScript
$resizeSpeed = ($extConf['resizeSpeed'] != '')?$extConf['resizeSpeed']:7;
$fileLoadingImage = ($extConf['fileLoadingImage'] != '')?$extConf['fileLoadingImage']:'typo3conf/ext/kj_imagelightbox2/lightbox/images/loading.gif';
$fileBottomNavCloseImage = ($extConf['fileBottomNavCloseImage'] != '')?$extConf['fileBottomNavCloseImage']:'typo3conf/ext/kj_imagelightbox2/lightbox/images/closelabel.gif';
$numberDisplayLabel = ($extConf['numberDisplayLabel'] != '|')?$extConf['numberDisplayLabel']:'Image | of';
$numberDisplayLabel = explode('|',$numberDisplayLabel);
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_dynJs'] = '
<script type="text/javascript">
/*<![CDATA[*/
var resizeSpeed = '.$resizeSpeed.'; // controls the speed of the image resizing (1=slowest and 10=fastest)
var fileLoadingImage = "'.$fileLoadingImage.'";
var fileBottomNavCloseImage = "'.$fileBottomNavCloseImage.'";
var numberDisplayLabelFirst = "'.$numberDisplayLabel[0].'";
var numberDisplayLabelLast = "'.$numberDisplayLabel[1].'";
/*]]>*/
</script>
';
// add stylesheet and javascript to header
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_css'] = '<link rel="stylesheet" href="'.t3lib_extMgm::siteRelPath('kj_imagelightbox2').'lightbox/css/lightbox.css" type="text/css" media="screen" />';
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_js_prototype'] = '<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('kj_imagelightbox2').'lightbox/js/prototype.js"></script>';
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_js_scriptaculous'] = '<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('kj_imagelightbox2').'lightbox/js/scriptaculous.js?load=effects"></script>';
$GLOBALS['TSFE']->additionalHeaderData['kj_imagelightbox2_js_lightbox'] = '<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('kj_imagelightbox2').'lightbox/js/lightbox.js"></script>';
// maxWidth and maxHeight for the clicked image
$imageLightbox2Conf['maxW'] = ($extConf['imageLightbox2maxW']==700) ? $conf['file.']['imageLightbox2maxW']:$extConf['imageLightbox2maxW'];
$imageLightbox2Conf['maxH'] = ($extConf['imageLightbox2maxH']==700) ? $conf['file.']['imageLightbox2maxH']:$extConf['imageLightbox2maxH'];
$newinfo = $this->getImgResource($info['origFile'],$imageLightbox2Conf);
// set caption from ts or data
$tempCap = $this->stdWrap($conf['imageLightbox2.']['caption'],$conf['imageLightbox2.']['caption']);
$cap = explode(chr(10),($tempCap=='' ? $this->data['imagecaption']:$tempCap));
// set name for imageset
$imgSetNumber = (intval($conf['imageLightbox2.']['imageset'])>0)?intval($conf['imageLightbox2.']['imageset']):$this->data['uid'];
$imgSet = ($this->data['tx_kjimagelightbox2_imageset']==1 OR intval($conf['imageLightbox2.']['imageset'])>0)?'['.$imgSetNumber.']':'';
if($this->data['tx_kjimagelightbox2_presentationmode']!=1 AND $conf['imageLightbox2.']['presentMode'] !=1){
//save image icon
if($extConf['saveImageShow']==1){
if($conf['file.']['saveImageShow'] == '' OR intval($conf['file.']['saveImageShow'])>0){
if($conf['imageLightbox2.']['saveImageShow'] == '' OR intval($conf['imageLightbox2.']['saveImageShow'])>0){
$saveImageIcon = ($extConf['saveImageIcon'] != '')?$extConf['saveImageIcon']:'typo3conf/ext/kj_imagelightbox2/lightbox/images/save.gif';
$imageToolbar .= '<a href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($newinfo[3])).'" target="_blank"><img src="'.$saveImageIcon.'" border="0" title="'.$extConf['saveImageIconTitle'].'""</a> ';
}
}
}else{
$imageToolbar .= '';
}
//print image icon
if($extConf['printImageShow']==1){
if($conf['file.']['printImageShow'] == '' OR intval($conf['file.']['printImageShow'])>0){
if($conf['imageLightbox2.']['printImageShow'] == '' OR intval($conf['imageLightbox2.']['printImageShow'])>0){
$printImageIcon = ($extConf['printImageIcon'] != '')?$extConf['printImageIcon']:'typo3conf/ext/kj_imagelightbox2/lightbox/images/print.gif';
$imageToolbar .= ' <a href="'.t3lib_extMgm::siteRelPath('kj_imagelightbox2').'res/print.php?image='.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($newinfo[3])).'" target="_blank" ><img src="'.$printImageIcon.'" border="0" title="'.$extConf['printImageIconTitle'].'""</a> ';
}
}
}else{
$imageToolbar .= '';
}
$hideNumberDisplay = 0;
}else{
// Presentationmode
$hideNumberDisplay = 1;
$imageArrTmp = explode(',',$this->data['image']);
$imageToolbar .= sizeof($imageArrTmp);
#$imageToolbar .= '<span class="presentationmode presentationmodeSpan" ><a href="#" class="presentationmode" id="'.$i.'" onClick="myLightbox.changeImage('.($i-1).'); return false;">'.$i.'</a></span>';
unset($imageArrTmp);
}
// get break
#$imageToolbar = ($imageToolbar=='')?'':chr(10).$imageToolbar;
// create the imagelink
$theValue = '<a href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($newinfo[3])).'" rel="lightbox'.$imgSet.'" title="'.$cap[$this->singleCaption].'" id="'.$this->singleCaption.'" showNumberDisplay="'.$hideNumberDisplay.'" kjtag="'.$imageToolbar.''.($this->data['tx_kjimagelightbox2_presentationmode'] ? '' : $cap[$this->singleCaption]).'"><img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').($conf['params']?' '.$conf['params']:'').($altParam).' /></a>';
$this->singleCaption++;
/**
* kj_imagelightbox2 - end
*/
// kj_imagelightbox2 - add else
} else {
$theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').($conf['params']?' '.$conf['params']:'').($altParam).' />';
}
if ($conf['linkWrap']) {
$theValue = $this->linkWrap($theValue,$conf['linkWrap']);
} elseif ($conf['imageLinkWrap']) {
$theValue = $this->imageLinkWrap($theValue,$info['origFile'],$conf['imageLinkWrap.']);
}
return $this->wrap($theValue,$conf['wrap']);
}
}
/**
* Rendering the cObject, IMGTEXT
*
* @param array Array of TypoScript properties
* @return string Output
* @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=363&cHash=cf2969bce1
*/
function IMGTEXT($conf) {
/**
* kj_imagelightbox2 - begin
*/
$this->singleCaption = 0;
/**
* kj_imagelightbox2 - end
*/
$content='';
if (is_array($conf['text.'])) {
$content.= $this->stdWrap($this->cObjGet($conf['text.'],'text.'),$conf['text.']); // this gets the surrounding content
}
$imgList=trim($this->stdWrap($conf['imgList'],$conf['imgList.'])); // gets images
if ($imgList) {
$imgs = t3lib_div::trimExplode(',',$imgList);
$imgStart = intval($this->stdWrap($conf['imgStart'],$conf['imgStart.']));
$imgCount= count($imgs)-$imgStart;
$imgMax = intval($this->stdWrap($conf['imgMax'],$conf['imgMax.']));
if ($imgMax) {
$imgCount = t3lib_div::intInRange($imgCount,0,$conf['imgMax']); // reduces the number of images.
}
$imgPath = $this->stdWrap($conf['imgPath'],$conf['imgPath.']);
// initialisation
$caption='';
$captionArray = array();
if (!$conf['captionSplit'] && !$conf['imageTextSplit'] && is_array($conf['caption.'])) {
$caption = $this->stdWrap($this->cObjGet($conf['caption.'], 'caption.'),$conf['caption.']); // global caption, no splitting
}
/**
* kj_imagelightbox2
* AND $this->data['tx_kjimagelightbox2_imagelightbox2']!=1 hinzugefügt
*/
if ($conf['captionSplit'] && $conf['captionSplit.']['cObject'] && $this->data['tx_kjimagelightbox2_imagelightbox2']!=1) {
$legacyCaptionSplit = 1;
$capSplit = $this->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']);
if (!$capSplit) {$capSplit=chr(10);}
$captionArray = explode($capSplit, $this->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject'));
while (list($ca_key, $ca_val) = each($captionArray)) {
$captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']);
}
}
$tablecode='';
$position=$this->stdWrap($conf['textPos'],$conf['textPos.']);
$tmppos = $position&7;
$contentPosition = $position&24;
$align = $this->align[$tmppos];
$cap = ($caption)?1:0;
$txtMarg = intval($this->stdWrap($conf['textMargin'],$conf['textMargin.']));
if (!$conf['textMargin_outOfText'] && $contentPosition<16) {
$txtMarg=0;
}
$cols = intval($this->stdWrap($conf['cols'],$conf['cols.']));
$rows = intval($this->stdWrap($conf['rows'],$conf['rows.']));
$colspacing = intval($this->stdWrap($conf['colSpace'],$conf['colSpace.']));
$rowspacing = intval($this->stdWrap($conf['rowSpace'],$conf['rowSpace.']));
$border = intval($this->stdWrap($conf['border'],$conf['border.'])) ? 1:0;
$borderColor = $this->stdWrap($conf['borderCol'],$conf['borderCol.']);
$borderThickness = intval($this->stdWrap($conf['borderThick'],$conf['borderThick.']));
$borderColor=$borderColor?$borderColor:'black';
$borderThickness=$borderThickness?$borderThickness:1;
$caption_align = $this->stdWrap($conf['captionAlign'],$conf['captionAlign.']);
if (!$caption_align) {
$caption_align = $align;
}
// generate cols
$colCount = ($cols > 1) ? $cols : 1;
if ($colCount > $imgCount) {$colCount = $imgCount;}
$rowCount = ($colCount > 1) ? ceil($imgCount / $colCount) : $imgCount;
// generate rows
if ($rows>1) {
&nbs