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

Reply
 
Thread Tools
Quick Delete Post Details »»
Quick Delete Post
Version: 1.00, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-30-2002 Last Update: Never Installs: 83
 
No support by the author.

This hack is an easy and cute one, of my 'Quick' series.

If you have permissions, it will allow you to [high]delete a post[/high] with the simple click of a button, while you view the thread. If there is only one post in the thread, the hack will delete the entire thread, instead.
Also the hack is designed to prevent accidental post deletion. A warning message will popup to confirm the message deletion.

ESTIMATED INSTALL TIME: 4 minutes
REQUESTED BY: (nobody)
TESTED IN VERSION: 2.2.6

[high]RELATED HACKS[/high]
Quick Reply Box (with Close/Open thread switch)
Quick Close/Open Thread (with reason)

[HIGH]HACK UPDATES[/HIGH]
Version 1.1
------------------------------------
Changes:
- added deletion warning message



You like this hack? Please click on the [high]Install[/high] button.
To download the latest version of this hack, click below:

Show Your Support

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

Comments
  #12  
Old 07-01-2002, 09:41 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I make it for Admins only or admin 1? And there's no way to get the confirm delete with a text link?

Quote:
Originally posted by Nakkid
Unknown553, did you look at the code? is not the same hack.
my hack will delete the post and also the thread. the hack you listed above will delete the post but will leave the thread active, wich will make it look like that (if you have only one post in it):
Reply With Quote
  #13  
Old 07-01-2002, 09:49 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

question 1. in the hack file, replace:
Code:
if (ismoderator($thread[forumid],"candeleteposts")) {
with:
Code:
if ($bbuserinfo['usergroupid']==6) {
question 2. did you read the entire hack file?
Reply With Quote
  #14  
Old 07-01-2002, 09:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Answer 1. Thank you.

Answer 2. Yes, I did, but is says to replace the stuff in the postbit delete template with the text link struff.

Quote:
Originally posted by Nakkid
question 1. in the hack file, replace:
Code:
if (ismoderator($thread[forumid],"candeleteposts")) {
with:
Code:
if ($bbuserinfo['usergroupid']==6) {
question 2. did you read the entire hack file?
Reply With Quote
  #15  
Old 07-01-2002, 09:59 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so do this.
Reply With Quote
  #16  
Old 07-01-2002, 10:04 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's what I did and it does not warn me before I delete a post.

Quote:
Originally posted by Nakkid
so do this.
Reply With Quote
  #17  
Old 07-01-2002, 10:11 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you didnt read the hack file properly. let me quote from it:
Quote:
You can also use this as a link, instead of an image. Place the $post[delete] variable whereever you want in the postbit template and edit the 'postbit_deletepost' link to look, for example, like:
Reply With Quote
  #18  
Old 07-01-2002, 10:29 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I figured that out finally. Maybe you ought to have it be a little less confusing. Like saying that you need to replace the template contents with: and then just do the code again with the new link info in it. Or say something like change the link LINE in the above script to. I'm not a total idiot, so if I got confused, how many others will get confused also? And next time, instead of a "So do it", a little how to would have avoided repeated messages like this.

Quote:
Originally posted by Nakkid
you didnt read the hack file properly. let me quote from it:
Reply With Quote
  #19  
Old 07-01-2002, 10:37 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get no warning at all on deletion. It just goes ahead and deletes the message. Here is the code I have in the postbit_deletepost template:

Code:
<script language="JavaScript">
function confirmdelete() {
  messagebox=confirm('You have chosen to delete Post $post[postid].\r\rClick OK to delete it, or Cancel to hide this prompt.');
  if (messagebox==true) { window.location='editpost.php?s=$session[sessionhash]&action=deletethispost&postid=$post[postid]'; }
  else { }
}
</script>
<smallfont><a href="editpost.php?s=$session[sessionhash]&action=deletethispost&postid=$post[postid]">Delete Post</a></smallfont>
Reply With Quote
  #20  
Old 07-01-2002, 10:40 PM
Unknown553's Avatar
Unknown553 Unknown553 is offline
 
Join Date: Oct 2001
Location: Las Vegas, NV, USA
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Nakkid
Unknown553, did you look at the code? is not the same hack.
my hack will delete the post and also the thread. the hack you listed above will delete the post but will leave the thread active, wich will make it look like that (if you have only one post in it):
Ahh ok. Just making sure
Reply With Quote
  #21  
Old 07-01-2002, 10:44 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

boofo, the link should look like that:
Code:
<a href="javascript:confirmdelete()">Delete Message</a>
remove the space between [high]java[/high] and [high]script[/high]

also, related to:
Quote:
Originally posted by Boofo
Yeah, I figured that out finally. Maybe you ought to have it be a little less confusing. Like saying that you need to replace the template contents with: and then just do the code again with the new link info in it. Or say something like change the link LINE in the above script to. I'm not a total idiot, so if I got confused, how many others will get confused also? And next time, instead of a "So do it", a little how to would have avoided repeated messages like this.
there is no need for me to do this. first you will learn from it, while you hack the files and second, as you stated yourself, is clearly marked, nothing confusing. it says 'replace the link'. sorry if you felt offended but my intention was to make you understand that is important to read well the hack file before you post.

i would like to know if other collegues, from vB.org, find it confusing. i always try to make my hack files as clear as possible.
post here and let me know please if the information included is clear. thanks.
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 01:03 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.04665 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
  • (6)bbcode_code
  • (7)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