[TYPO3-german] photo_gals unter 6.2 verwenden

Philipp Holdener philipp.holdener at me.com
Mon Aug 11 14:19:40 CEST 2014


Hallo zusammen


Ich würde gerne die Extension "photo_gals" unter TYPO3 6.2 verwenden.
Im Backend wird mir alles korrekt angezeigt. Im Frontend bleibt die 
Stelle, wo die Galerie angezeigt werden sollte, leer.


Hat mir jemand einen Tipp was ich hier schrauben müsste?
das hier hab ich schon auskommentiert: 
//require_once(PATH_tslib.'class.tslib_pibase.php');
Damit kommt wenigstens keine Fehlermeldung.
Aber die Bilder die im Plugin im BE zusehen sind kommen nicht im FE


<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2004 Roland Obermayer (roland at robelix.com)
*  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!
***************************************************************/
/**
* Plugin 'Simple Photo Gallery' for the 'photo_gals' extension.
*
* @author Patrick Kapar <info at patie.nl>
*/
   //require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_photogals_pi1 extends tslib_pibase {
   var $prefixId = 'tx_photogals_pi1';
   // Same as class name
   var $scriptRelPath = 'pi1/class.tx_photogals_pi1.php'; // Path to 
this script relative to the extension dir.
   var $extKey = 'photo_gals'; // The extension key.
   function main($content, $conf) {
     $this->conf = $conf;
     $images = explode(',', $this->cObj->data['image']);
     $bigimg = '';
     $thumbs = '';
     if (t3lib_div::_GP('tx_photogals_image') != '' && 
is_numeric(t3lib_div::_GP('tx_photogals_image')) && (count($images) - 1) 
 >= t3lib_div::_GP('tx_photogals_image') && 
t3lib_div::_GP('tx_photogals_elementid') == $this->cObj->data['uid']) {
       $uid = t3lib_div::_GP('tx_photogals_image');
     }
     else {
       $uid = 0;
     }
     $bigimg = $this->mkBigImg($images[0]);
     $i = 0;

     foreach ($images as $img) {
       //innocube
       $tmp_imgconf = $this->conf['image.'];
       $tmp_imgconf['file'] = 'uploads/pics/'.$img;
       $tmp_img = $this->cObj->IMG_RESOURCE($tmp_imgconf);
       if($i <> 0) {

         $thumbs .= '<div class="'.(t3lib_div::_GP('tx_photogals_image') 
== $i ? 'tx-photogals-pi1-small-active' : 
'tx-photogals-pi1-small').'">'.$this->pi_linkTP($this->mkThumbs($img, 
$i), array('tx_photogals_elementid' => $this->cObj->data['uid'], 
'tx_photogals_image' => $i)).'<img class="current_big" 
style="display:none" src="'.$tmp_img.'" /></div>';
       } else {
         $thumbs .= '<img style="display:none" src="'.$tmp_img.'" 
id="start_image" />';
       }

       $i++;
     }
     $content .= $bigimg . $thumbs;
     return $this->pi_wrapInBaseClass($content);
   }
   /**
   * [Describe function...]
   *
   * @param  [type]    $img: ...
   * @return  [type]    ...
   */
   function mkBigImg($img) {
     $imgconf = $this->conf['image.'];
     $imgconf['params'] .= 
'name="tx_photogals_big_'.$this->cObj->data['uid'].'" ';
     $imgconf['file'] = 'uploads/pics/'.$img;
     return $this->cObj->IMAGE($imgconf);
   }
   /**
   * [Describe function...]
   *
   * @param  [type]    $img: ...
   * @param  [type]    $i: ...
   * @return  [type]    ...
   */
   function mkThumbs($img, $i) {
     $imgconf = $this->conf['thumb.'];
     $imgconf['file'] = 'uploads/pics/'.$img;
     return $this->cObj->IMAGE($imgconf);
   }
}
if (defined('TYPO3_MODE') && 
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/photo_gals/pi1/class.tx_photogals_pi1.php']) 
{
 
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/photo_gals/pi1/class.tx_photogals_pi1.php']);
}
?>



Besten Dank für Tipps


Gruss
Philipp


More information about the TYPO3-german mailing list