PDA

View Full Version : random_thumb addon - error message


-okapi-
04-19-2005, 08:13 AM
using the random_thumb addon, i get the following error message on the admin addon page:

Warning: getimagesize(thumbnails/thumb_20050418134352_050123a.jpg): failed to open stream: No such file or directory in /home/***/avisualnotebook/addons/random_thumb.php on line 34

what does that mean?

please note, that the line number does not correspond to the original file, because i have deleted the first comment lines of the script.

-okapi-
04-20-2005, 08:17 AM
has nobody an idea what the getimagesize error for the random_thumb addon could mean?

Warning: getimagesize(thumbnails/thumb_20050418134352_050123a.jpg): failed to open stream: No such file or directory in /home/***/avisualnotebook/addons/random_thumb.php on line 34

raminia
04-20-2005, 05:08 PM
This error message do not harm but it shouldn't be there!

Remedy
append the addon file with random_thumb.php at line 62 and add these

if(!file_exists("thumbnails/thumb_$image"))
break;


and the code will become like this

while(list($id,$headline,$image) = mysql_fetch_row($thumbs_ahead)) {
$image_name = $image;
if(!file_exists("thumbnails/thumb_$image")) break;
list($local_width,$local_height,$type,$attr) = getimagesize("thumbnails/thumb_$image");

-okapi-
04-21-2005, 05:19 AM
great! the error is gone.
thank you!

the same error still exists with reverse_thumbnails.php. maybe you will find a solution for this too?

thanks a lot!
have a nice day!

raminia
04-21-2005, 09:32 PM
it will be fixed in v1.4.1 that the tags are included inside the main index.php. the problem is the relative path is not the same as in admin menu and main page of pp and the addon does not(did not) check this!

-okapi-
04-21-2005, 11:46 PM
thank you, ramin!
i'm looking forward to version 1.4.1!