[TYPO3-dam] New extension "damlightbox" - sounds interessting?

Dr. Ronald P. Steiner Ronald.Steiner at googlemail.com
Fri Mar 28 07:55:07 CET 2008


Hi Torsten,

>> Why do you set:
>> damlightbox.config.no_cache = 1
>> - is caching bad for damlightbox?
> 
> If TYPO3 caches the lightbox page the display of multiple images within 
> one lightbox will stop working - it will always show the first image and 
> it's metadata.

only because you set the links to and in the lightbox not correctly. 
This can easily be fixed: 1),2),3)

1)
class.tx_damlightbox_pi1.php:
Remove line 226:
[code]
$hiddenLinks .= '<a title="'.$title.'" rev="width='.$widthCalc.', 
height='.$heightCalc.'" rel="lightbox[sb'.$uid.']" 
href="index.php?id='.$GLOBALS['TSFE']->id.'&amp;type=313&amp;content='.$uid.'&amp;img='.$key.'"></a>';
[/code]

Include there:
[code]
$conf['parameter'] = $GLOBALS['TSFE']->id; #TS: parameter.data=page:uid
$conf['no_cache'] = 0;
$conf['useCacheHash'] = 1;
$conf['additionalParams'] = 'type=313&content='.$uid.'&img='.$key;
$conf['returnLast'] = 'url';
$url = $this->cObj->typolink(NULL,$conf);
$hiddenLinks .= '<a test title="'.$title.'" rev="width='.$widthCalc.', 
height='.$heightCalc.'" rel="lightbox[sb'.$uid.']" href="'.$url.'"></a>';
// instead generating the $conf here, you also could generate it via TS
[/code]

2)
class.tx_damlightbox_pi1.php:

Include after line 50:
[code]
var $pi_checkCHash = true;
var $pi_USER_INT_obj = 0;
[code]

3)
in both setup.txt files:
[code]
...
1.imageLinkWrap.typolink {
	### vv include this vv ###	
	no_cache = 0
	useCacheHash = 1
	### ^^ indlude this ^^ ##
...
[/code]

I tested it and it works perfect.

greetings

Ron


More information about the TYPO3-project-dam mailing list