Delete a post with only one button (in postbit)
This modification is in the archives.
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! Spoiler (click to open)
Quote by M.C.
To change to an image, change
PHP Code:
<input type="submit" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" id="rb_del_soft" tabindex="1" class="button" />
PHP Code:
<input type="hidden" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" />
PHP Code:
<input type="image" name="submit" src="image.jpg" />
Close
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']">
PHP Code:
<form action="editpost.php" method="post">
PHP Code:
// hide users in Coventry from non-staff members
PHP Code:
$deletebutton = 1; // set to 1 to only hide the post, or 0 to permanently delete the post
Images you can use for the delete button Download No files for download. |