![]() |
Reason for Closing Thread
This hack is my first released free hack.
It runs no extra queries so it should not make any load times longer. How it works: Once you click on Close thread in the Thread Tools menu, it will pop up with a javascript alert asking for the reason you are closing. You may click cancel or ok. If you inputted something into the box it will save it and appear at the top right above the first post. Modifications: 1 Table Modification 3 File Modifications 5 Template Modifications 1 Template Addition Please click install if you install this hack. www.hackvb.com - For your custom hacks! *Note: This was only tested on vb 3.0.3. I have not tested it on any other versions and theoretically it should work, but I'm not sure. |
Interesting hack. ;) You need to fix the instructions file for the following, though.
FIND: ------------------- <!-- / toolbar --> ------------------- BELOW IT ADD: ------------------- $reaons ------------------- Shouldn't that be $reason? * Boofo clicks the install button. ;) |
Should be fixed now... Let me know if you have any troubles. I'd like to know if everything goes smoothly.
|
thanks WhSox21
Great work :) i'm clicked install it but i have error whene i save modification of SHOWTHREAD template : The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ***/***/includes/adminfunctions_template.php(3055) : eval()'d code on line 131 This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. |
I forgot the biggest part of the hack. I reuploaded the instructions!
Working on that for you. I have no idea why it gave you that error. It didn't give me that error. |
I see the problem. Where it says:
Code:
<if condition="$show['closethread']"> I fixed that now. I also updated the install file. |
work fine .. thanks alot :)
|
does it work for quick reply closin?
|
What do you mean exactly? As of now it only works when you use the thread tools menu.
|
back :)
Whene i not write reason it show : Reason thread was closed: null can you cancel show all table of reason if not reason? OR can i put default reason ? |
How did you get that error? That should not happen. I made it so that if you did not fill in a reason it would not display. What were the steps you took to do that? Did you click cancel or ok or how did you do it?
EDIT: Are you sure you did all the steps in the install? Are you sure you edited postings.php file correctly? |
oh, yes .. your right .. i'm clicked Cancel ! with click Ok no problem .
thanks for support me :) |
If you click cancel you shouldn't recieve that either.
|
that is what happened for me !
if i not write reason and click OK it's not display anything .. if CANCEL it's display ! |
What version of vb are you using? Can you post me lines 165-182 of your postings.php file? It's not doing that for me when I click cancel nor should it for you. There is something wrong with your install or something.
|
i'm using 3.03 ..
i will reinstall this hack and take what you request : ( all open/close section ) PHP Code:
|
Well, that file is correct. I'll see if I can't figure something else out?
|
I figured it out. It's related to IE. You can do this to simply fix the problem:
postings.php *************** Code:
FIND: |
i installed it the box pops up But after wards there is no reason listed for closing thread.
|
Did you add the hidden field in showthread template?
|
i added everything in the instructions. do you have aim i can talk to you on?
|
Excellent, fixed :)
thx and best wishes :) |
whsox fixed it up for me thanks bro much appreciated.
|
One issue that arose with the vB2 version of this was that if the thread was closed, a reason was entered, and then the thread was reopened, the reason still showed. Has this been fixed in the vB3 version?
|
Yep. I set the reason to null if they reopened the thread. If the reason is set to null then there is no displaying of the reason. let me know if you have any problems with my hack as I'm interested in having 100% proof hacks released by me! :)
|
Interesting and very useful hack :) Thanks!
|
Not a problem!
|
I have the same Problem as shadyguy1
Quote:
Edit: Fixed it by myself! |
Can you share what the problem was for future fixes?
|
interesting.
This can lead to another mod "Reason for moving thread" too, isnt it? |
Quote:
is there any reason for not having this functionality in this hack? i did install BTW. :up: |
No, I never knew that. I'm aweful busy right now or I could do that, but I'm affraid I can't do it as of right now.
|
It's possible to edit the reason without open and reclose the thread ?
|
Via the database. It is not possible as of now.
|
Ok, thanks
|
any chance at an updated version that will also list who closed the thread.
|
Post in this thread in about a week and I'll try to get that done.
|
alright thanks...be Cool if it Said Thread Closed By:
|
Bumping thread like u asked you said you would add the thread closed by info to the hack in a small update
|
I'll package everything up and send out an update tomorrow but since you've been waiting here it is:
Note this only applies when this is already installed! Replace showthread_reason with this: Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px"> Code:
ALTER TABLE thread ADD `who` VARCHAR(50) NOT NULL; Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open = $threadinfo[open], reason = '" . addslashes($_POST[reason]) . "' WHERE threadid = $threadid"); Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open = $threadinfo[open], reason = '" . addslashes($_POST[reason]) . "', who = '" . addslashes($bbuserinfo[username]) . "' WHERE threadid = $threadid"); Let me know how it works! :up: :) |
All times are GMT. The time now is 05:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|