Jump to content
Sign in to follow this  
Soundman01

Product Image Deleter

Recommended Posts

Looks like a good idea but it seems to be missing the function scandir()

 

(Fatal error: Call to undefined function: scandir() in ......)

Share this post


Link to post
Share on other sites

scandir() is a php 5 function, you would have to create an alternative if you are working under php 4.

Share this post


Link to post
Share on other sites

Im having some trouble with this contribution. I believe I have installed everything properly, I have the links in admin, and can click on the "submit" button to create the list. But I dont get a list after I click. Just a page that says "Images", nothing under it. I have tried testing it with a small amount of pictures in a test folder, with permissions set to 777. I tried it with one picture in a file and that didnt even work. In the admin/image_delete.php page, I believe I have directed the proper lines to the image folder, but I get no response, no error codes, no nothin'. What lines am I supposed to edit? 82,112,118? The default for these are 'images/Products/' My images are located in 'images/' and thats what I edited them to say. What am I missing? Those are the only changes I made, I feel like I am overlooking an edit somewhere. I have some 4955 images (including the auto generated thumbs) that I need to clean up, I only need 2700 of them, 900 if you dont count the two resizes (thumbs) for each pic. Any help would be greatly appreciated.

 

Zac

Share this post


Link to post
Share on other sites

To help those whose hosts still run PHP 4

 

In image_delete.php replace

 

require('includes/application_top.php');

 

with

 

require('includes/application_top.php');

 

// for PHP 4 versions

if (PHP_VERSION < 5) {

function scandir($dir) {

$dh = opendir($dir);

while (false !== ($filename = readdir($dh))) {

$files[] = $filename;

}

sort($files);

return $files;

}

}

Share this post


Link to post
Share on other sites

Hello,

 

i get this error message after the listing of the images and pressing the submit button to delete them:

 

 

Warning: Invalid argument supplied for foreach() in /is/htdocs/wp1084807_ZPBCDQY2B0/pages/metrius/admin/image_delete.php on line 64

 

Please help.

 

Regards,

dunax

Share this post


Link to post
Share on other sites

Hi

 

this is a good idea but i saw a lot of bugs.

 

1. all images in sub directoreys e.g. catalog/images/incon wil be deletet (if selected)

 

2. if your shop generate tumbs - this files will also be deleted (if selectet)

 

3. if you use e.g. "more pics" the additional produkt images will be also deleted (if selected)

 

4. for some images a error msg will be displayed:

 

Warning: unlink(C:/xampp/htdocs/os/catalog/images/10198_1_JPG) [function.unlink]: No such file or directory in C:\xampp\htdocs\os\catalog\admin\image_delete.php on line 82

 

a file 10198_1_jpg is not on file the original Nane was 101981.jpg

 

rgds

alfred

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×