Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Delete a post with only one button (in postbit) Details »»
Delete a post with only one button (in postbit)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-24-2004 Last Update: Never Installs: 55
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-25-2004, 03:03 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MetalGearMaster
very nice!

kinda like the Quick Delete Post hack for vB2

[high]* MetalGearMaster clicks Install
[/high]

MGM out
To be honest (and to let everyone know) I wasn't aware there was one for vB 2, so I didn't take ANY code from there
Reply With Quote
  #13  
Old 01-25-2004, 03:12 PM
MGM MGM is offline
 
Join Date: Jan 2003
Location: Michigan
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, I wasn't saying you were, don't take my post the wrong way :P

besides, that hack never worked for me for some reason anyways

MGM out
Reply With Quote
  #14  
Old 01-25-2004, 03:14 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MetalGearMaster
lol, I wasn't saying you were, don't take my post the wrong way :P

besides, that hack never worked for me for some reason anyways

MGM out
Nah I knew you weren't saying I did, but I was letting everyone else know (in general) that I didn't
Reply With Quote
  #15  
Old 01-26-2004, 03:57 AM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I allow 2 of my usergroups to delete their posts... they can delete their posts, but I assume the "manage" ability isn't there (that would be the best scenario).

Any way to limit this (icon visible) to Admins/Supermods only?
Reply With Quote
  #16  
Old 01-26-2004, 04:03 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gary, are you going to fix the first post in the thread problem?
Reply With Quote
  #17  
Old 01-26-2004, 05:00 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Gary, are you going to fix the first post in the thread problem?
another hack that shows how lazy everyone really is
Reply With Quote
  #18  
Old 01-26-2004, 06:20 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make it a .txt file, ok?!
Reply With Quote
  #19  
Old 01-26-2004, 07:24 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought vb must have make this default, deleting a post is a very common action, have to go to editpost and check delete button is too much to delete a post.
Reply With Quote
  #20  
Old 01-26-2004, 11:33 AM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Convenience does not necessarily equate to laziness!
Reply With Quote
  #21  
Old 01-26-2004, 11:53 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Okiewan
Convenience does not necessarily equate to laziness!
yes it does
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05449 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete