MoMan
03-02-2011, 10:00 PM
I've seen people ask about this feature many times without getting a definitive answer, so I thought I'd chime in as I recently implemented this on my forum.
Question: Is it possible to allow members to delete their own threads if and only if they have no replies?
Answer: The stock vbulletin installation only allows you to specify whether or not users can delete their own threads, regardless of the number of replies. To change this, you can make a simple code modification.
The related usergroup permission is called "Can Delete Own Threads". If you would like to change this permission so that it limits users to deleting only threads with no replies, open ajax.php, editpost.php, and postings.php and find:
$forumperms & $vbulletin->bf_ugp_forumpermissions['candeletethread']
Replace with:
(($forumperms & $vbulletin->bf_ugp_forumpermissions['candeletethread']) AND $threadinfo['replycount'] == 0)
Now, users will be able to delete their own threads if they have no replies! I have tested this on vB 3.8.7 using both the ajax and non-ajax editors. I suspect this will work with vB 3.x.x, as well as with 4.x, however. Enjoy!
Question: Is it possible to allow members to delete their own threads if and only if they have no replies?
Answer: The stock vbulletin installation only allows you to specify whether or not users can delete their own threads, regardless of the number of replies. To change this, you can make a simple code modification.
The related usergroup permission is called "Can Delete Own Threads". If you would like to change this permission so that it limits users to deleting only threads with no replies, open ajax.php, editpost.php, and postings.php and find:
$forumperms & $vbulletin->bf_ugp_forumpermissions['candeletethread']
Replace with:
(($forumperms & $vbulletin->bf_ugp_forumpermissions['candeletethread']) AND $threadinfo['replycount'] == 0)
Now, users will be able to delete their own threads if they have no replies! I have tested this on vB 3.8.7 using both the ajax and non-ajax editors. I suspect this will work with vB 3.x.x, as well as with 4.x, however. Enjoy!