Moin Leute!
Ich schlage mich seit ein paar Tagen mit diversen Fotogalerien herum. So richtig funktionieren will keine...
Ich habe mich mittlerweile für goof entschieden, da sie mir am leichtesten zu bedienen scheint. Ich lege also ein Gallery-Record auf einer Seite an und gebe als Verzeichnis fileadmin/gallery/ an, in dem 2 Ordner mit Fotos liegen. Die Bilder sind alle nicht sonderlich groß, so ca. 30KB.
Im Template habe ich noch folgenden Setup-Code angegeben:
plugin.tx_gooffotoboek_pi1 = USER_INT
plugin.tx_gooffotoboek_pi1 {
userFunc = tx_gooffotoboek_pi1->main
}
page.200 < plugin.tx_gooffotoboek_pi1
page {
200 {
path = fileadmin/gallery/
img_maxw = 900
img_maxh = 900
thumb_per_row = 5
thumb_rows = 2
}
}
Wenn ich nun die Seite mit dem PlugIn aufrufe, finde ich nur eine rote Fehlermeldung von goof:
Warning: Division by zero in /www/htdocs/XXXXXXXXX/typo3test/typo3conf/ext/goof_fotoboek/pi1/class.tx_gooffotoboek_pi1.php on line 1245
Ich hab mir die Datei mal angesehen und folgende Zeilen gefunden (Auszug):
function createLinks() {
//this section has been moved to hussle the thumbpages before the links are generated
$this->thumbstart = ($this->urlvars['fid']) ? $this->urlvars['fid'] :
1;
$this->thumbsPerPage = $this->conf['thumb_per_row'] * $this->conf['thumb_rows'];
//directories with less then the maximum thumbs per page should start with the first
if ($this->thumbstart > $this->filecount) {
$this->thumbstart = $this->filecount;
}
$this->thumbstart = floor(($this->thumbstart-1)/$this->thumbsPerPage) * $this->thumbsPerPage ;
if ($this->urlvars['func'] == 'thumb') {
if ($this->conf['fill_thumb_page'] ) {
$this->thumbstart--;
if ($this->filecount < $this->thumbsPerPage ) {
$this->thumbstart = 0;
} elseif ($this->thumbstart > ($this->filecount - $this->thumbsPerPage ) ) {
//the last page should be a full one if possible
$this->thumbstart = $this->filecount - $this->thumbsPerPage ;
}
} else {
$this->urlvars['fid'] = $this->thumbstart;
}
}
Hier bei Zeile 10 wird die Division by Zero ausgelöst. Allerdings sollte die Variable thumbsPerPage, die durch thumbsPerRow*thumbRows berechnet wird durch meinen Setup-Code mit dem Wert 10 gefüllt werden... Irgendwie scheint das aber nicht zu klappen.
Hat einer von Euch ne Idee??
Vielen Dank für Eure Hilfen!
Chris