vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Quick Delete Post (https://vborg.vbsupport.ru/showthread.php?t=40523)

Boofo 07-02-2002 11:42 AM

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? :)

TECK 07-02-2002 06:19 PM

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

Chris M 07-02-2002 07:00 PM

Nakkid...

The instructions were perfectly clear:)

Satan

Neo 07-03-2002 03:04 AM

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.

TECK 07-03-2002 04:17 AM

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'.

ixian 07-03-2002 06:39 AM

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.

Boofo 07-03-2002 06:49 AM

Thanks, Neo! That fixed the message id problem. Works great! :)

TECK 07-03-2002 06:11 PM

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.

globalwin 07-07-2002 12:27 PM

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 :(

TECK 07-07-2002 02:44 PM

check your code changes.


All times are GMT. The time now is 10:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01500 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete