Page 1 of 1

Images in the File-section are not physically being deleted

Posted: Wed 7. Mar 2007, 00:11
by Moan
Hi there dear community,

I have a little problem with the "deleted" files in the filemanager. Apparently they are not completely deleted from the HD. It seems that there is just a flag inside the DB that sets them to the status "deleted".
The problem is now that when I would like to insert a picture in the WYSIWYG-Editor (in this case it's the FCK) ALL pictures - even the deleted ones - show up. When - as in my case - you have quite a big amount of images inside the filesystem it is very hard to find the right picture inside the whole lot of pictures.

Is there a possibility to really delete the images/files to not let them show up anymore in the Imagebrowser? I'm using the phpWCMS-Browser since the alternative "Insert picture" was hard to tweak to the right directory.

Thank you very much in advance!! :lol:

Daniel

Posted: Wed 7. Mar 2007, 00:16
by Oliver Georgi
files uploaded by WYSIWYG editors are not handled by phpwcms. So you have to delete these (inside pictures only) manually.

Oliver

Posted: Wed 7. Mar 2007, 00:19
by Moan
Hi Oliver,

I don't upload them inside the WYSIWYG-Editor. I use the normel file-section for that or for multiple-uploads an ftp-connection and then the file-section for taking over these files.

Thanks for your really quick answer... 8)

Daniel

Posted: Wed 7. Mar 2007, 00:24
by Oliver Georgi
then you are right - deleting just marks files as deleted. In admin section you can find a function to remove such files. But these are moved to folder "can_be_deleted" inside file storage folder only. But you can delete files there if necessary.

Oliver

Posted: Wed 7. Mar 2007, 00:27
by Moan
Okay, thanks. Though this wasn't the thing I wanted to hear, i can now "build" on your answer :)

Thanks again

Daniel

Posted: Wed 7. Mar 2007, 15:02
by Moan
Ok, me again.

Since this fact really bothers me I am trying to work things out.

Has anyone ever tried to display only the files that are not flagged "deleted" inside the phpWCMS_ImageBrowser? If yes, could you give ma a hint? I already found the file ImageManager.php inside the FCKeditor installation and in my opinion the following function has to be changed.

Code: Select all

deleted!
Since this function just lists all physical files inside the imagedirectory it also displays the ones that I deleted. But that's what I don't want.
So, a workaround is needed to access the DB inside the ImageManager.php and just pick out the images that have not yet been deleted.

If anyone already has done such a workaround could you be so kind and post it here? Otherwise I'm going to try ma luck now 8)

@Oliver: To be honest I haven't found the option to move files to the "can_be_deleted" folder inside the admin section :(

Cheers and thx

Daniel

Posted: Wed 7. Mar 2007, 15:14
by Oliver Georgi
Please, do NOT mix image handling inside WYSIWYG editor and phpwcms file manager. These are completely different things!

An image browser for Spaw2 will follow which connects to phpwcms file management.

All files stored in "pictures" are not handled by phpwcms.

Oliver

Posted: Wed 7. Mar 2007, 15:20
by Moan
Hi Oliver,

I know that phpwcms doesn't handle the files inside the "picture"-folder.

And I finally accept that mixing up the two things (phpWCMS_ImageBrowser and the internal filesystem) is no good. But my customer is quite mixed up since he has a whole lot of pictures that he deleted but still show up :( OK, then I wait for SPAW2 whatever that may be :)

Cheers

Daniel

Posted: Wed 7. Mar 2007, 15:35
by Oliver Georgi
spaw2 is another WYSIWYG editor included by default since 1.2.9.

Oliver

Posted: Wed 7. Mar 2007, 20:53
by Peekay
@moan
When you delete an image from a folder in the file manager, it winds up in the trash. Open the 'trash can' tab and you can permanently 'empty' the trash, however this simply makes the files un-restorable. To remove the files from the disc, you need to select the 'ADMIN' menu and choose 'Remove delete files' from the sidebar menu. This *moves* the files from 'PHPWCMS_Filestorage' into the 'can be deleted' folder.

I would assume that this would also remove the files from any WYSIWYG editor plugin list of available files, assuming the plugin was configured to look in PHPWCMS_Filestorage.

Your client can perform this housekeeping process in the backend, provided they have administrator status. It is up to you to periodically delete the files from the 'can_be_deleted' folder, either via FTP or a cron job.

But wait... there's more :wink:

When you USE an image in an article via a content-part, a copy of the image is created by PHPWCMS at the desired dimensions and placed in the 'content/images' folder. This is the image that is linked to the article. That's why even if you delete images from the file manager, they will still appear in articles.

Fortunately, when you open a web page containing an image, the re-sized version in the content/images folder is re-created dynamically from the 'master' copy in the file manager. This means you can safely empty the content/images folder periodically to 'purge' un-used re-sized images. The ones that are still in use will be regenerated 'on the fly'.

Once again, you will need to delete the folder contents via FTP or a cron job.

HTH.

Posted: Wed 7. Mar 2007, 21:08
by Moan
Hi there Peekay,

thanks for your answer. I will have a look at the option "Permanently delete files" - I already had a look but perhaps I was just blind. Is it already implemented in the 1.2.3-version?

The thing with the image being used inside an article is fine. It is just for pictures that were uploaded once upon a time and never been used afterwards again :lol:

I'll try my luck tonight and come back to you..

Cheers

Daniel

Posted: Wed 7. Mar 2007, 21:16
by Peekay
Is it already implemented in the 1.2.3-version?
Arrived in version 1.25 (I think).

Posted: Wed 7. Mar 2007, 21:18
by Moan
Ahhh, I should upgrade one day 8)

Thx

Daniel

Posted: Wed 7. Mar 2007, 21:22
by Oliver Georgi
not one day - as soon as possible - 1.3.0 is much improved. And 1.2.5 has some security problems...

Oliver

Posted: Wed 7. Mar 2007, 21:37
by Moan
Hi,

I know I know. The only pain I have is that I did some customizing inside phpwcms and whenver I overwrite all the files I have to do a **** between the changes I made back then and your changes :D

But yeah, you're right! Next weekend - it always takes sometime to upgrade :)

Cheers

Dani