Back to vBulletin 3.8 Add-ons

Permission change - users can delete own threads with no replies
Mod Version: 1.00, by MoMan

vB Version: 3.8.7 Rating: (1 vote - 5.00 average) Installs: 5
Released: 03 Mar 2011 Last Update: Never Downloads: 0
Not Supported Code Changes Re-usable Code  

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:

PHP Code:
$forumperms $vbulletin->bf_ugp_forumpermissions['candeletethread'
Replace with:

PHP Code:
(($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!

Download

No files for download.

Similar Mods

New Posting Features Canned Replies v4.x - User Saved Text for Replies, Threads, PMs & Infractions vBulletin 4.x Add-ons
New Posting Features Canned Replies - User Saved Text for Replies, Threads, PMs & Infractions vBulletin 3.7 Add-ons

vblts.ru supports vBulletin®, 2022-2025