vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   This thread closed by? Ideas? (https://vborg.vbsupport.ru/showthread.php?t=2499)

08-16-2000 12:24 PM

Anyone have any ideas on how to add a "This thread closed by (who ever closed it)" whenever a thread is closed?

Thanks,
Parker

08-16-2000 06:58 PM

yeah that would be a great addition... now that i have mods

08-16-2000 07:17 PM

until a hack is made for this, I would suggest just posting to a thread before closing it, and say why

08-16-2000 07:20 PM

yeah that's what i do...

08-17-2000 06:48 PM

In your showthread.php file look for:

if ($threadinfo[open]==1) {
$replyclose="$replyimage";
} else {
$replyclose="$closedthreadimage";
}

and change this to:

if ($threadinfo[open]==1) {
$replyclose="$replyimage";
} else {
$replyclose="$closedthreadimage";
$whoclosed = "This thread closed by $username";
}

then in your showthread template put:

$whoclosed

wherever you want it on the page.

Note: You will have to post the last message in the thread for the correct person to show up as to closed it as it lists the last person in thread as the closer. But this allows your mods to post the reason why it was closed and at the same time alert the author of the post who closed it.

Parker

08-17-2000 07:12 PM

No offense meant, Parker, but if the mod has to post the last post before closing the thread, he might as well say "this thread is closed by me because..." etc. Your hack doesn't shorten the procedure and therefore seems a bit redundent to me.

08-17-2000 07:31 PM

bira:

Yes, it is redundant but at the same time it puts at the top of the page who closed it. Members are lazy and gon't want to go down a long thread to see who closed something. This way they see at the top.

I am still working on a way to get this to be automatic but I thought that I would throw this out to see if anyone could get any use out of it.

Don't like it. Don't use it. Its that simple.

Parker

08-17-2000 08:26 PM

don't be discouraged on my account, Parker. I was merely hoping you could extend the hack further :)

08-17-2000 09:39 PM

Future Hackers of America

open postings.php and find:

Code:

  if ($threadinfo[open]==1)
  {
    $DB_site->query("UPDATE thread SET open=0 WHERE threadid=$threadid");
    $action="closing";
  }

This is where you want to start your hack. You will need to open newreply.php, see what the code does when a user posts a reply. Duplicate the required elements in postings.php inside the code above. You want to set $message to something like "Thread Closed". You already have the $username of the mod so you don't need to figure it out. You want to insert a post stating the thread is closed, which will be from the Mod right before the thread is really closed. It is really simple to do but I will leave it up to you guys to do it.

[sidenote]

Is there a way to call newreply.php from inside postings.php so that one wouldn't actually have to anything other than insert the call right before the thread close?

Code:

newreply.php?action=postreply&message=Closed%20Thread
The idea is to simulate what is sent when a user clicks on the "Post" button when entering a message. Possible? I don't know

08-17-2000 11:55 PM

rangersfan -

Code:

//Set EVERY form generated variable here, including:
//$action and
//$submit (<-- I think that's the name. It's the name value of the submit button)

require("newreply.php");
// Or, if that doesn't work:
// include("newreply.php");



All times are GMT. The time now is 07:12 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.00989 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_code_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
  • (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