Images in the File-section are not physically being deleted
Images in the File-section are not physically being deleted
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!!
Daniel
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!!
Daniel
- Oliver Georgi
- Site Admin
- Posts: 9904
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9904
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
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.
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
@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
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!
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
@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
- Oliver Georgi
- Site Admin
- Posts: 9904
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
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
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
- Oliver Georgi
- Site Admin
- Posts: 9904
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
@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
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.
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
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.
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
I'll try my luck tonight and come back to you..
Cheers
Daniel
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
I'll try my luck tonight and come back to you..
Cheers
Daniel
- Oliver Georgi
- Site Admin
- Posts: 9904
- Joined: Fri 3. Oct 2003, 22:22
- Contact: