Ich bahe eine Variante gefunden die imagelightbox für die thumbnails laufen zulassen.
Es sind nur wenige Änderungen im Code nötig. Was allerdings getan werden muss, ist die Kompatibilität zu den vorangegangenen Versionen zu gewährleisten. Bei mir gibt es nun keine Einzelansicht mehr.
Änderungen der Datei class.tx_wtgallery_p1.php
in function list_view:
unter
$roundedcorner_array['innerradiussubtract'] = $this->getvalue('roundedcorner_innerradiussubtract','special_effects_list','3','No value for substract inner radius',0); // Rounded Corners
folgendes einfügen
$popup = $this->getvalue('show_popup','config_popup','1','No popup definition',0);
$popup_width = $this->getvalue('popup_width','config_popup','800','No popup width defined',0);
$popup_quality = $this->getvalue('quality','config_popup','75','No popup quality defined',0);
// Imagelightbox part
if($popup=='imagelightbox' AND t3lib_extMgm::isLoaded('kj_imagelightbox2',0)) { // If imagelightbox should be activated AND imagelightbox is loaded
include t3lib_extMgm::extPath('wt_gallery') . 'imagelightbox/imagelightbox.php'; // Include Header Code
$GLOBALS['TSFE']->pSetup["headerData."]['100'] = 'COA';
$GLOBALS['TSFE']->pSetup["headerData."]['100.']['10'] = "TEXT";
$GLOBALS['TSFE']->pSetup["headerData."]['100.']['10.']['value'] = $imlightbox;
}
UND
// Current picture separating with different classes (show the current picture in a special style)
if ($currentpic) { // The visitor has choosen a special picture
if ($picture == $currentpic) { // The current picture of the loop == the picture that the visitor has choosen
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_act'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$this->generateHash($picture,$picfolder,$quality,$ratio,$quality,$watermark_pic,$watermark_alpha,$roundedcorner_array,$filter_array).$basename,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_act'.$classadd_pic,'',$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
} else { // The current picture of the loop is not the picture that the visitor has choosen
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_no'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$this->generateHash($picture,$picfolder,$quality,$ratio,$quality,$watermark_pic,$watermark_alpha,$roundedcorner_array,$filter_array).$basename,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_no'.$classadd_pic,'',$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
}
} else { // Else: no picture is selected, take first one
if ($i == '0') { // If the current picture of the loop is the first one
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_act'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$this->generateHash($picture,$picfolder,$quality,$ratio,$quality,$watermark_pic,$watermark_alpha,$roundedcorner_array,$filter_array).$basename,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_act'.$classadd_pic,'',$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
} else { // If the current picture is not the first one
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_no'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$this->generateHash($picture,$picfolder,$quality,$ratio,$quality,$watermark_pic,$watermark_alpha,$roundedcorner_array,$filter_array).$basename,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_no'.$classadd_pic,'',$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
}
}
ersetzen durch
// Current picture separating with different classes (show the current picture in a special style)
$filename_cached = $this->generateHash($picture,$picfolder,$quality,$ratio,$quality,$watermark_pic,$watermark_alpha,$roundedcorner_array,$filter_array).$basename; // Generate Hash like 1209A2215654646.jpg
if (($popup == '1' OR $popup == 'imagelightbox') AND !file_exists('uploads/tx_wtgallery/popup/'.$filename_cached)) { // Generate Popup Cache file if needed
$this->createNewPicture($picfolder.$picture,$filename_cached,'uploads/tx_wtgallery/popup/',$watermark_pic,$watermark_alpha,$popup_width,$popup_quality,'','','','','','',''); // resize and cache image if necessary
}
if ($currentpic) { // The visitor has choosen a special picture
if ($picture == $currentpic) { // The current picture of the loop == the picture that the visitor has choosen
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_act'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$filename_cached,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_act'.$classadd_pic,$popup,$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
} else { // The current picture of the loop is not the picture that the visitor has choosen
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_no'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$filename_cached,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_no'.$classadd_pic,$popup,$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
}
} else { // Else: no picture is selected, take first one
if ($i == '0') { // If the current picture of the loop is the first one
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_act'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$filename_cached,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_act'.$classadd_pic,$popup,$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
} else { // If the current picture is not the first one
$markerArray['###PIC###'] .= ' class="wtgallery_listpic wtgallery_listpic_no'.$classadd_div.'">'; // Close DIV
$markerArray['###PIC###'] .= $this->createNewPicture($picfolder.$picture,$filename_cached,'uploads/tx_wtgallery/thumbs/','','',$width,$quality,$ratio,'wtgallery_listpic_pic wtgallery_listpic_pic_no'.$classadd_pic,$popup,$single_site,array('picid'=>$picture,'cat'=>$category_set,'thumbid'=>$pagebrowser),$filter_array,$roundedcorner_array); // Generate Thumb
}
}
Achso dann habe ich noch etwas eingefügt
in function createNewPicture
$height = intval($width * $y / $x);
ersetzen durch
if($width>$x){
$width= $x;
}
$height = intval($width * $y / $x);
if($height>$y){
$width= intval($height * $x / $y);
}
$height = intval($width * $y / $x);
aufgeblasene Bilder sehen nicht immer schön aus
Ich hoffe, es kann jemand damit etwas anfangen.