Gary´s Cookbook Homepage – Thumbnail selector in Backend not working - Gary´s Cookbook Forum - Ergebnisse von #6
In this forum you'll find the threads about Gary´s Cookbook 3.0 and above with extensions. English or german possible.
<
>

In diesem Forum geht´s um die Version 3.0 von Gary´s Cookbook oder neuer mit Erweiterungen. Englisch oder deutsch ist möglich.

Thumbnail selector in Backend not working

  • Fabian
  • Neues Mitglied
  • Neues Mitglied
Mehr
15 Jahre 3 Monate her #4301 von Fabian
Hello

I found the mistake and I'am puzzled, that it works at you oliver.

Just replace this part of the sourcecode

foreach ($thuFiles as $tfile) {
//notice error php 5.3
// if (eregi("bmp|gif|jpg|png|jpeg", $tfile)) {
if(stristr($tfile, 'bmp') || stristr($file, 'gif') || stristr($file, 'jpg') || stristr($file, 'png') || stristr($file, 'jpeg'))
$thumbs[] = JHTML::_('select.option', $tfile);

}

with this part..:

foreach ($thuFiles as $tfile) {
//notice error php 5.3
// if (eregi("bmp|gif|jpg|png|jpeg", $tfile)) {
if(stristr($tfile, 'bmp') || stristr($tfile, 'gif') || stristr($tfile, 'jpg') || stristr($tfile, 'png') || stristr($tfile, 'jpeg'))
$thumbs[] = JHTML::_('select.option', $tfile);
}

I marked the mistakes in the second part of the sourcecode!

best regards

Fabian

Bitte Anmelden um der Konversation beizutreten.

Mehr
15 Jahre 3 Monate her #4302 von over
Thanks Fabian,
one of the best Bugs I've ever seen! :woohoo:

It works in the case that the last file in the loop on the main images path is of image type. That's the $file variabel. Is this the case all files in the thumbs path are in the selection list. I do not know in what order the file list array is filled.

I'm though innocent in this case. ;) I always use the same variabel in such cases. No need for two.

Thanks again

over

Bitte Anmelden um der Konversation beizutreten.

Mehr
15 Jahre 3 Monate her #4303 von over
Hi to all,

if someone else have problem with seeing and adding thumbnails in the backend.
Untill we have a fix you can check it, if you have the knowledge how, by adding my "debugging" lines. If you see the thumbnails in an array, this is the bug and not the path or the path/file rights.

over

Bitte Anmelden um der Konversation beizutreten.

Ladezeit der Seite: 0.143 Sekunden