This is a really easy hack to install and use, and it allows you to delete any post with only one click, instead of going through the editing process and then selecting delete, and then confirming, etc.
NOTE: Do you want to use an image instead of a button?
Click here!
NOTE: You cannot use a link to replace the button because the code requires you to submit a form, and using a link will make a huge security risk where people can delete posts as they wish!
Instructions
Open up the
postbit template and find
PHP Code:
<if condition="$post['editlink']">
Below, add:
PHP Code:
<form action="editpost.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="p" value="$post[postid]" />
<input type="hidden" name="do" value="deletepost" />
<input type="submit" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" id="rb_del_soft" tabindex="1" class="button" />
</form>
Open includes/functions_showthread.php and find:
PHP Code:
// hide users in Coventry from non-staff members
Above, add:
PHP Code:
$deletebutton = 1; // set to 1 to only hide the post, or 0 to permanently delete the post
Done!
Images you can use for the delete button