Back to vBulletin 3.0 Add-Ons

Delete a post with only one button (in postbit)
Mod Version: 1.00, by Gary King

This modification is in the archives.
vB Version: 3.0.0 Rating: (1 vote - 5.00 average) Installs: 55
Released: 25 Jan 2004 Last Update: Never Downloads: 3
Not Supported  

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.
work perfect to me even in first post in thread...

just small additions i`d love to see (that was in the same hack for vb2.x.x):
- any chance to add small nitification pop-up window to submit delete (just in case that i pushed right button :devious: )
- how can i change that to image or just text link?
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" /> 
to
PHP Code:
<input type="hidden" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" /> 
Then, add this below that:
PHP Code:
<input type="image" name="submit" src="image.jpg" /> 
Replace image.jpg with the path to your image.

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']"
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

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024