Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #22  
Old 01-26-2004, 11:59 AM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hummm... Okay.
Reply With Quote
  #23  
Old 01-26-2004, 12:41 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 Okiewan
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?
Add the following above the new code in postbit template:
PHP Code:
<if condition="$bbuserinfo['usergroupid'] == 5 or $bbuserinfo['usergroupid'] == 6"
and then </if> at the end of the newly added code in postbit template.

Done!
Reply With Quote
  #24  
Old 01-26-2004, 12:49 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 Faranth
another hack that shows how lazy everyone really is
I thought it was fixed already, someone reported it was. Well, hmph I'll do it right now then
Reply With Quote
  #25  
Old 01-26-2004, 12:50 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 gmarik
Make it a .txt file, ok?!
How come..? It should be simple enough to see just like this
Reply With Quote
  #26  
Old 01-26-2004, 12:51 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 Gary W
I thought it was fixed already, someone reported it was. Well, hmph I'll do it right now then
Yeah looks fine to me I just tested, with $deletebutton as 1 and 0.
Reply With Quote
  #27  
Old 01-26-2004, 12:53 PM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great! Thanks Gary.
Reply With Quote
  #28  
Old 01-26-2004, 12:59 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks! any chanse for second modification (pop-up nitification window)?
Reply With Quote
  #29  
Old 01-26-2004, 01:10 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.
thanks! any chanse for second modification (pop-up nitification window)?
How about adding a checkbox next to the button instead, so it's still all on one page? You have to check the checkbox and click on the button to delete?
Reply With Quote
  #30  
Old 01-26-2004, 01:52 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fine it`s better, to protect from misstake, couse i made options to Physically Remove Message delete...

Thanks!
Reply With Quote
  #31  
Old 01-26-2004, 07:53 PM
zajako's Avatar
zajako zajako is offline
 
Join Date: Jan 2002
Location: a place not to far away
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
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.

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!
well done
Reply With Quote
Reply

Thread Tools

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 03:24 PM.


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.04767 seconds
  • Memory Usage 2,336KB
  • 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
  • (9)bbcode_php
  • (6)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
  • (4)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