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
  • Visitor
  • Visitor
13 years 5 months ago #4301 by 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

Please Log in to join the conversation.

More
13 years 5 months ago #4302 by 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

Please Log in to join the conversation.

More
13 years 5 months ago #4303 by 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

Please Log in to join the conversation.

Time to create page: 0.159 seconds