Question

I am subscribed to a Drupal 5 site with the Advanced Forum module. When a user decides to delete her post, the post dissappears and the following posts are moved up.

So if #2 is deleted the existing #3 will become #2 and so forth. The problem with this is if people reference previous posts which are now incorrectly numbered. Consequently it can lead to much confusion or even make people angry because they feel a comment is not appropriate - which it isn't after all!

What we would like is that the deleted post is simply removed without renumbering the rest. There is no option for this in the settings, so I will most likely have to mod the files.

Do you know if there already exists a patch to accomplish this, or can you alternatively point to where I need to modify the code?

I am a experienced PHP developer, but Drupal is new to me.

Était-ce utile?

La solution

Possible workaround would be to set status field in comment table to 0, instead of deleting the comment. THat way it would not appear in comment list and other cid's would not be changed. You could do this in a custom module with a hook but I am not sure what hook calls comment_delete, normally you would override hook_nodeapi but comments if I remember correctly may be handled differently than nodes.

Look in the comment module under /modules and check out from what hook comment_delete is called and override that in a custom module, that way you would not have to hack any core code.

Good-luck

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top