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
  #2  
Old 01-25-2004, 02:30 AM
!!!cyr0n_k0r !!!cyr0n_k0r is offline
 
Join Date: Apr 2002
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woohoo.! thanks.
Reply With Quote
  #3  
Old 01-25-2004, 08:06 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank You Gary
Reply With Quote
  #4  
Old 01-25-2004, 08:52 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, if you try to delete the first post in a thread, it goes to a blank white page and nothing happens. You need to fix this so the delete button won't show up if it is the first post in a thread.
Reply With Quote
  #5  
Old 01-25-2004, 12:09 PM
hoahongtim hoahongtim is offline
 
Join Date: Apr 2003
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good mod ! thanks a lot !
Reply With Quote
  #6  
Old 01-25-2004, 12:42 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 01-25-2004, 02:31 PM
Alone Wolf Alone Wolf is offline
 
Join Date: Jan 2004
Location: Texas
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but when I used this hack. I got a small problem! it is member's number posts. One member has 25 posts, and when I delete a thread which has 3 posts of him. His number post has only 22.

How can I prevent decreasing number post when I delete a thread or a post?
Reply With Quote
  #8  
Old 01-25-2004, 02:37 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 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.
Reply With Quote
  #9  
Old 01-25-2004, 02:43 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alone Wolf
but when I used this hack. I got a small problem! it is member's number posts. One member has 25 posts, and when I delete a thread which has 3 posts of him. His number post has only 22.

How can I prevent decreasing number post when I delete a thread or a post?
That's a whole 'nother hack.
Reply With Quote
  #10  
Old 01-25-2004, 02:55 PM
MGM MGM is offline
 
Join Date: Jan 2003
Location: Michigan
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice!

kinda like the Quick Delete Post hack for vB2

/me clicks Install

MGM out
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 04:16 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.08609 seconds
  • Memory Usage 2,315KB
  • Queries Executed 23 (?)
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
  • (7)bbcode_php
  • (2)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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