The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Delete a post with only one button (in postbit) Details »» | |||||||||||||||||||||||||||
Delete a post with only one button (in postbit)
Developer Last Online: Jun 2020
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:
PHP Code:
PHP Code:
PHP Code:
Images you can use for the delete button Show Your Support
|
Comments |
#82
|
|||
|
|||
[high]* Wifey clicks install
[/high] Thank you so much, it works perfectly |
#83
|
||||
|
||||
Quote:
|
#84
|
||||
|
||||
a suggestion, if ur going to make it with having a 1 for allowing it not to be deleted completely but hidden, why not make it "if 1 then" have a popup box to fill in any comments, i like my mods to put in why they are deleteing something
idea, would also prevent any accidental deleteing if u want it to ask for confirmation before u delete do this, Open up the postbit template and find PHP Code: <if condition="$post['editlink']"> Below, add: PHP Code: <form action="editpost.php" method="post" onSubmit="return confirm('Are you sure you want to delete this 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> |
#85
|
||||
|
||||
Quote:
when i added this now i cant see it either, i need for me and all my little mods to be able to use quick delete, any help? |
#86
|
|||
|
|||
Quote:
|
#87
|
||||
|
||||
Quote:
anyone know how to fix this? |
#88
|
|||
|
|||
i delete a post in a thread (page 3), when deleting done, it turn back page 1. I want it turn back the page store this post. Who can help me? Thanks much
|
#89
|
||||
|
||||
Quote:
add this where you want to have your delete icon located: HTML Code:
<span id="quickdelete_$post[postid]"> <img src="$stylevar[imgdir_button]/delete.gif" alt="Quick Delete" border="0" /> <script type="text/javascript"> vbmenu_register("quickdelete_$post[postid]", true); </script> </span> <div class="vbmenu_popup" id="quickdelete_$post[postid]_menu" style="display:none"> <form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="deletepost" /> <input type="hidden" name="p" value="$post[postid]" /> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat"> $vbphrase[delete_this_message] </td> </tr> <tbody id="collapseobj_editpost_delete" style="$vbcollapse[collapseobj_editpost_delete]"> <tr> <td class="panelsurround" align="center"> <div class="panel"> <div style="width:$stylevar[formwidth]" align="$stylevar[left]"> <div class="fieldset"> <div>$vbphrase[delete_message_check_appropriate_option]</div> <if condition="$show['firstpostnote']"> <div>$vbphrase[deleting_message_deletion_of_thread]</div> </if> </div> <fieldset class="fieldset"> <legend>$vbphrase[delete_options]</legend> <div style="padding:$stylevar[formspacer]px"> <div> <label for="rb_del_leave"><input type="radio" name="deletepost" value="" id="rb_del_leave" tabindex="1" checked="checked" />$vbphrase[do_not_delete_message]</label> </div> <div> <label for="rb_del_soft"><input type="radio" name="deletepost" value="delete" id="rb_del_soft" tabindex="1" />$vbphrase[delete_message]</label> <if condition="$show['physicaldeleteoption'] AND $show['keepattachmentsoption']">(<label for="cb_keepattachments"><input type="checkbox" name="keepattachments" value="1" id="cb_keepattachments" tabindex="1" />$vbphrase[keep_attachments]</label>)</if> </div> </div> </fieldset> <div class="smallfont"> <div>$vbphrase[reason_for_deletion]:</div> <input type="text" class="bginput" name="reason" size="50" tabindex="1" title="$vbphrase[optional]" /> </div> </div> </div> <div style="margin-top:$stylevar[cellpadding]px"> <input type="submit" class="button" value="$vbphrase[delete_this_message]" tabindex="1" accesskey="s"/> </div> </td> </tr> </tbody> </table> </form> </div> I would put is AFTER HTML Code:
<a href="$post[editlink]" onclick="return confirm_edit()"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a> credit goes to EvilLS1 for his Quick Edit hack! |
#90
|
|||
|
|||
How can I get it so that the button only shows up for those with permission to delete (on my forum admin/super mods and mods only in their own forum)? Members can't delete so I don't want them seeing this button, and it's also currently showing for unregistered posts.
Will this clash will the 'quick edit' hack? |
#91
|
||||
|
||||
Quote:
note. The code should be added ABOVE the </if> to close the checking for those who can edit. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|