close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple deletion of images

Thread began 8/08/2013 8:46 pm by simmo515303621 | Last modified 8/27/2013 10:18 am by Jason Byrnes | 506 views | 5 replies |

simmo515303621

Multiple deletion of images

Hi, Sorry if I have missed the post that helps with this issue..

I have created a gallery/album page - but I need to be able to multiple delete selected images... how can I do this.

I have attached my page

Attached Files
galPages_Results.php
Sign in to reply to this post

Ray BorduinWebAssist

All of the images from an album are stored in a single directory... so you can use a recursive delete function to delete all of the files and folders in that directory...

Here is a function you can use to delete a directory and all of its contents:

function deleteDirectory($dir) {
if (!file_exists($dir)) return true;
if (!is_dir($dir) || is_link($dir)) return unlink($dir);
foreach (scandir($dir) as $item) {
if ($item == '.' || $item == '..') continue;
if (!deleteDirectory($dir . "/" . $item)) {
chmod($dir . "/" . $item, 0777);
deleteDirectory($dir . "/" . $item);
};
}
return rmdir($dir);
}
Sign in to reply to this post

simmo515303621

Multiple deletion of images

hi Ray,

i dont need to actually delete all images, if you check out the script I sent - there is a checkbox that does a multiple record delete, i also need it to delete the images of the same name.. and those only.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

to delete the images associated to the records being deleted in the multi record delete would take some hand coding to accomplish. respond back with a phone number of skype address, and we can work on this trough a screen sharing session.

Sign in to reply to this post

simmo515303621

Hi Jason, great skype is simon.schroeder3

thanks

Sign in to reply to this post

Jason ByrnesWebAssist

See PM

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...