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)

JJR512 01-01-2002 10:00 PM

This very simple hack will show a checkbox in the options area (with show signature, email notification, etc.) of the Reply
to Topic screen that allows you to close the thread at the same time as posting your reply to the thread. The checkbox will
only show to those that have permission to close the thread.

Tested by me on 2.2.1. Compatibility with earlier versions is likely but not proven.

This hack was requested by Freestyler here.

EDIT: This hack has been updated; the attachment is now in Post #9.

RapCheck 01-02-2002 06:19 AM

Great. Installing right now.

Freestyler 01-02-2002 06:31 AM

Thankyou JJR512!

I'll get our 'vB guy' (Apollo) to install it as soon as he's got time, and we'll let you know how it goes!

Lesane 01-02-2002 07:00 AM

Great little hack, thanks

-.valkyre 01-02-2002 07:15 AM

Very useful indeed. I'm adding this hack when I transfer my forums to my new site. Thanks for a simple, yet every effective hack! :)

Martz 01-02-2002 08:06 AM

A well overdue hack, good work fella :)

Mystics 01-02-2002 02:09 PM

Thx!! Works great :)

Greetz,
Mystics

Admin 01-02-2002 02:24 PM

Installed here, nice hack. :)

One thing though, to make sure users can't manipulate forms and close a thread, you should replace:
Code:

  if ($closethread=="yes") {
      $DB_site->query("UPDATE thread SET open='0' WHERE threadid='$threadid'");
  }

with:
Code:

  if ($closethread=="yes"[high] and $permissions['canopenclose']==1[/high]) {
      $DB_site->query("UPDATE thread SET open='0' WHERE threadid='$threadid'");
  }


JJR512 01-02-2002 04:09 PM

Good idea, FireFly! :) I've added that into the instructions.

The new instructions are attached to this post.

EDIT: This hack has been updated, and the instructions are now attached to Post #14 below.

Admin 01-02-2002 04:25 PM

Security is always a good idea. :)


All times are GMT. The time now is 12:35 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.01097 seconds
  • Memory Usage 1,728KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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