![]() |
I wonder if it exists a vB version?
Did a search for a thread about this but had no success... What it does: Allows forum moderators and admins to close threads after posting. |
OK, as nobody answered here I started trying to do it myself and managed it to work. :)
I copied the "openclosethread" part located on postings.php and pasted it into newreply.php. Then I added a "Close Thread after posting" box on the "newreply" template. Only... I get two "thank you" messagges at once on the same page! The first tnx is about closing the thread while the second tnx is about posting a reply to this thread. How can I get rid of the reply one? |
Excellent, care to post the whole hack?
|
Aren't you interested on waiting for a fix to the double message? No? Well, here's what I did:
Open newreply.php and look for: Code:
eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_postthanks")."\",\"$goto\");"); Code:
//check valid username and password and get user id Now open the template "newreply" and insert into the FORM code wherever you want: Code:
<INPUT TYPE="CHECKBOX" NAME="openclosethread" VALUE="yes"><b>Close Thread after posting?</b> AGAIN... if someone could plz plz plz plz plz fix the double "thank you" message that would be VERY apreciated!! :D :D :D |
WARNING !!!!
Do NOT use this hack as it does ALWAYS close threads even if you don't check the "Close thread" checkbox !!! Help... :mad: |
LOL Sorry man I'm glad I didn't test it :)
|
Here is the code for this hack that had worked for me very well:
Open newreply.php and look for: Code:
// redirect Code:
if ($close) { Now open the template "newreply" and under: Code:
<BR><INPUT TYPE="CHECKBOX" NAME="signature" VALUE="yes" $signaturechecked> <B>Show Signature:</B> include your profile signature. Only registered users may have signatures. Code:
<BR><INPUT TYPE="CHECKBOX" NAME="close" VALUE="yes"> <B>Close Thread after posting</B> I hope that will help anyone :) |
Thank you very much man!! :)
It worked perfectly except... there's still a double "thank you" msg. Could tell me how to display only the Code:
"Thank you for closing the thread, Cr4z33. You are now being taken to the thread." |
Mhhm...on my test-board there is no double "thank you" msg. displayed are you sure you have added the code corectly in the right place ??
|
When you say to look for:
Code:
// redirect Code:
eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_postthanks")."\",\"$goto\");"); |
But in my code there is a exit; after the close msg so it shouldn't display a second thanks msg.
I don't know what your mistake is because on my board it work fine without a second msg. Check your code again !! |
Quote:
Anyway if you/someone else can help me here's a sample of the "thank you" msg around line 170 that I would not like to see while closing a thread: Code:
// redirect [Edited by Cr4z33 on 12-16-2000 at 07:45 AM] |
im not gettin double thanks.
but thanks for the hack :D |
All times are GMT. The time now is 10:02 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|