![]() |
Good job, JJR! This will come in handy. :)
|
Wouldn't it be better to add "newpost_closethread" to the $templatesused variable at the top of newreply.php, to save one SQL query on every reply page?
Also, to preserve the checkbox's state when previewing post, I would put this in newreply.php: PHP Code:
Quote:
|
How does putting the template name in the $templateused variable save a query?
|
I have updated the instructions so that the check box maintains its status during a reply preview, although I used a slightly different way (I used the iif function).
EDIT: Another update :rolleyes: attached in the next reply. |
Sorry...
There was a potential problem I was unaware of, until I started testing with the preview function. Due to where in newreply.php I specified to place the code that actually closed the thread, the thread would have been closed immediately upon hitting the Preview button. Now I think that anyone that could use the checkbox and actually close the thread could probably also post a reply to a closed thread, so that wouldn't have been a problem...but if, after hitting Preview, the user just abandoned the reply (clicked the navigation link back into the forum or the home page or whatever, without submitting the reply), the thread would still be closed. Therefore, I have adjusted the instructions so the thread isn't closed until the reply is actually submitted. If you have already installed this hack, you should undo the first step of modifying newreply.php (just find what it tells you to add, and remove it). Then download the new instructions and do what it says in the same step. |
Quote:
Thanks for fixing your hack! I think I accidently closed a thread while I was playing with it, but now I can't find it... :( Oh well, let my users think I'm a bad administrator. ;) |
OK, thanks for explaining that...I didn't really know what the point of that variable was. Now I have some hacks to go fix...:( :D
(I've updated the previously-posted instructions to reflect an appropriate change.) |
Man is this a time saver! Thanks:)
It would be even better if you could add sticky, move, etc... Just a thought. |
@JJR512
Thx for the Hack, but in your last updated instructions is a new (small) bug :rolleyes: @Point 3. you wrote: Quote:
Quote:
Mystics |
OK, thanks...I've updated the instructions.
|
All times are GMT. The time now is 01:45 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:
|