2 reasons: One, setting nid to -1 on deletion is just wrong, in my opinion; however, more importantly, another trash module is more near completion than this one, and it extends to views, panels, comments, etc., in addition to nodes.
2 reasons: One, setting nid to -1 on deletion is just wrong, in my opinion; however, more importantly, another trash module is more near completion than this one, and it extends to views, panels, comments, etc., in addition to nodes.
Comments
Comment #1
rötzi commentedI don't plan to work on it further. I did this for a site of mine and thought I share it if someone is interested.
If you are doing a better 'trash' module you can take over this project, I don't mind.
About the implementation: Having the status field as an indicator for trashed nodes is in my opinion the right way to do it (or add another 'deleted' flag if you rather have the status field only have two possible values). The 'status' field would be available for nodes, comments and users out of the box. This is much easier than moving the data into a separate table and move it back again. Of course such an implementation should be in core as the core modules define the possible values for the 'status' field.
Comment #2
rötzi commentedBy the way, do you mean this module http://drupal.org/node/219800 ?
Comment #3
dawehneryes thats the module and i try to make it but i got stuck at the nodes
Comment #4
rötzi commentedAbout the implementation (2): The great advantage of this approach is that you don't have to handle custom data. The database of contributed modules is not affected and thus no special care has to be taken. Of course contributed (and core) modules should always check the 'published' status of the nodes they use or they accidentally show trashed data. That's exactly what I am hoping for in this module (at least the modules I use do it ;)
Comment #5
cwgordon7 commented@rötzi: The problem with setting status to -1 is that it may not play nicely with other modules; in addition, how do you tell whether the deleted node was published or not?
Comment #6
dugh commentedThat module isn't even done 2 years later http://drupal.org/node/219800
There's no alternative to this module
Comment #7
DrewMathers commentedAnother approach would be to remove the role's "delete own content" permission, which will remove the Delete button and use the Publish Content module to provide easy unpublishing. You can view your "trash bin" with View Unpublished.
Comment #8
amateescu commented