View Single Post
  #11  
Old 12-29-2005, 06:34 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Delete fullsize file on picture delete

This addon leaves behind the fullsize file if the picture is deleted I solved the problem by adding the following to the add-on file

PHP Code:
add_admin_functions'admin_fullsize_delete' 'image_deleted' ,$addon_menu,$addon_admin_submenu);

function 
admin_fullsize_delete()
{
     global 
$image;
     if (@
unlink("images/fullsize_".$image)){
         echo 
"   Fullsize image deleted.";
     }

For this to work we need to define another workspace to the image_edit.php, near the end of action x=delete add
PHP Code:
eval_addon_admin_workspace_menu('image_deleted'); 
Please note editing the core files is not a good idea generally - so do it only if you know what you are doing and can keep track of all the modifications you have done
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote