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-01-2002 09:41 PM

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


TECK 07-01-2002 09:49 PM

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?

Boofo 07-01-2002 09:58 PM

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?


TECK 07-01-2002 09:59 PM

so do this. :)

Boofo 07-01-2002 10:04 PM

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

Quote:

Originally posted by Nakkid
so do this. :)

TECK 07-01-2002 10:11 PM

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:

Boofo 07-01-2002 10:29 PM

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:

Boofo 07-01-2002 10:37 PM

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>


Unknown553 07-01-2002 10:40 PM

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

TECK 07-01-2002 10:44 PM

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.


All times are GMT. The time now is 07:34 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.01133 seconds
  • Memory Usage 1,744KB
  • 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
  • (6)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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