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)
-   -   Close Thread with Reply (https://vborg.vbsupport.ru/showthread.php?t=33718)

Wolf42 02-06-2002 09:09 AM

Is working fine!
Thanks to all :up:

Joshua Clinard 02-24-2002 10:25 PM

Man, it seems that every hack I want to install has problems with it! Why don't people update thier hacks?

JJR512 02-25-2002 07:45 PM

Not to sound rude or offenseive, but maybe when you get your Hacks number up to oh, say about 12 or so, AND get a message board with almost 150,000 posts, maybe then you won't need to ask a question like that. ;)

My hack does work as-is for me. That makes sense because I developed it for my board. Admins can close any thread with it; Moderators can close threads in their forums; and members cannot close any threads, even their own. This is the default way vBulletin works in terms of who can close what thread, and it's the system I use. My hack works fine for it. Aparently, although I haven't tested it yet, I guess pwr_sneak's version works for ALL situations.

As soon as I am able, I will test his update and fix my hack with it (assuming you, pwr_sneak, don't mind if I do that?).

Joshua Clinard 03-10-2002 07:34 PM

Sorry, this message was intended to be posted in another thread.

eva2000 03-12-2002 11:37 PM

from Freddie https://vborg.vbsupport.ru/showthrea...959#post228959 suggested using the permissions system so is this correct for instructions ?

ismoderator($foruminfo['forumid'])

find lines 242-245 in newreply.php

PHP Code:

    } else {
      if (
$attachmentid and !$foruminfo[moderateattach]) {
        
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
      } 

change to

PHP Code:

    } else {
      if (
$closethread=="yes" and ismoderator($foruminfo['forumid']) ) {
        
$DB_site->query("UPDATE thread SET open='0' WHERE threadid='$threadid'");
      }
      if (
$attachmentid and !$foruminfo[moderateattach]) {
        
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
      } 

Find, on or around Line 450:
Code:

  $maxattachsize_temp = getmaxattachsize();
Add BEFORE that:
PHP Code:

   if (ismoderator($foruminfo['forumid']))  {
    
$closethreadchecked=iif(trim($closethread)=="yes","checked","");
    eval(
"\$closethreadbox = \"".gettemplate("newpost_closethread")."\";");
  } else {
    
$closethreadbox="";
  } 

is it correct ?

gsnetworks 04-16-2002 02:56 AM

Good job.


All times are GMT. The time now is 01:16 AM.

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.01144 seconds
  • Memory Usage 1,736KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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