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
  #32  
Old 07-02-2002, 11:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noticed a small problem when you are deleting posts. If you go to delete a post and canel out of it, the next post in the same thread you go to delete will have the very same thread id number. Any post you click on in that same thread and cancel out of will always have the same thread id. Is it supposed to work that way?
Reply With Quote
  #33  
Old 07-02-2002, 06:19 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
What?! Please delete that post, you are implying I created a hack that caused this confusiong when it's really vBulletin that separates java and script..
done. had no idea it was done by vB.
also... i listen to your suggestions chen related to the accidental deletion of the message. great idea you had on the previous thread and that's why i released v1.1 where i added the warning popup. let me know if you like the way i wrote the hack. i think my version is better then the other one (wich i didnt even know it existed, thanks Unknown553). read more here on my comments about this:
https://vborg.vbsupport.ru/showthrea...065#post268065

your comments made in the another hack version:
https://vborg.vbsupport.ru/showthrea...916#post189916
Reply With Quote
  #34  
Old 07-02-2002, 07:00 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nakkid...

The instructions were perfectly clear

Satan
Reply With Quote
  #35  
Old 07-03-2002, 03:04 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mini Fix.

Replace
PHP 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
with

PHP Code:
<script language="JavaScript">
var 
postid;
function 
confirmdelete(postid) {
  
messagebox=confirm('You have chosen to delete 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=' postid; }
  else { }
}
</
script

and then replace
PHP Code:
<a href="javascript:confirmdelete()">Delete Message</a
with

PHP Code:
<a href="javascript:confirmdelete('$post[postid]')">Delete Message</a
The popup should work fine now if any of you had problem with it.
Reply With Quote
  #36  
Old 07-03-2002, 04:17 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great job neo...
i added your fix to the file. except the variable define. you dont need it. thanks.

replace your old template with this one:
Code:
<script language="JavaScript">
function confirmdelete(postid) {
  messagebox=confirm('You have chosen to delete 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='+postid; }
  else { }
}
</script>
<a href="javascript:confirmdelete($post[postid])"><img src="{ imagesfolder}/delete.gif" border="0" alt="Delete Message"></a>
dont forget to remove the space in front of 'imagesfolder}' and also the one between 'java' and 'script'.
Reply With Quote
  #37  
Old 07-03-2002, 06:39 AM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just checking before I install - don't want to sound retarded here, but the button/link does NOT show up for users who don't have permissions, correct? I only want my admins and mods to see this. Yes, my mods - I have a decent crew and I really want them to have this feature. I have a real problem on my forums with thread derailment - somebody will ask a question, next thing you know 4 or 5 post later it's totally off topic or people are flaming each other. I'm also going to install the post *nuked* hack, but this one will be useful as well.
Reply With Quote
  #38  
Old 07-03-2002, 06:49 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Neo! That fixed the message id problem. Works great!
Reply With Quote
  #39  
Old 07-03-2002, 06:11 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ixian
Just checking before I install - don't want to sound retarded here, but the button/link does NOT show up for users who don't have permissions, correct? I only want my admins and mods to see this. Yes, my mods - I have a decent crew and I really want them to have this feature. I have a real problem on my forums with thread derailment - somebody will ask a question, next thing you know 4 or 5 post later it's totally off topic or people are flaming each other. I'm also going to install the post *nuked* hack, but this one will be useful as well.
the button will show only to people who have perms to delete posts.
Reply With Quote
  #40  
Old 07-07-2002, 12:27 PM
globalwin's Avatar
globalwin globalwin is offline
 
Join Date: Jun 2002
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everything went well install, but I have a few other things install also, when I click the delete post and confirm it, it takes me to the edit post
Reply With Quote
  #41  
Old 07-07-2002, 02:44 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

check your code changes.
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:40 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.04672 seconds
  • Memory Usage 2,326KB
  • 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
  • (1)bbcode_code
  • (4)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
  • (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