Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Reason for closing thread Details »»
Reason for closing thread
Version: 1.00, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-22-2002 Last Update: 01-10-2004 Installs: 77
 
No support by the author.

We hope most of you can use it
Sinecure has had the idea, which i thought is something nearly everbody who has ever been a mod wanted to have for a long time
I have to thank sinecure for the good templates, and for finding the funny mistakes i have made *gg*

edit:
nuno, i think we can do something similar for deleted threads too

Ok, basicly this hack does exactly as it says. After you click the "Open/Close Thread" link you will be prompted to enter a reason for closing the thread. After you submit the reason for closing that thread, the reason will appear ABOVE the first post in that thread, in its own seperate box.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 06-24-2002, 11:47 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it is another hack (although I'm not sure which one ). Any help would be greatly appreciated.

Quote:
Originally posted by Sinecure
Well judging by looking at that it seems you either have a hack installed, or maybe an older version of vBulletin, I'm leaning more towards a hack installed.

Maybe Xenon would know how to intergrate that code you have there, with the code neccesary to run this hack.
Reply With Quote
  #43  
Old 06-24-2002, 12:10 PM
Sinecure's Avatar
Sinecure Sinecure is offline
 
Join Date: Oct 2001
Location: Victoria, BC, Canada
Posts: 407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly

Look at head_newpm template. You don't need to be a rocket scientist to figure it out.
What are you implying Chen? That I'm not a rocket Scientist?
Reply With Quote
  #44  
Old 06-24-2002, 12:27 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english
Reply With Quote
  #45  
Old 06-24-2002, 01:04 PM
Sinecure's Avatar
Sinecure Sinecure is offline
 
Join Date: Oct 2001
Location: Victoria, BC, Canada
Posts: 407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JohnWoo
Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english
I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again
Reply With Quote
  #46  
Old 06-24-2002, 01:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think he's asking for an option in the amin cp.

Quote:
Originally posted by Sinecure


I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again
Reply With Quote
  #47  
Old 06-24-2002, 01:46 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again

Yes, u right, but it`s not good idea that mods open and then close thread again with new reason. Maybe u try to do this

>I think he's asking for an option in the amin cp.

Nope. Not in admin cp. Mods dosen`t have permission to login into admin CP.
Reply With Quote
  #48  
Old 06-24-2002, 02:12 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A Suggestion:

You say this in the instructions:

PHP Code:
---------------------------------------------------- 
Step 6Modifying the SHOWTHREAD Template 
---------------------------------------------------- 

Find
<!-- 
End content area table (CREATED IN HEADER!!) -->    
    </
td
</
tr
</
table


After thatADD
<
br
$closereason 
<br
If there is no reason then you have 2 <br>, means 2 new empty lines. It's better to put those 2 <br> in the showthread_closereason template.

And here is a little addon wich also displays the user that closed that thread:

Execute this query:

PHP Code:
ALTER TABLE thread ADD `whoVARCHAR(255NOT NULL
Open root/postings.php and find:

PHP Code:
$closereason=" closereason='".addslashes($reason)."', "
Change it to:

PHP Code:
$closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username])."', "
Then open the template: showthread_closereason

Find:
PHP Code:
$thread[closereason
Add after it:
PHP Code:
By$thread[who
Done.
Reply With Quote
  #49  
Old 06-24-2002, 03:17 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Lesane: Thank you, so i don't have to write it
but i would change it to that:

[sql]ALTER TABLE thread ADD `whoclosed` VARCHAR(255) NOT NULL;[/sql]
PHP Code:
$closereason=" closereason='".addslashes($reason)."',whoclosed='".addslashes($bbuserinfo[username])."', "
then use By: $thread[whoclosed]

@Sinecure: you can update the install file *gg*
It grows faster and faster as i thought of


Quote:
Originally posted by Boofo
Code:
if ($thread[open]) {
  $replyclose="{ replyimage}";
  $thread[closereason]="";
} else {
  $replyclose="{ closedthreadimage}";
  $thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1);
  eval("\$closereason = \"".gettemplate("showthread_closereason")."\";");
}
in what I already have here (and can it be done)?

Code:
if ($thread[open]) {
  eval("\$replyopenclosed = \"".gettemplate("showthread_replyopen")."\";");
} else {
  if (ismoderator($thread[forumid],'canopenclose')) {
    eval("\$replyopenclosed = \"".gettemplate("showthread_replyclosedmod")."\";");
  } else {
	eval("\$replyopenclosed = \"".gettemplate("showthread_replyclosed")."\";");
   }
}
use this:
PHP Code:
if ($thread[open]) {
  
$closereason="";
  eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyopen")."\";");
} else {
  
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1);
  eval(
"\$closereason = \"".gettemplate("showthread_closereason")."\";");
  if (
ismoderator($thread[forumid],'canopenclose')) {
    eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyclosedmod")."\";");
  } else {
    eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyclosed")."\";");
   }

Reply With Quote
  #50  
Old 06-24-2002, 04:40 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JohnWoo
Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english
Well let's see what we can do

optional add to the hack:

edit template threads_editthread
after
Code:
<tr>
	<td bgcolor="{firstaltcolor}" width="73%"><normalfont><b>Moderator Notes / Thread Summary:</b></normalfont></td>
	<td bgcolor="{firstaltcolor}" width="27%"><normalfont><input type="text" class="bginput" name="notes" value="$threadinfo[notes]" size="50" maxlength="250"></normalfont></td>
</tr>
add this code:
Code:
<tr>
	<td bgcolor="{firstaltcolor}" width="73%"><normalfont><b>Close Reason:</b></normalfont></td>
	<td bgcolor="{firstaltcolor}" width="27%"><normalfont><input type="text" class="bginput" name="closereason" value="$threadinfo[closereason]" size="50" maxlength="255"></normalfont></td>
</tr>
then open postings.php
find this line in editthread section:
PHP Code:
$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(htmlspecialchars($title))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."' WHERE threadid='$threadid'"); 
replace it with:
PHP Code:
$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(htmlspecialchars($title))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."',closereason='".addslashes($closereason)."' WHERE threadid='$threadid'"); 
i haven't tested it, but it should do what ya want
Reply With Quote
  #51  
Old 06-24-2002, 06:38 PM
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

2Xenon:
Ohh... greate thanks... i go to test this addon....
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 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.04949 seconds
  • Memory Usage 2,342KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (10)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete